diff options
author | Eugene Sandulenko | 2010-06-15 10:54:22 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-06-15 10:54:22 +0000 |
commit | 2b67bcc8e499581c33f9a4d914df056e9c2c0bf2 (patch) | |
tree | 1b74ce39da0aa569cb6b240a5185da01b8a147c2 | |
parent | 5370fc2312b1f01f81c5ad4ce2ef0a2c879f9c71 (diff) | |
download | scummvm-rg350-2b67bcc8e499581c33f9a4d914df056e9c2c0bf2.tar.gz scummvm-rg350-2b67bcc8e499581c33f9a4d914df056e9c2c0bf2.tar.bz2 scummvm-rg350-2b67bcc8e499581c33f9a4d914df056e9c2c0bf2.zip |
GUI: Added tooltips to more widgets.
svn-id: r49779
-rw-r--r-- | gui/EditTextWidget.cpp | 8 | ||||
-rw-r--r-- | gui/EditTextWidget.h | 4 | ||||
-rw-r--r-- | gui/ListWidget.cpp | 8 | ||||
-rw-r--r-- | gui/ListWidget.h | 4 | ||||
-rw-r--r-- | gui/editable.cpp | 8 | ||||
-rw-r--r-- | gui/editable.h | 4 | ||||
-rw-r--r-- | gui/launcher.cpp | 12 | ||||
-rw-r--r-- | gui/options.cpp | 4 |
8 files changed, 26 insertions, 26 deletions
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp index 658ac21117..7079453173 100644 --- a/gui/EditTextWidget.cpp +++ b/gui/EditTextWidget.cpp @@ -30,16 +30,16 @@ namespace GUI { -EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, uint32 cmd) - : EditableWidget(boss, x, y - 1, w, h + 2, cmd) { +EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip, uint32 cmd) + : EditableWidget(boss, x, y - 1, w, h + 2, tooltip, cmd) { setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE); _type = kEditTextWidget; setEditString(text); } -EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, uint32 cmd) - : EditableWidget(boss, name, cmd) { +EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd) + : EditableWidget(boss, name, tooltip, cmd) { setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE); _type = kEditTextWidget; diff --git a/gui/EditTextWidget.h b/gui/EditTextWidget.h index 5a5823cfb1..9c4ef03648 100644 --- a/gui/EditTextWidget.h +++ b/gui/EditTextWidget.h @@ -41,8 +41,8 @@ protected: int _rightPadding; public: - EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, uint32 cmd = 0); - EditTextWidget(GuiObject *boss, const String &name, const String &text, uint32 cmd = 0); + EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0); + EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0); void setEditString(const String &str); diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 97dde29824..e08bc09b0b 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -36,8 +36,8 @@ namespace GUI { -ListWidget::ListWidget(Dialog *boss, const String &name, uint32 cmd) - : EditableWidget(boss, name), _cmd(cmd) { +ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, uint32 cmd) + : EditableWidget(boss, name, tooltip), _cmd(cmd) { _scrollBar = NULL; _textWidth = NULL; @@ -68,8 +68,8 @@ ListWidget::ListWidget(Dialog *boss, const String &name, uint32 cmd) _editColor = ThemeEngine::kFontColorNormal; } -ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd) - : EditableWidget(boss, x, y, w, h), _cmd(cmd) { +ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd) + : EditableWidget(boss, x, y, w, h, tooltip), _cmd(cmd) { _scrollBar = NULL; _textWidth = NULL; diff --git a/gui/ListWidget.h b/gui/ListWidget.h index a3fb825761..3858fa6de2 100644 --- a/gui/ListWidget.h +++ b/gui/ListWidget.h @@ -87,8 +87,8 @@ protected: ThemeEngine::FontColor _editColor; public: - ListWidget(Dialog *boss, const String &name, uint32 cmd = 0); - ListWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd = 0); + ListWidget(Dialog *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0); + ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0); virtual ~ListWidget(); virtual Widget *findWidget(int x, int y); diff --git a/gui/editable.cpp b/gui/editable.cpp index 058f08e233..755e34e380 100644 --- a/gui/editable.cpp +++ b/gui/editable.cpp @@ -28,13 +28,13 @@ namespace GUI { -EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd) - : Widget(boss, x, y, w, h), CommandSender(boss), _cmd(cmd) { +EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd) + : Widget(boss, x, y, w, h, tooltip), CommandSender(boss), _cmd(cmd) { init(); } -EditableWidget::EditableWidget(GuiObject *boss, const String &name, uint32 cmd) - : Widget(boss, name), CommandSender(boss), _cmd(cmd) { +EditableWidget::EditableWidget(GuiObject *boss, const String &name, const char *tooltip, uint32 cmd) + : Widget(boss, name, tooltip), CommandSender(boss), _cmd(cmd) { init(); } diff --git a/gui/editable.h b/gui/editable.h index 00cb3431a5..8ff5298511 100644 --- a/gui/editable.h +++ b/gui/editable.h @@ -55,8 +55,8 @@ protected: ThemeEngine::FontStyle _font; public: - EditableWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd = 0); - EditableWidget(GuiObject *boss, const String &name, uint32 cmd = 0); + EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0); + EditableWidget(GuiObject *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0); virtual ~EditableWidget(); void init(); diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 84d27e9892..176fb45214 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -88,8 +88,8 @@ enum { */ class DomainEditTextWidget : public EditTextWidget { public: - DomainEditTextWidget(GuiObject *boss, const String &name, const String &text) - : EditTextWidget(boss, name, text) { + DomainEditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip = 0) + : EditTextWidget(boss, name, text, tooltip) { } protected: @@ -171,11 +171,11 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // GUI: Label & edit widget for the game ID new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to savegames and running the game from the command line")); - _domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain); + _domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to savegames and running the game from the command line")); // GUI: Label & edit widget for the description new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game")); - _descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description); + _descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game")); // Language popup _langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English")); @@ -525,11 +525,11 @@ LauncherDialog::LauncherDialog() #endif _searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:")); - _searchWidget = new EditTextWidget(this, "Launcher.Search", _search, kSearchCmd); + _searchWidget = new EditTextWidget(this, "Launcher.Search", _search, 0, kSearchCmd); _searchClearButton = new ButtonWidget(this, "Launcher.SearchClearButton", "C", _("Clear value"), kSearchClearCmd); // Add list with game titles - _list = new ListWidget(this, "Launcher.GameList", kListSearchCmd); + _list = new ListWidget(this, "Launcher.GameList", 0, kListSearchCmd); _list->setEditable(false); _list->setNumberingMode(kListNumberingOff); diff --git a/gui/options.cpp b/gui/options.cpp index 4a028521a5..ad32bfd4e3 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -608,8 +608,8 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) { // The MIDI mode popup & a label - _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _("Music driver:"), _("Specifies output sound device or sound emulator")); - _midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound emulator")); + _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _("Music driver:"), _("Specifies output sound device or sound card emulator")); + _midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator")); // Populate it const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers(); |