summaryrefslogtreecommitdiffstats
path: root/gui/objects.hpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-05-23 20:44:12 +0200
committerDees Troy <dees_troy@teamw.in>2015-06-20 22:35:39 +0200
commitf256b722f427275e7d149aab2bad301fc6e04d49 (patch)
tree8fcf042f7bfa2dbd6e58e1656507ce724eb69c22 /gui/objects.hpp
parentFix mass storage in recovery (diff)
downloadandroid_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.tar
android_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.tar.gz
android_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.tar.bz2
android_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.tar.lz
android_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.tar.xz
android_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.tar.zst
android_bootable_recovery-f256b722f427275e7d149aab2bad301fc6e04d49.zip
Diffstat (limited to 'gui/objects.hpp')
-rw-r--r--gui/objects.hpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/gui/objects.hpp b/gui/objects.hpp
index 1991877ee..881b39050 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -852,6 +852,7 @@ protected:
int layout;
};
int ParseKey(const char* keyinfo, Key& key, int& Xindex, int keyWidth, bool longpress);
+ void LoadKeyLabels(xml_node<>* parent, int layout);
enum {
MAX_KEYBOARD_LAYOUTS = 5,
@@ -868,6 +869,16 @@ protected:
};
Layout layouts[MAX_KEYBOARD_LAYOUTS];
+ struct KeyLabel
+ {
+ unsigned char key; // same as in struct Key
+ int layout_from; // 1-based; 0 for labels that apply to all layouts
+ int layout_to; // same as Key.layout
+ string text; // key label text
+ ImageResource* image; // image (overrides text if defined)
+ };
+ std::vector<KeyLabel> mKeyLabels;
+
// Find key at screen coordinates
Key* HitTestKey(int x, int y);
@@ -875,11 +886,20 @@ protected:
std::string mVariable;
int currentLayout;
bool CapsLockOn;
- unsigned int KeyboardWidth, KeyboardHeight;
int rowY, colX, highlightRenderCount;
bool hasHighlight, hasCapsHighlight;
COLOR mHighlightColor;
COLOR mCapsHighlightColor;
+ COLOR mFontColor; // for centered key labels
+ COLOR mFontColorSmall; // for centered key labels
+ FontResource* mFont; // for main key labels
+ FontResource* mSmallFont; // for key labels like "?123"
+ FontResource* mLongpressFont; // for the small longpress label in the upper right corner
+ COLOR mLongpressFontColor;
+ COLOR mBackgroundColor; // keyboard background color
+ COLOR mKeyColorAlphanumeric; // key background color
+ COLOR mKeyColorOther; // key background color
+ int mKeyMarginX, mKeyMarginY; // space around key boxes - applied to left/right and top/bottom
};
// GUIInput - Used for keyboard input