summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-24 13:32:18 +0000
committerrubidium <rubidium@openttd.org>2009-02-24 13:32:18 +0000
commit8fa247c4b15a70e0d03e8af10fa6ef5d59e0793e (patch)
tree094a744598f0775e548cbe8df4e5c64779950f47
parent4bf2f4a1663d7e8bae6688e61cfc846cae867f64 (diff)
downloadopenttd-8fa247c4b15a70e0d03e8af10fa6ef5d59e0793e.tar.xz
(svn r15566) -Change: reintroduce space as valid method of selecting 'content' as long as the filter box is not focused. Enter will also work when the filter box is focused.
-rw-r--r--src/network/network_content_gui.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 54d190f20..a2be8557d 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -625,13 +625,17 @@ public:
this->list_pos = this->content.Length() - 1;
break;
+ case WKC_SPACE:
case WKC_RETURN:
- if (this->selected != NULL) {
- _network_content_client.ToggleSelectedState(this->selected);
- this->content.ForceResort();
- this->SetDirty();
+ if (keycode == WKC_RETURN || !IsWidgetFocused(NCLWW_FILTER)) {
+ if (this->selected != NULL) {
+ _network_content_client.ToggleSelectedState(this->selected);
+ this->content.ForceResort();
+ this->SetDirty();
+ }
+ return ES_HANDLED;
}
- return ES_HANDLED;
+ /* Fall through when pressing space is pressed and filter isn't focused */
default: {
/* Handle editbox input */