90 return new UIPanel(pData, pszDir);
152 virtual void Enter(
bool bForce,
float fTime);
164 virtual void Exit(
bool bForce,
float fTime);
204 virtual void Poll(
float fTime);
399 static float sEnterStartFrame;
407 static float sEnterStopFrame;
415 static float sExitStartFrame;
423 static float sExitStopFrame;
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
Mix-in for an object driven by a frame.
Definition rndanimatable.h:16
Loader of one .rnd file, which reads the file over several frames.
Definition rndloader.h:21
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
Ordering of C strings by their text, for maps keyed by name.
Definition strless.h:10
Growable text buffer that is also a PrnStream.
Definition string.h:19
One control of a front-end panel, such as a label, a button, or a list.
Definition uicomponent.h:21
float mExitMs
Definition uipanel.h:363
RndAnimatable * mEnterExitAnim
Definition uipanel.h:353
UIPanel(DataArray *pData, const char *pszDir)
Construct a hidden panel from its script description.
~UIPanel() override
Destroy the panel, its components, and the objects its file loaded.
std::unique_ptr< UINavigator > mNavigator
Definition uipanel.h:383
RndView * mView
Definition uipanel.h:345
virtual void Focus()
React to the screen giving the panel the focus by letting the navigator move the focus.
int mLoadRefs
Definition uipanel.h:373
void SetTextsShowing(bool bShowing)
Show or hide every text object of the panel's file.
virtual void Draw()
Draw the panel's view once it has loaded, unless the panel is hidden.
UIComponent * FindComponent(const char *pszName, bool bFail)
Find a component by name.
bool Dispatch(Message *pMsg) override
Offer a message to the current screen, the panel, the navigator, and the component with the focus.
float GetTransitionStart() const
Definition uipanel.h:325
std::unique_ptr< RndLoader > mOwnedLoader
The loader the panel created, or null when it has none or uses a shared one.
Definition uipanel.h:390
DataArray * mData
Definition uipanel.h:377
void LocalizeTexts(const char *pszFile, std::list< RndObject * > &objects)
Collect and localise the text objects of the panel's file.
const char * GetName() const
Definition uipanel.h:310
void AddComponent(UIComponent *pComponent)
Register a component under its name.
virtual void Poll(float fTime)
Advance the panel's animations and its components to a time.
virtual void Exit(bool bForce, float fTime)
Start the exit animation.
float mEnterMs
Definition uipanel.h:361
virtual void SetShowing(bool bShowing)
Show or hide the panel's view.
RndLoader * mLoader
Definition uipanel.h:387
float mHiddenFrame
Definition uipanel.h:359
virtual void SetFocus(UIComponent *pComponent, int nButton)
Move the focus to a component.
std::list< RndText * > mTexts
Definition uipanel.h:379
int GetState() const
Definition uipanel.h:320
static void Init(DataArray *pConfig)
Read the default frames of the entry and exit animation.
float ComputeFrame(float fTime)
Report the frame of the entry and exit animation at a time.
const char * mName
Definition uipanel.h:339
const std::map< const char *, std::unique_ptr< UIComponent >, StrLess > & GetComponents() const
Definition uipanel.h:330
int mEnterReversed
Definition uipanel.h:365
UIComponent * mFocus
Definition uipanel.h:385
static UIPanel * New(DataArray *pData, const char *pszDir)
Create a panel from its script description.
Definition uipanel.h:89
float mExitStartFrame
Definition uipanel.h:371
virtual void Enter(bool bForce, float fTime)
Start the entry animation.
const char * mFocusName
Definition uipanel.h:347
int mState
Definition uipanel.h:343
bool DispatchPriv(Message *pMsg) override
Handle a message sent to the panel.
virtual void Unfocus()
React to the screen taking the focus away.
Definition uipanel.h:182
virtual void FinishLoad()
Find the loaded objects and create the components once the panel's file has loaded.
std::map< const char *, std::unique_ptr< UIComponent >, StrLess > mComponents
Definition uipanel.h:381
String mFile
Definition uipanel.h:341
int mLoaded
Definition uipanel.h:375
virtual void DrawGizmo()
Draw what goes under the panel.
Definition uipanel.h:194
RndAnimatable * mLoopAnim
Definition uipanel.h:351
virtual void Load()
Take a reference to the panel's file, queueing the file on the first reference.
float mEnterStartFrame
Definition uipanel.h:369
int mExitReversed
Definition uipanel.h:367
bool IsLoaded()
Report whether the panel's file has loaded, finishing the load when it has.
float mIdleFrame
Definition uipanel.h:337
float mTransitionStart
Definition uipanel.h:355
float mLoopStart
Definition uipanel.h:349
State
Where the panel is in its entry and exit, the values of mState.
Definition uipanel.h:38
@ kStateExiting
Definition uipanel.h:42
@ kStateEntering
Definition uipanel.h:41
@ kStateHidden
Definition uipanel.h:40
@ kStateShown
Definition uipanel.h:39
float mShownFrame
Definition uipanel.h:357
float mFrame
Definition uipanel.h:335
UIComponent * GetFocus() const
Definition uipanel.h:315
virtual void Unload()
Drop a reference to the panel's file, destroying the components and the loader on the last reference.