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
11
constexpr
int
KB_ROWS = 4;
12
constexpr
int
KB_COLUMNS = 11;
13
14
#define MAX_KEYBOARD_DISPLAY 32
15
17
typedef
struct
_keytype
{
18
char
ch
;
19
char
chShift
;
20
} Key;
21
24
class
GuiKeyboard
:
public
GuiWindow
25
{
26
public
:
29
GuiKeyboard
(
char
* t, uint32_t m);
30
~GuiKeyboard
();
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
};
Gui.h
Umbrella header for the platform-agnostic libgui core.
GuiButton
Display, manage, and manipulate buttons in the GUI.
Definition
GuiButton.h:13
GuiImageData
Decodes compressed image data (PNG) into a platform-native texture created from it.
Definition
GuiImageData.h:17
GuiImage
Display, manage, and manipulate images in the GUI.
Definition
GuiImage.h:18
GuiKeyboard::GuiKeyboard
GuiKeyboard(char *t, uint32_t m)
Definition
GuiKeyboard.cpp:26
GuiKeyboard::kbtextstr
char kbtextstr[256]
Current entered text - read this after the keyboard closes.
Definition
GuiKeyboard.h:32
GuiKeyboard::update
void update(InputController *c)
Called constantly to allow the element to respond to the current input data.
Definition
GuiKeyboard.cpp:234
GuiText
Display, manage, and manipulate text in the GUI.
Definition
GuiText.h:10
GuiTrigger
Input-condition matcher attached to a GuiElement (via setSimpleTrigger() etc.) and evaluated against ...
Definition
GuiTrigger.h:34
GuiWindow::GuiWindow
GuiWindow()
Constructor.
Definition
GuiWindow.cpp:9
InputController
Logical controller for one input channel.
Definition
InputController.h:16
_keytype
Unshifted/shifted character pair for a single keyboard key.
Definition
GuiKeyboard.h:17
_keytype::chShift
char chShift
Character produced while shift/caps is active.
Definition
GuiKeyboard.h:19
_keytype::ch
char ch
Unshifted character.
Definition
GuiKeyboard.h:18
source
widgets
GuiKeyboard.h
Generated by
1.13.2