From dcc90445f6ea424bd4576f04afbc790fc43a5c76 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 6 Jun 2009 17:53:25 +0000 Subject: Add to launcher not yet functional search widget. Make EditableWidget CommandSender svn-id: r41267 --- gui/editable.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gui/editable.cpp') diff --git a/gui/editable.cpp b/gui/editable.cpp index 38dcb1ecf5..232873ffe3 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) - : Widget(boss, x, y, w, h) { +EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd) + : Widget(boss, x, y, w, h), CommandSender(boss), _cmd(cmd) { init(); } -EditableWidget::EditableWidget(GuiObject *boss, const String &name) - : Widget(boss, name) { +EditableWidget::EditableWidget(GuiObject *boss, const String &name, uint32 cmd) + : Widget(boss, name), CommandSender(boss), _cmd(cmd) { init(); } @@ -109,6 +109,8 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { _caretPos--; _editString.deleteChar(_caretPos); dirty = true; + + sendCommand(_cmd, 0); } forcecaret = true; break; @@ -116,6 +118,8 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { if (_caretPos < (int)_editString.size()) { _editString.deleteChar(_caretPos); dirty = true; + + sendCommand(_cmd, 0); } forcecaret = true; break; @@ -146,6 +150,8 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { _caretPos++; dirty = true; forcecaret = true; + + sendCommand(_cmd, 0); } else { handled = false; } -- cgit v1.2.3