wavelength 1.0.0
Loading...
Searching...
No Matches
freqmakerpartconfigscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "math/color.h"
6#include "met/freqscreen.h"
8#include "script/dataarray.h"
9#include "ui/lrbutton.h"
10#include "ui/uibutton.h"
13
25public:
34
42
53 static UIScreen *New(DataArray *pData) {
54 return new FreqMakerPartConfigScreen(pData);
55 }
56
66 bool DispatchPriv(Message *pMsg) override;
67
78 void Enter(UIScreen *pPrevScreen, float fTime) override;
79
88 void Exit(UIScreen *pNextScreen, float fTime) override;
89
97 const char *Title() override;
98
106
114
127 void StepDown(int nValue, int nMin, int nLimit, int *pValue, LRButton *pButton);
128
141 void StepUp(int nValue, int nMin, int nLimit, int *pValue, LRButton *pButton);
142
154
165
175
176 alignas(16) Color mOriginalColor;
177
178private:
179 int mOriginalIndex;
180 int mReserved74[3]; // +0x74, not yet recovered.
181 const char *mPartLabel;
182 int mPart;
183 int mIndex;
184 int mHue;
185 int mSaturation;
186 int mBrightness;
187 int mReservedA8; // +0xa8, set to 1 on entry. The purpose is not recovered.
188 int mReservedAC; // +0xac, cleared on entry. The purpose is not recovered.
189 int mErrorPlayed;
190 std::vector<const char *> mChoices;
191 UIButton *mPartButton;
192 LRButton *mHueButton;
193 LRButton *mBrightnessButton;
194 LRButton *mSaturationButton;
195};
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqMakerPartConfigScreen(DataArray *pData)
Construct the screen from its script description.
void Exit(UIScreen *pNextScreen, float fTime) override
Start the exit and turn the camera back to the whole Freq.
const char * Title() override
Report the localised title, f_maker_c_TITLE.
~FreqMakerPartConfigScreen() override
Destroy the screen.
Color mOriginalColor
Definition freqmakerpartconfigscreen.h:176
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition freqmakerpartconfigscreen.h:53
void StepDown(int nValue, int nMin, int nLimit, int *pValue, LRButton *pButton)
Step a setting down, hiding the left arrow at the lowest step and playing the WRONG cue once when the...
bool HandleSelectStart(UIComponentSelectStartMsg *pMsg)
Step the choice or a colour setting on left and right, and move the focus to done on the cross button...
void ApplyColor()
Colour the part with the hue, saturation, and brightness the buttons show.
bool DispatchPriv(Message *pMsg) override
Route buttons about to be chosen, focus changes, and controller buttons, and pass on every other mess...
void ShowPartHelp()
Show the help f_maker_s_part_HELP with the name of the part.
void Enter(UIScreen *pPrevScreen, float fTime) override
Start the entry, list the choices of the part, and show the current choice and colour.
void StepUp(int nValue, int nMin, int nLimit, int *pValue, LRButton *pButton)
Step a setting up, hiding the right arrow at the highest step and playing the WRONG cue once when the...
bool HandleFocusChange(UIComponentFocusChangeMsg *pMsg)
Show the help of the part when part receives the focus.
bool HandleJoypad(JoypadInputMsg *pMsg)
Restore the part and return to f_maker_custom on the triangle button, and allow the WRONG cue again w...
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
Button with a left and a right arrow that the directional buttons press.
Definition lrbutton.h:20
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Component the player chooses with the cross button.
Definition uibutton.h:24
Message a panel sends before it moves its focus to another component.
Definition uicomponentfocuschangemsg.h:26
Message a component sends when the player presses the button that chooses it.
Definition uicomponentselectstartmsg.h:27
UIScreen(DataArray *pData)
Construct a screen from its script description.
Linear colour with four float components.
Definition color.h:12