Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
|
|
|
65 | 65 | { |
66 | 66 | InReaction ret = IN_PASS; |
67 | 67 | |
68 | | if (ev->ev.type == SDL_HOTKEYDOWN) |
| 68 | // Handle keys for input boxes |
| 69 | if (GetFocusedObject()) |
69 | 70 | { |
| 71 | if ( |
| 72 | (ev->ev.type == SDL_KEYDOWN && |
| 73 | ev->ev.key.keysym.sym != SDLK_ESCAPE && |
| 74 | !g_keys[SDLK_LCTRL] && !g_keys[SDLK_RCTRL] && |
| 75 | !g_keys[SDLK_LALT] && !g_keys[SDLK_RALT]) |
| 76 | || ev->ev.type == SDL_HOTKEYDOWN |
| 77 | || ev->ev.type == SDL_TEXTINPUT || ev->ev.type == SDL_TEXTEDITING |
| 78 | ) |
| 79 | { |
| 80 | ret = GetFocusedObject()->ManuallyHandleEvent(ev); |
| 81 | } |
| 82 | // else will return IN_PASS because we never used the button. |
| 83 | } |
| 84 | |
| 85 | else if (ev->ev.type == SDL_HOTKEYUP) |
| 86 | { |
70 | 87 | const char* hotkey = static_cast<const char*>(ev->ev.user.data1); |
71 | 88 | std::map<CStr, std::vector<IGUIObject*> >::iterator it = m_HotkeyObjects.find(hotkey); |
72 | 89 | if (it != m_HotkeyObjects.end()) |
… |
… |
|
243 | 260 | m_MousePos = oldMousePos; |
244 | 261 | } |
245 | 262 | |
246 | | // Handle keys for input boxes |
247 | | if (GetFocusedObject()) |
248 | | { |
249 | | if ( |
250 | | (ev->ev.type == SDL_KEYDOWN && |
251 | | ev->ev.key.keysym.sym != SDLK_ESCAPE && |
252 | | !g_keys[SDLK_LCTRL] && !g_keys[SDLK_RCTRL] && |
253 | | !g_keys[SDLK_LALT] && !g_keys[SDLK_RALT]) |
254 | | || ev->ev.type == SDL_HOTKEYDOWN |
255 | | || ev->ev.type == SDL_TEXTINPUT || ev->ev.type == SDL_TEXTEDITING |
256 | | ) |
257 | | { |
258 | | ret = GetFocusedObject()->ManuallyHandleEvent(ev); |
259 | | } |
260 | | // else will return IN_PASS because we never used the button. |
261 | | } |
| 263 | |
262 | 264 | |
263 | 265 | return ret; |
264 | 266 | } |