diff options
author | rubidium <rubidium@openttd.org> | 2008-05-17 23:11:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-17 23:11:06 +0000 |
commit | f5681547efc060ab0cc47c36316c4f2aa1217948 (patch) | |
tree | cdbaf12f7c5a7666ecc23983c51dca268e3b58e2 /src/order_gui.cpp | |
parent | c1713c9ab7438386dbda32b4c33e95995882f702 (diff) | |
download | openttd-f5681547efc060ab0cc47c36316c4f2aa1217948.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.cpp | 8 |
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) |