libgui 3.00
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
9#include "libgui/Gui.h"
10
11constexpr int KB_ROWS = 4;
12constexpr int KB_COLUMNS = 11;
13
14#define MAX_KEYBOARD_DISPLAY 32
15
17typedef struct _keytype {
18 char ch;
19 char chShift;
20} Key;
21
24class GuiKeyboard : public GuiWindow
25{
26 public:
29 GuiKeyboard(char * t, uint32_t m);
31 void update(InputController * c);
32 char kbtextstr[256] = {};
33 protected:
35 uint32_t kbtextmaxlen;
36 int shift;
37 int caps;
38 GuiText * kbText;
39 GuiImage * keyTextboxImg;
40 GuiText * keyCapsText;
41 GuiImage * keyCapsImg;
42 GuiImage * keyCapsOverImg;
43 GuiButton * keyCaps;
44 GuiText * keyShiftText;
45 GuiImage * keyShiftImg;
46 GuiImage * keyShiftOverImg;
47 GuiButton * keyShift;
48 GuiText * keyBackText;
49 GuiImage * keyBackImg;
50 GuiImage * keyBackOverImg;
51 GuiButton * keyBack;
52 GuiImage * keySpaceImg;
53 GuiImage * keySpaceOverImg;
54 GuiButton * keySpace;
55 GuiButton * keyBtn[KB_ROWS][KB_COLUMNS];
56 GuiImage * keyImg[KB_ROWS][KB_COLUMNS];
57 GuiImage * keyImgOver[KB_ROWS][KB_COLUMNS];
58 GuiText * keyTxt[KB_ROWS][KB_COLUMNS];
59 GuiImageData * keyTextbox;
60 GuiImageData * key;
61 GuiImageData * keyOver;
62 GuiImageData * keyMedium;
63 GuiImageData * keyMediumOver;
64 GuiImageData * keyLarge;
65 GuiImageData * keyLargeOver;
66 GuiTrigger * trigA;
67 Key keys[KB_ROWS][KB_COLUMNS];
69};
Umbrella header for the platform-agnostic libgui core.
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:32
void update(InputController *c)
Called constantly to allow the element to respond to the current input data.
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:17
char chShift
Character produced while shift/caps is active.
Definition GuiKeyboard.h:19
char ch
Unshifted character.
Definition GuiKeyboard.h:18