248 const HxStr &directory,
1020 float mExitStartTime;
1052 HxStr mContainerFile;
1070 std::list<Rnd::Drawable *> mUnusedDrawables;
1099 int mIdleWhileAnimating;
1123 float mRepeatNextTime;
1128 float mRepeatInterval;
1131 HxStr mContainerName;
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
Base of every front-end screen.
Definition metscreen.h:212
void ResolveAnimationViews()
Resolves the two animation views from the screen name and records the enter animation's end frame.
int mAcceptsCommands
Definition metscreen.h:1048
virtual void HandleCommand(const MetScreenCommand *pCommand)
Act on a navigation command.
Rnd::View * mEnterAnim
Definition metscreen.h:1057
virtual void UpdateRepeatingSound(float flTime)
Advance the alternation that StartRepeatingSound() started.
static std::map< HxStr, MetContainerLoad * > & ContainerLoaderMap()
Shared table of container loads, interned under the container name.
virtual void UpdateExitAnimation(float flTime)
Drive the exit animation and hide the screen once it passes its end.
MetScreen(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct a screen and start its container load.
virtual void ResolveContainerViews()
Resolve the three views the container produced and hide the screen.
float mAnimEndFrame
Definition metscreen.h:1011
virtual void PlayErrorSound(int nSelector)
Play the sound that accompanies a rejected input.
virtual void OnDestroying()
Release what the screen acquired, ahead of the rest of destruction.
virtual void SetShowing(int nShowing)
Show or hide the view and every drawable the container loaded.
static void CreateMainMenuScreens(MetRenderer *pRenderer)
Create the main-menu screens.
Rnd::View * mView
The container's root view.
Definition metscreen.h:1035
static std::map< HxStr, MetScreenEntry > & ScreenRegistry()
Shared table of live screens, interned under the screen registry key.
int mEnterPending
Set when the screen was pushed before its container load finished.
Definition metscreen.h:1086
virtual void ExitScreenByName(const HxStr &name)
Start one named screen's exit animation.
virtual void StartRepeatingSound(float flStartTime, float flInterval, Rnd::Button *pButton, int nCycles)
Start alternating one button between its states 2 and 1.
static void CreateFrontEndScreens(MetRenderer *pRenderer)
Create every remaining front-end screen, once.
static void DestroyNonDefaultScreens()
Delete and unregister every screen outside category 0, then rewind the rndMetLocAndNet zone.
virtual void OnRepeatingSoundFinished(Rnd::Button *pButton)
Act on the alternation that StartRepeatingSound() started having finished.
static void DestroyCategory1Screens()
Delete and unregister every screen in category 1.
virtual void UpdateIdle(float flTime)
Advance whatever the screen updates once per frame while it is idle.
virtual void PlayCycleRightSound(int nSelector)
Play the sound that accompanies cycling a value to the right.
virtual void OnEnterFinished()
Act on the enter animation having finished.
virtual void UpdateIdleAnimation(float flTime)
Advance whatever the screen animates while it is neither entering nor exiting.
virtual void ActivateNamedPanel(const HxStr &name)
Make one named screen the renderer's active panel.
int mViewsUnresolved
Definition metscreen.h:1075
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Act on the choice the user made in a message dialogue.
virtual void OnKeyboardDismissed()
Take control back after the keyboard screen has finished.
virtual void StartExitAnimation(float flTime)
Record the time the exit animation starts at.
virtual void PlayLeaveSound(int nSelector)
Play the sound that accompanies departing a screen.
virtual void BeginExit()
Start this screen's exit animation at the renderer's current time.
static void CreateStartupScreens(MetRenderer *pRenderer)
Create the four screens the front end needs before its containers have loaded.
static void DestroyAllScreens()
Delete every registered screen and release every container loader.
virtual void OnDrawPass()
Contribute to the renderer's draw pass.
static void DestroyCategory2Screens()
Delete and unregister every screen in category 2.
virtual void OnExitFinished()
Act on the exit animation having finished.
void DeliverCommand(const MetScreenCommand *pCommand)
Play the sound one navigation command calls for and then act on the command.
virtual void UpdateEnterAnimation(float flTime)
Drive the enter animation and finish it once it passes its end.
MetRenderer * mRenderer
Definition metscreen.h:1025
virtual void StartEnterAnimation(float flTime)
Rewind the enter animation and record the time it starts at.
std::vector< HxStr > mHelpKeys
Definition metscreen.h:1066
virtual void OnUnusedHook()
Do nothing.
virtual ~MetScreen()
Unregister from the renderer and release the container.
virtual int PollContainerLoad()
Advance this screen's container load and resolve its views once the load finishes.
static MetScreen * FindScreenByName(const HxStr &name)
Resolve one screen by its registry key.
virtual void PlayCycleLeftSound(int nSelector)
Play the sound that accompanies cycling a value to the left.
float mEnterStartTime
Definition metscreen.h:1016
virtual void DispatchPriv(Message *pMsg)
Act on a message.
virtual void PlayHighSound(int nSelector)
Play the sound that accompanies the emphasised selection.
int mPlaysCommandSounds
Definition metscreen.h:1116
static void PollContainerLoads()
Poll every container load that has not finished, and hide the drawables of each that does.
virtual void Draw()
Draw the view.
int mShowsLoadedDrawables
Definition metscreen.h:1119
virtual void OnPanelActivated()
Act on this screen having become the renderer's active panel.
float mRepeatScale
Scale on the input auto-repeat interval.
Definition metscreen.h:1111
static MetScreen * FindEndScreen(MetRenderer *pRenderer, const HxStr &name)
Resolve one end-of-game screen by its registry key, failing fatally when it is absent.
virtual void PushNamedScreen(const HxStr &name)
Bring one named screen onto the renderer's screen stack.
void UpdateFrame(float flTime)
Advance one screen by one frame.
int mActivatePending
Set when the screen was activated as a panel before its container load finished.
Definition metscreen.h:1094
virtual void BeginContainerLoad(const HxStr &directory, const HxStr &file)
Intern a container load under this screen's container name and enqueue it.
virtual void OnMsgScreenShown(const HxStr &name)
Act on a message dialogue becoming visible.
virtual void EnterAndShow()
Show this screen and start its enter animation.
virtual void PlaySlideSound(int nSelector)
Play the sound that accompanies sliding between screens.
int mExitChoice
Definition metscreen.h:1042
void UpdateAnimationFrame(float flTime)
Drive the frame of whichever animation is running and run the idle hook when none is.
Receiver of engine messages.
Definition msgsink.h:37
Request to load one renderer file in the background.
Definition asyncloader.h:29
Root of a loadable scene.
Definition view.h:47
MetScreenCommandCode
What a navigation command requests.
Definition metscreen.h:100
@ kMetScreenCommandRight
Definition metscreen.h:105
@ kMetScreenCommandBack
Definition metscreen.h:107
@ kMetScreenCommandNone
Definition metscreen.h:101
@ kMetScreenCommandLeft
Definition metscreen.h:104
@ kMetScreenCommandSelect
Definition metscreen.h:106
@ kMetScreenCommandPrevious
Definition metscreen.h:102
@ kMetScreenCommandNext
Definition metscreen.h:103
The rendering engine.
Definition animhelper.h:3
One shared container load, interned under the container name.
Definition metscreen.h:30
RndAsyncLoader * mLoader
Definition metscreen.h:31
int mEnqueuePending
Definition metscreen.h:33
int mFinished
Definition metscreen.h:32
One navigation command delivered to a screen.
Definition metscreen.h:46
int mPadIndex
Definition metscreen.h:48
int mCommand
Definition metscreen.h:47
int mButton
Definition metscreen.h:49
static constexpr int kUnsetCategory
The category a missing entry is created with.
Definition metscreen.h:80
MetScreen * mScreen
Definition metscreen.h:82
int mCategory
Definition metscreen.h:83
MetScreenEntry(MetScreen *pScreen, int nCategory=kDefaultCategory)
Record a screen in a category.
Definition metscreen.h:73
MetScreenEntry()
Record no screen, in category 3.
Definition metscreen.h:64
static constexpr int kDefaultCategory
The category every recovered registration stores.
Definition metscreen.h:78