From 1a7ba9751f90c653da1b37d96134e584b6779046 Mon Sep 17 00:00:00 2001 From: that Date: Sun, 1 Feb 2015 19:48:19 +0100 Subject: gui: simplify code in GUIKeyboard - merge duplicated code into new ParseKey method - convert some unsigned int to int to avoid warnings - add local variable for current key in NotifyTouch to reduce clutter Change-Id: I98ddbaca50d487c97ab6e98938df91ef03b9aed5 --- gui/objects.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gui/objects.hpp') diff --git a/gui/objects.hpp b/gui/objects.hpp index 1d20c2abe..3e335615e 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -899,9 +899,10 @@ protected: { unsigned char key; unsigned char longpresskey; - unsigned int end_x; - unsigned int layout; + int end_x; + int layout; }; + int ParseKey(const char* keyinfo, keyboard_key_class& key, int& Xindex, int keyWidth, bool longpress); struct capslock_tracking_struct { int capslock; @@ -914,9 +915,8 @@ protected: struct capslock_tracking_struct caps_tracking[MAX_KEYBOARD_LAYOUTS]; bool mRendered; std::string mVariable; - unsigned int cursorLocation; - unsigned int currentLayout; - unsigned int row_heights[MAX_KEYBOARD_LAYOUTS][MAX_KEYBOARD_ROWS]; + int currentLayout; + int row_heights[MAX_KEYBOARD_LAYOUTS][MAX_KEYBOARD_ROWS]; unsigned int KeyboardWidth, KeyboardHeight; int rowY, colX, highlightRenderCount, hasHighlight, hasCapsHighlight; GUIAction* mAction; -- cgit v1.2.3