wavelength 1.0.0
Loading...
Searching...
No Matches
keyboardkey.h
Go to the documentation of this file.
1#pragma once
2
4#include "script/dataarray.h"
5#include "ui/uibutton.h"
6
15class KeyboardKey : public UIButton {
16public:
25 KeyboardKey(DataArray *pData, const char *pszPanel);
26
33 ~KeyboardKey() override;
34
46 static UIComponent *New(DataArray *pData, const char *pszPanel) {
47 return new KeyboardKey(pData, pszPanel);
48 }
49
58 bool DispatchPriv(Message *pMsg) override;
59
71
79 void Flash();
80
87 static int sNumFlashes;
88
95 static float sSelectedMs;
96
103 static float sNormalMs;
104};
Reference-counted array of script data nodes.
Definition dataarray.h:20
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
bool HandleJoypad(JoypadInputMsg *pMsg)
Report the choice as the cross button goes down, and flash once when no sink handled it.
static int sNumFlashes
Number of flashes of a chosen key.
Definition keyboardkey.h:87
static float sSelectedMs
Milliseconds of each flash a chosen key spends in the selected state.
Definition keyboardkey.h:95
bool DispatchPriv(Message *pMsg) override
Route controller buttons, and pass every other message to UIButton.
~KeyboardKey() override
Destroy the key.
KeyboardKey(DataArray *pData, const char *pszPanel)
Construct a key from its script description.
static float sNormalMs
Milliseconds of each flash a chosen key spends in the normal state.
Definition keyboardkey.h:103
static UIComponent * New(DataArray *pData, const char *pszPanel)
Create a key from its script description.
Definition keyboardkey.h:46
void Flash()
Flash once, as when the key is chosen.
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
UIButton(DataArray *pData, const char *pszPanel)
Construct a button from its script description.
UIComponent(DataArray *pData)
Construct a showing component in the normal state.
Definition uicomponent.h:37