|
wavelength 1.0.0
|
Key of the front-end keyboard. More...
#include <keyboardkey.h>


Public Member Functions | |
| KeyboardKey (DataArray *pData, const char *pszPanel) | |
| Construct a key from its script description. | |
| ~KeyboardKey () override | |
| Destroy the key. | |
| bool | DispatchPriv (Message *pMsg) override |
| Route controller buttons, and pass every other message to UIButton. | |
| bool | HandleJoypad (JoypadInputMsg *pMsg) |
| Report the choice as the cross button goes down, and flash once when no sink handled it. | |
| void | Flash () |
| Flash once, as when the key is chosen. | |
| Public Member Functions inherited from UIButton | |
| UIButton (DataArray *pData, const char *pszPanel) | |
| Construct a button from its script description. | |
| ~UIButton () override | |
| Destroy the button. | |
| bool | DispatchPriv (Message *pMsg) override |
| Handle a controller button, or pass any other message to UIComponent. | |
| void | SetShowing (bool bShowing) override |
| Show or hide the button, its text, and its mesh. | |
| const char * | Text () const override |
| Report the text of the text object. | |
| void | SetText (const char *pszText) override |
| Replace the text of the text object. | |
| void | SetState (int nState, bool bForce) override |
| Change the state and give the mesh and the text the material and the font the style lists for it. | |
| void | Unfocus () override |
| Stop a flash that runs and return to the state from before it. | |
| void | Poll (float fTime) override |
| Advance the flash to a time, and send the UIComponentSelectMsg once it ends. | |
| void | Print (PrnStream &stream) override |
| Write the name, the visibility, the state, and the flash. | |
| virtual void | StartFlash (float fTime, int nFlashes, int nSelectedState, int nNormalState, float fSelectedMs, float fNormalMs) |
| Start a flash between two states. | |
| void | SetStyle (UIStyle *pStyle) |
| Replace the style and apply the current state again. | |
| bool | HandleSelect (JoypadInputMsg *pMsg) |
| Start the flash when the cross button goes down. | |
| UIStyle * | GetStyle () const |
| Public Member Functions inherited from UIComponent | |
| UIComponent (DataArray *pData) | |
| Construct a showing component in the normal state. | |
| bool | Dispatch (Message *pMsg) override |
| Offer a message to the focused panel of the current screen, then handle it here. | |
| bool | DispatchPriv (Message *pMsg) override |
| Handle a message sent to the component. | |
| virtual bool | IsShowing () const |
| Report whether the component is showing. | |
| virtual int | GetState () const |
| Report the state the component shows. | |
| virtual void | Focus () |
| React to the panel giving the component the focus. | |
| const char * | GetName () const |
| int | GetShowing () const |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the pool heaps under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Return a sink to the pool heaps. | |
| virtual | ~MsgSink () |
| void * | operator new (size_t size) |
| Allocate from the main heap under the name MsgSink. | |
| void | operator delete (void *mem) |
| Return memory to its heap. | |
| virtual | ~MsgSink () |
| Destroy the sink. | |
Static Public Member Functions | |
| static UIComponent * | New (DataArray *pData, const char *pszPanel) |
| Create a key from its script description. | |
| Static Public Member Functions inherited from UIButton | |
| static UIComponent * | New (DataArray *pData, const char *pszPanel) |
| Create a button from its script description. | |
| Static Public Member Functions inherited from UIComponent | |
| static void | Init (DataArray *pConfig) |
| Read the parameters of the flash a button shows when it is chosen. | |
Static Public Attributes | |
| static int | sNumFlashes |
| Number of flashes of a chosen key. | |
| static float | sSelectedMs |
| Milliseconds of each flash a chosen key spends in the selected state. | |
| static float | sNormalMs |
| Milliseconds of each flash a chosen key spends in the normal state. | |
Additional Inherited Members | |
| Public Types inherited from UIComponent | |
| enum | State { kStateNormal = 0 , kStateSelected = 1 , kStateDisabled = 2 } |
| The state a component shows, the values of mState and the index UIStyle selects with. More... | |
| Protected Attributes inherited from UIButton | |
| int | mFlashDone |
| float | mFlashStart |
| float | mFlashPeriod |
| float | mSelectedMs |
| float | mNormalMs |
| float | mFlashEnd |
| int | mNormalState |
| int | mSelectedState |
| int | mRevertState |
| RndMesh * | mMesh |
| RndText * | mText |
| UIStyle * | mStyle |
| Protected Attributes inherited from UIComponent | |
| const char * | mName |
| int | mShowing |
| int | mState |
| Static Protected Attributes inherited from UIComponent | |
| static int | sNumFlashes |
| Number of times a chosen button flashes before it reports the choice. | |
| static float | sSelectedMs |
| Milliseconds of each flash a chosen button spends in the selected state. | |
| static float | sNormalMs |
| Milliseconds of each flash a chosen button spends in the normal state. | |
Key of the front-end keyboard.
The RTTI records the class as deriving from UIButton. The object is 0x40 bytes and its vtable is at 0x003d03f8. The metagame registers the class for the component type key_comp. Unlike a button, a key reports its choice as soon as the cross button goes down and flashes once afterwards.
| KeyboardKey::KeyboardKey | ( | DataArray * | pData, |
| const char * | pszPanel ) |
Construct a key from its script description.
| pData | The script description. |
| pszPanel | The name of the panel the key belongs to. |
|
override |
Destroy the key.
|
inlinestatic |
Create a key from its script description.
The metagame registers the routine for the component type key_comp.
| pData | The script description. |
| pszPanel | The name of the panel the key belongs to. |
|
overridevirtual |
| bool KeyboardKey::HandleJoypad | ( | JoypadInputMsg * | pMsg | ) |
Report the choice as the cross button goes down, and flash once when no sink handled it.
The key must not be flashing already.
| pMsg | The message. |
| void KeyboardKey::Flash | ( | ) |
Flash once, as when the key is chosen.
KeyboardPanel flashes the key a controller button stands for.
|
static |
Number of flashes of a chosen key.
|
static |
Milliseconds of each flash a chosen key spends in the selected state.
|
static |
Milliseconds of each flash a chosen key spends in the normal state.