diff options
-rw-r--r-- | gui/options.cpp | 16 | ||||
-rw-r--r-- | gui/options.h | 2 | ||||
-rw-r--r-- | gui/widget.cpp | 16 | ||||
-rw-r--r-- | gui/widget.h | 2 | ||||
-rw-r--r-- | po/POTFILES | 1 |
5 files changed, 19 insertions, 18 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index dfa30d1e3e..4fa5a821fb 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -1033,22 +1033,6 @@ void OptionsDialog::saveMusicDeviceSetting(PopUpWidget *popup, Common::String se ConfMan.removeKey(setting, _domain); } -ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd) { - ButtonWidget *button; - -#ifndef DISABLE_FANCY_THEMES - if (g_gui.xmlEval()->getVar("Globals.ShowSearchPic") == 1 && g_gui.theme()->supportsImages()) { - button = new PicButtonWidget(boss, name, _("Clear value"), cmd); - ((PicButtonWidget *)button)->useThemeTransparency(true); - ((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageEraser)); - } else -#endif - button = new ButtonWidget(boss, name, "C", _("Clear value"), cmd); - - return button; -} - - int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) { if (_guioptions.contains(GUIO_NOSUBTITLES)) return kSubtitlesSpeech; // Speech only diff --git a/gui/options.h b/gui/options.h index 479f836ec0..92ce3e5df4 100644 --- a/gui/options.h +++ b/gui/options.h @@ -43,8 +43,6 @@ class GuiObject; class RadiobuttonGroup; class RadiobuttonWidget; -ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd); - class OptionsDialog : public Dialog { public: OptionsDialog(const Common::String &domain, int x, int y, int w, int h); diff --git a/gui/widget.cpp b/gui/widget.cpp index d11ebda821..9fa864e7b9 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -23,6 +23,7 @@ #include "common/system.h" #include "common/rect.h" #include "common/textconsole.h" +#include "common/translation.h" #include "graphics/pixelformat.h" #include "gui/widget.h" #include "gui/gui-manager.h" @@ -302,6 +303,21 @@ void ButtonWidget::setLabel(const Common::String &label) { StaticTextWidget::setLabel(cleanupHotkey(label)); } +ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd) { + ButtonWidget *button; + +#ifndef DISABLE_FANCY_THEMES + if (g_gui.xmlEval()->getVar("Globals.ShowSearchPic") == 1 && g_gui.theme()->supportsImages()) { + button = new PicButtonWidget(boss, name, _("Clear value"), cmd); + ((PicButtonWidget *)button)->useThemeTransparency(true); + ((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageEraser)); + } else +#endif + button = new ButtonWidget(boss, name, "C", _("Clear value"), cmd); + + return button; +} + #pragma mark - PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey) diff --git a/gui/widget.h b/gui/widget.h index 428ab7981e..9894dc4526 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -354,6 +354,8 @@ protected: void drawWidget(); }; +ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd); + } // End of namespace GUI #endif diff --git a/po/POTFILES b/po/POTFILES index 14ab5688ff..9898958222 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -13,6 +13,7 @@ gui/options.cpp gui/saveload.cpp gui/themebrowser.cpp gui/ThemeEngine.cpp +gui/widget.cpp base/main.cpp |