Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: gui/EditTextWidget.cpp
- ===================================================================
- --- gui/EditTextWidget.cpp (revision 41304)
- +++ gui/EditTextWidget.cpp (working copy)
- @@ -114,4 +114,9 @@
- releaseFocus();
- }
- +void SearchBoxWidget::abortEditMode() {
- + EditTextWidget::abortEditMode();
- + sendCommand(_cmd, 0);
- +}
- +
- } // End of namespace GUI
- Index: gui/launcher.cpp
- ===================================================================
- --- gui/launcher.cpp (revision 41304)
- +++ gui/launcher.cpp (working copy)
- @@ -523,7 +523,7 @@
- #endif
- _searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", "Search:");
- - _searchWidget = new EditTextWidget(this, "Launcher.Search", _search, kSearchCmd);
- + _searchWidget = new SearchBoxWidget(this, "Launcher.Search", _search, kSearchCmd);
- // Add list with game titles
- _list = new ListWidget(this, "Launcher.GameList", kListSearchCmd);
- Index: gui/EditTextWidget.h
- ===================================================================
- --- gui/EditTextWidget.h (revision 41304)
- +++ gui/EditTextWidget.h (working copy)
- @@ -64,6 +64,17 @@
- Common::Rect getEditRect() const;
- };
- +class SearchBoxWidget : public EditTextWidget {
- +public:
- + SearchBoxWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, uint32 cmd = 0) :
- + EditTextWidget(boss, x, y, w, h, text, cmd) {}
- + SearchBoxWidget(GuiObject *boss, const String &name, const String &text, uint32 cmd = 0) :
- + EditTextWidget(boss, name, text, cmd) {}
- +
- +protected:
- + void abortEditMode();
- +};
- +
- } // End of namespace GUI
- #endif
Add Comment
Please, Sign In to add comment