resonance 1.0.1
Loading...
Searching...
No Matches
methelpscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "math/vector3.h"
6#include "met/metscreen.h"
7
8namespace Rnd {
9class Animatable;
10class Text;
11} // namespace Rnd
12
31class MetHelpScreen : public MetScreen {
32public:
44 MetHelpScreen(MetRenderer *pRenderer, int nPriority);
45
50 virtual ~MetHelpScreen();
51
61 static MetHelpScreen *New(MetRenderer *pRenderer, int nPriority);
62
77 static void SetText(const HxStr &text, float flTime);
78
90 static void SelectPreset(const HxStr &name);
91
101 void ApplyPreset(const HxStr &name);
102
115 void PostText(const HxStr &text, float flTime);
116
126 virtual void HandleCommand(const MetScreenCommand *pCommand);
127
137 virtual void UpdateIdle(float flTime);
138
147 virtual void OnExitFinished();
148
160 virtual void ResolveContainerViews();
161
162private:
169 void ClearInfoTexts();
170
171#ifdef VIDEO_STANDARD_PAL
182 static HxStr FontForCode(const HxStr &code);
183#endif
184
208 void FillTexts(const HxStr &key,
209 std::vector<Rnd::Text *> &texts,
210 const Vector3 &origin,
211 int nTitles);
212
222 void StartShow(float flTime);
223
233 void UpdateShow(float flTime);
234
242 void StartHide(float flTime);
243
253 void UpdateHide(float flTime);
254
255 float mShowStart; // Time the show animation started, zero while idle.
256 float mHideStart; // Time the hide animation started, zero while idle.
257 HxStr mShownText; // The prompt shown.
258 HxStr mWaitingText; // The prompt waiting for the hide to finish.
259 std::vector<Rnd::Text *> mInfoTexts; // The six info texts.
260 Vector3 mInfoOrigin; // Resting translation of the first info text.
261 std::vector<Rnd::Text *> mTitleTexts; // The four title texts.
262 Vector3 mTitleOrigin; // Resting translation of the first title text.
263 HxStr mPreset; // The layout ApplyPreset() last recorded.
264 Rnd::Animatable *mShowAnim; // `so_TT_01.anim`, the show animation.
265 float mShowEnd; // End frame of the show animation.
266 Rnd::Animatable *mHideAnim; // `so_TT_02.anim`, the hide animation.
267 float mHideEnd; // End frame of the hide animation.
268};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
virtual ~MetHelpScreen()
virtual void ResolveContainerViews()
Resolve the container views, the six info texts, the four title texts, and both animations.
static void SelectPreset(const HxStr &name)
Select one named prompt layout.
virtual void OnExitFinished()
Empty the info texts, forget both prompts, and stop the hide animation.
virtual void HandleCommand(const MetScreenCommand *pCommand)
Depart on a back command.
void ApplyPreset(const HxStr &name)
Record one named layout and fill the title texts from it.
static MetHelpScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void UpdateIdle(float flTime)
Advance the show and hide animations.
static void SetText(const HxStr &text, float flTime)
Replace the shared prompt text and repost it.
MetHelpScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
void PostText(const HxStr &text, float flTime)
Post one prompt at one time.
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
MetScreen(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct a screen and start its container load.
Mix-in for an object driven by a frame number.
Definition animatable.h:43
Run of text drawn as a quad per glyph.
Definition text.h:57
The rendering engine.
Definition animhelper.h:3
One navigation command delivered to a screen.
Definition metscreen.h:46
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:12