Guest User

Untitled

a guest
Jun 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. Index: gui/EditTextWidget.cpp
  2. ===================================================================
  3. --- gui/EditTextWidget.cpp (revision 41304)
  4. +++ gui/EditTextWidget.cpp (working copy)
  5. @@ -114,4 +114,9 @@
  6. releaseFocus();
  7. }
  8.  
  9. +void SearchBoxWidget::abortEditMode() {
  10. + EditTextWidget::abortEditMode();
  11. + sendCommand(_cmd, 0);
  12. +}
  13. +
  14. } // End of namespace GUI
  15. Index: gui/launcher.cpp
  16. ===================================================================
  17. --- gui/launcher.cpp (revision 41304)
  18. +++ gui/launcher.cpp (working copy)
  19. @@ -523,7 +523,7 @@
  20. #endif
  21. _searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", "Search:");
  22.  
  23. - _searchWidget = new EditTextWidget(this, "Launcher.Search", _search, kSearchCmd);
  24. + _searchWidget = new SearchBoxWidget(this, "Launcher.Search", _search, kSearchCmd);
  25.  
  26. // Add list with game titles
  27. _list = new ListWidget(this, "Launcher.GameList", kListSearchCmd);
  28. Index: gui/EditTextWidget.h
  29. ===================================================================
  30. --- gui/EditTextWidget.h (revision 41304)
  31. +++ gui/EditTextWidget.h (working copy)
  32. @@ -64,6 +64,17 @@
  33. Common::Rect getEditRect() const;
  34. };
  35.  
  36. +class SearchBoxWidget : public EditTextWidget {
  37. +public:
  38. + SearchBoxWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, uint32 cmd = 0) :
  39. + EditTextWidget(boss, x, y, w, h, text, cmd) {}
  40. + SearchBoxWidget(GuiObject *boss, const String &name, const String &text, uint32 cmd = 0) :
  41. + EditTextWidget(boss, name, text, cmd) {}
  42. +
  43. +protected:
  44. + void abortEditMode();
  45. +};
  46. +
  47. } // End of namespace GUI
  48.  
  49. #endif
Add Comment
Please, Sign In to add comment