107 virtual const char *
Text()
const;
139 virtual void SetState(
int nState, [[maybe_unused]]
bool bForce) {
174 virtual void Poll([[maybe_unused]]
float fTime) {
Reference-counted array of script data nodes.
Definition dataarray.h:20
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Receiver of engine messages.
Definition msgsink.h:21
Text output stream.
Definition prnstream.h:16
int mState
Definition uicomponent.h:197
virtual void SetText(const char *pszText)
Replace the text the component shows.
virtual void SetShowing(bool bShowing)
Show or hide the component.
Definition uicomponent.h:96
int GetShowing() const
Definition uicomponent.h:190
virtual int GetState() const
Report the state the component shows.
Definition uicomponent.h:127
virtual void SetState(int nState, bool bForce)
Change the state the component shows.
Definition uicomponent.h:139
virtual bool IsShowing() const
Report whether the component is showing.
Definition uicomponent.h:85
static int sNumFlashes
Number of times a chosen button flashes before it reports the choice.
Definition uicomponent.h:204
State
The state a component shows, the values of mState and the index UIStyle selects with.
Definition uicomponent.h:24
@ kStateDisabled
Definition uicomponent.h:27
@ kStateSelected
Definition uicomponent.h:26
@ kStateNormal
Definition uicomponent.h:25
UIComponent(DataArray *pData)
Construct a showing component in the normal state.
Definition uicomponent.h:37
static void Init(DataArray *pConfig)
Read the parameters of the flash a button shows when it is chosen.
virtual void Unfocus()
React to the panel taking the focus away.
Definition uicomponent.h:162
const char * mName
Definition uicomponent.h:195
virtual void Poll(float fTime)
Advance the component to a time.
Definition uicomponent.h:174
virtual void Print(PrnStream &stream)=0
Write a description of the component.
const char * GetName() const
Definition uicomponent.h:185
virtual const char * Text() const
Report the text the component shows.
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.
static float sSelectedMs
Milliseconds of each flash a chosen button spends in the selected state.
Definition uicomponent.h:212
int mShowing
Definition uicomponent.h:196
virtual void Focus()
React to the panel giving the component the focus.
Definition uicomponent.h:151
static float sNormalMs
Milliseconds of each flash a chosen button spends in the normal state.
Definition uicomponent.h:220