summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-17 23:11:06 +0000
committerrubidium <rubidium@openttd.org>2008-05-17 23:11:06 +0000
commitd284ba228327b83b74a5bf2448406f9021f67c8b (patch)
treecdbaf12f7c5a7666ecc23983c51dca268e3b58e2 /src/order_gui.cpp
parentb101faea201219afd52f6a743dad244c1c33b991 (diff)
downloadopenttd-d284ba228327b83b74a5bf2448406f9021f67c8b.tar.xz
(svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean.
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 301e57374..82c0cbb3e 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -926,7 +926,7 @@ public:
ResetObjectToPlace();
}
- virtual bool OnKeyPress(uint16 key, uint16 keycode)
+ virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
static const KeyToEvent keytoevent[] = {
{'D', OrderClick_Skip},
@@ -939,15 +939,15 @@ public:
//('?', OrderClick_Service},
};
- if (this->vehicle->owner != _local_player) return true;
+ if (this->vehicle->owner != _local_player) return ES_NOT_HANDLED;
for (uint i = 0; i < lengthof(keytoevent); i++) {
if (keycode == keytoevent[i].keycode) {
keytoevent[i].proc(this, -1);
- return false;
+ return ES_HANDLED;
}
}
- return true;
+ return ES_NOT_HANDLED;
}
virtual void OnPlaceObject(Point pt, TileIndex tile)