[Scummvm-cvs-logs] SF.net SVN: scummvm:[49779] scummvm/trunk/gui

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Jun 15 12:54:22 CEST 2010


Revision: 49779
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49779&view=rev
Author:   sev
Date:     2010-06-15 10:54:22 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
GUI: Added tooltips to more widgets.

Modified Paths:
--------------
    scummvm/trunk/gui/EditTextWidget.cpp
    scummvm/trunk/gui/EditTextWidget.h
    scummvm/trunk/gui/ListWidget.cpp
    scummvm/trunk/gui/ListWidget.h
    scummvm/trunk/gui/editable.cpp
    scummvm/trunk/gui/editable.h
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/options.cpp

Modified: scummvm/trunk/gui/EditTextWidget.cpp
===================================================================
--- scummvm/trunk/gui/EditTextWidget.cpp	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/EditTextWidget.cpp	2010-06-15 10:54:22 UTC (rev 49779)
@@ -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;
 

Modified: scummvm/trunk/gui/EditTextWidget.h
===================================================================
--- scummvm/trunk/gui/EditTextWidget.h	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/EditTextWidget.h	2010-06-15 10:54:22 UTC (rev 49779)
@@ -41,8 +41,8 @@
 	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);
 

Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/ListWidget.cpp	2010-06-15 10:54:22 UTC (rev 49779)
@@ -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 @@
 	_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;

Modified: scummvm/trunk/gui/ListWidget.h
===================================================================
--- scummvm/trunk/gui/ListWidget.h	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/ListWidget.h	2010-06-15 10:54:22 UTC (rev 49779)
@@ -87,8 +87,8 @@
 	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);

Modified: scummvm/trunk/gui/editable.cpp
===================================================================
--- scummvm/trunk/gui/editable.cpp	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/editable.cpp	2010-06-15 10:54:22 UTC (rev 49779)
@@ -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();
 }
 

Modified: scummvm/trunk/gui/editable.h
===================================================================
--- scummvm/trunk/gui/editable.h	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/editable.h	2010-06-15 10:54:22 UTC (rev 49779)
@@ -55,8 +55,8 @@
 	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();

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/launcher.cpp	2010-06-15 10:54:22 UTC (rev 49779)
@@ -88,8 +88,8 @@
  */
 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 @@
 
 	// 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 @@
 #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);
 

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2010-06-15 10:53:55 UTC (rev 49778)
+++ scummvm/trunk/gui/options.cpp	2010-06-15 10:54:22 UTC (rev 49779)
@@ -608,8 +608,8 @@
 
 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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list