libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
GuiKeyboard.h
1/****************************************************************************
2 * libgui
3 *
4 * Daryl Borth 2009-2026
5 * GuiKeyboard.h
6 ***************************************************************************/
7#pragma once
8
9constexpr int KB_ROWS = 4;
10constexpr int KB_COLUMNS = 11;
11
12#define MAX_KEYBOARD_DISPLAY 32
13
15typedef struct _keytype {
16 char ch;
17 char chShift;
18} Key;
19
22class GuiKeyboard : public GuiWindow
23{
24 public:
27 GuiKeyboard(char * t, uint32_t m);
29 void update(InputController * c);
30 char kbtextstr[256];
31 protected:
33 uint32_t kbtextmaxlen;
34 int shift;
35 int caps;
36 GuiText * kbText;
37 GuiImage * keyTextboxImg;
38 GuiText * keyCapsText;
39 GuiImage * keyCapsImg;
40 GuiImage * keyCapsOverImg;
41 GuiButton * keyCaps;
42 GuiText * keyShiftText;
43 GuiImage * keyShiftImg;
44 GuiImage * keyShiftOverImg;
45 GuiButton * keyShift;
46 GuiText * keyBackText;
47 GuiImage * keyBackImg;
48 GuiImage * keyBackOverImg;
49 GuiButton * keyBack;
50 GuiImage * keySpaceImg;
51 GuiImage * keySpaceOverImg;
52 GuiButton * keySpace;
53 GuiButton * keyBtn[KB_ROWS][KB_COLUMNS];
54 GuiImage * keyImg[KB_ROWS][KB_COLUMNS];
55 GuiImage * keyImgOver[KB_ROWS][KB_COLUMNS];
56 GuiText * keyTxt[KB_ROWS][KB_COLUMNS];
57 GuiImageData * keyTextbox;
58 GuiImageData * key;
59 GuiImageData * keyOver;
60 GuiImageData * keyMedium;
61 GuiImageData * keyMediumOver;
62 GuiImageData * keyLarge;
63 GuiImageData * keyLargeOver;
64 GuiSound * keySoundOver;
65 GuiSound * keySoundClick;
66 GuiTrigger * trigA;
67 Key keys[KB_ROWS][KB_COLUMNS];
69};
Display, manage, and manipulate buttons in the GUI.
Definition GuiButton.h:13
Decodes compressed image data (PNG) into a platform-native texture created from it.
Display, manage, and manipulate images in the GUI.
Definition GuiImage.h:18
GuiKeyboard(char *t, uint32_t m)
char kbtextstr[256]
Current entered text - read this after the keyboard closes.
Definition GuiKeyboard.h:30
void update(InputController *c)
Called constantly to allow the element to respond to the current input data.
Sound conversion and playback.
Definition GuiSound.h:27
Display, manage, and manipulate text in the GUI.
Definition GuiText.h:10
Input-condition matcher attached to a GuiElement (via setSimpleTrigger() etc.) and evaluated against ...
Definition GuiTrigger.h:34
GuiWindow()
Constructor.
Definition GuiWindow.cpp:9
Logical controller for one input channel.
Unshifted/shifted character pair for a single keyboard key.
Definition GuiKeyboard.h:15
char chShift
Character produced while shift/caps is active.
Definition GuiKeyboard.h:17
char ch
Unshifted character.
Definition GuiKeyboard.h:16