resonance 1.0.1
Loading...
Searching...
No Matches
metconfigcontrollerscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
6#include "met/metbuttonlist.h"
8#include "os/hxstr.h"
9
11
12namespace Rnd {
13class Mesh;
14class Text;
15} // namespace Rnd
16
49public:
62 MetConfigControllerScreen(MetRenderer *pRenderer, int nPriority);
63
69
81 static MetConfigControllerScreen *New(MetRenderer *pRenderer, int nPriority);
82
95 virtual void EnterAndShow();
96
103 virtual void BeginExit();
104
116 virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice);
117
131 virtual void HandleCommand(const MetScreenCommand *pCommand);
132
140 virtual void PlaySlideSound(int nSelector);
141
149 virtual void PlayLeaveSound(int nSelector);
150
158 virtual void PlayHighSound(int nSelector);
159
167 virtual void PlayCycleLeftSound(int nSelector);
168
176 virtual void PlayCycleRightSound(int nSelector);
177
184 virtual void OnEnterFinished();
185
198 virtual void OnExitFinished();
199
210 virtual void ResolveContainerViews();
211
212private:
221 void ClearDuplicateAssignment(int nRow);
222
229 void UpdateButtonHighlight();
230
237 void ShowConfig(ControllerConfig &config);
238
245 void SetButtonHighlights(int nButton);
246
255 int StoreConfig();
256
263 int ButtonIndexForText(const HxStr &text) const;
264
271 bool AllRowsAssigned() const;
272
281 char PreviousButtonCode(int nRow, char code) const;
282
291 char NextButtonCode(int nRow, char code) const;
292
293 MetButtonList *mRows; // +0x90
294 std::vector<Rnd::Mesh *> mButtonMeshes; // +0x94, the button highlight meshes
295 std::vector<HxStr> mButtonMeshNames; // +0xa0, the names of mButtonMeshes
296 std::vector<Rnd::Text *> mRowValueTexts; // +0xac, the row value texts
297 std::vector<HxStr> mRowValueTextNames; // +0xb8, the names of mRowValueTexts
298 char mFirstButtonCode; // +0xc4, the first button code, `a`
299 char mLastButtonCode; // +0xc5, the last button code, `h`, never read
300
301public:
310
311private:
312 int mReserved; // +0xcc, never read or written
313};
One controller's mapping from gameplay actions to buttons.
Definition controllerconfig.h:24
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Receiver notified once a memory-card task has finished.
Definition memcarduser.h:24
Ring of front-end buttons with one of them selected.
Definition metbuttonlist.h:34
virtual void BeginExit()
Hide every button highlight and begin the exit.
virtual void PlayLeaveSound(int nSelector)
Play the leave sound for this screen's controller only.
virtual void OnExitFinished()
Push the screens that follow this one.
virtual void PlayCycleRightSound(int nSelector)
Play the cycle-right sound for this screen's controller only.
int mControllerIndex
Index of the controller this screen configures, from 0.
Definition metconfigcontrollerscreen.h:309
virtual void PlaySlideSound(int nSelector)
Play the slide sound for this screen's controller only.
MetConfigControllerScreen(MetRenderer *pRenderer, int nPriority)
Construct the controller configuration screen.
static MetConfigControllerScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void OnEnterFinished()
Clear a duplicate of the selected row and highlight its button.
virtual void ResolveContainerViews()
Resolve the rows, the two instruction texts, the button meshes, and the value texts.
virtual ~MetConfigControllerScreen()
virtual void HandleCommand(const MetScreenCommand *pCommand)
Act on a command from the controller this screen configures.
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Act on a dismissed dialogue.
virtual void PlayCycleLeftSound(int nSelector)
Play the cycle-left sound for this screen's controller only.
virtual void EnterAndShow()
Select the first row, show the configured buttons, and enter.
virtual void PlayHighSound(int nSelector)
Play the emphasised-selection sound for this screen's controller only.
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
MetScreenMultiSoundBank(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct a screen that uses the multiplayer sound bank.
Indexed triangle mesh with one material.
Definition mesh.h:46
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