diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-11-08 09:19:46 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-11-08 09:19:46 +0000 |
| commit | a6bcd74120389a33115afb311f38e7f5b736f805 (patch) | |
| tree | be81b08fc4d77a54b2e2bf632acd8b3d8069d399 /src/game | |
| parent | cd1c92c41b38350d832b163be27274efdde597d6 (diff) | |
| download | zcatch-a6bcd74120389a33115afb311f38e7f5b736f805.tar.gz zcatch-a6bcd74120389a33115afb311f38e7f5b736f805.zip | |
solved #559
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/client/components/menus.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 4889e498..7da4f5d4 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -440,11 +440,12 @@ float MENUS::ui_do_scrollbar_h(const void *id, const RECT *rect, float current) int MENUS::ui_do_key_reader(void *id, const RECT *rect, int key) { // process + static void *grabbed_id = 0; static bool mouse_released = true; int inside = ui_mouse_inside(rect); int new_key = key; - if(!ui_mouse_button(0)) + if(!ui_mouse_button(0) && grabbed_id == id) mouse_released = true; if(ui_active_item() == id) @@ -455,6 +456,7 @@ int MENUS::ui_do_key_reader(void *id, const RECT *rect, int key) binder.got_key = false; ui_set_active_item(0); mouse_released = false; + grabbed_id = id; } } else if(ui_hot_item() == id) |