wavelength 1.0.0
Loading...
Searching...
No Matches
setupnamescreen.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/freqscreen.h"
4#include "met/keyboarduser.h"
6#include "os/string.h"
7#include "script/dataarray.h"
8#include "ui/uitextentry.h"
10
16class SetupNameScreen : public FreqScreen, public KeyboardUser {
17public:
25 explicit SetupNameScreen(DataArray *pData);
26
33 ~SetupNameScreen() override {
34 }
35
44 bool DispatchPriv(Message *pMsg) override;
45
54 void Enter(UIScreen *pPrevScreen, float fTime) override;
55
64 int ReceiveKeyboardText(const char *pszText) override;
65
73 virtual void SetText(const char *pszText) {
74 mText = pszText;
75 }
76
85 virtual void Submit() {
86 }
87
88protected:
91
92private:
103 bool HandleJoypad(JoypadInputMsg *pMsg);
104
115 bool HandleTextEntryComplete(UITextEntryCompleteMsg *pMsg);
116};
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
Mix-in for a screen that receives the text the player types on the front-end keyboard.
Definition keyboarduser.h:9
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
virtual void SetText(const char *pszText)
Set the text the name entry shows on the next entry of the screen.
Definition setupnamescreen.h:73
int ReceiveKeyboardText(const char *pszText) override
Take the text the keyboard typed.
String mText
Definition setupnamescreen.h:89
bool DispatchPriv(Message *pMsg) override
Route the controller and the end of the entry.
~SetupNameScreen() override
Release the screen.
Definition setupnamescreen.h:33
void Enter(UIScreen *pPrevScreen, float fTime) override
Enter, fill the name entry with the text, and edit it.
SetupNameScreen(DataArray *pData)
Construct a screen with no text.
virtual void Submit()
Submit the name.
Definition setupnamescreen.h:85
UITextEntry * mEntry
Definition setupnamescreen.h:90
Growable text buffer that is also a PrnStream.
Definition string.h:19
UIScreen(DataArray *pData)
Construct a screen from its script description.
Message a text entry sends when the player confirms the text.
Definition uitextentrycompletemsg.h:25
Field the player types text into from a USB keyboard or the on-screen keyboard.
Definition uitextentry.h:27