169 void ApplyLabel(
const char *pszComponent,
const char *pszLabel,
bool bButton);
295 const char *mFocusName;
300 std::vector<int> mButtonChoices;
301 std::vector<int> mStickChoices;
bool HandleFocusChange(UIComponentFocusChangeMsg *pMsg)
Highlight the event that gained the focus on the controller map and show its hint.
DataArray * FindEvent(const char *pszName, int *pnButton)
Find an event by name among the button events, then among the stick events.
const char * ButtonLabel(int nButton) const
Report the label of a button.
int EventAction(DataArray *pEvent) const
Report the InputMap action an event binds.
void CycleChoice(const char *pszComponent, int nButton)
Step the choice of an event back or forward with the directional buttons.
ControllerConfigScreen(DataArray *pData)
Construct the screen from its script description.
bool DispatchPriv(Message *pMsg) override
Route the start of a choice, a focus change, and a controller button, and pass on every other message...
~ControllerConfigScreen() override=default
Destroy the object.
void ApplyLabel(const char *pszComponent, const char *pszLabel, bool bButton)
Show a label on the component of an event in the style of a button or of a stick.
void ResetBindings()
Show the default bindings.
bool HandleSelectStart(UIComponentSelectStartMsg *pMsg)
Restore the defaults on default, store the bindings and leave on save, and step the choice of an even...
int ChoiceColumn(DataArray *pEvent, int nValue)
Report the column of the choice list of an event that holds a button or a stick.
bool HandleJoypad(JoypadInputMsg *pMsg)
Check the choices when the focus moves up or down, and go back on Triangle, unless the screen is betw...
void SaveBindings()
Store the bindings the menu shows in the input map of the first player.
void Exit(UIScreen *pNextScreen, float fTime) override
Exit, and stop showing the controller map.
void Enter(UIScreen *pPrevScreen, float fTime) override
Enter, remember the screen to return to, read the event lists, and show the first player's bindings.
const char * EventName(DataArray *pEvent) const
Report the name of an event.
void LoadBindings(InputMap *pMap)
Show the bindings of an input map.
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition controllerconfigscreen.h:49
const char * StickLabel(int nStick) const
Report the label of a stick.
int EventSlot(DataArray *pEvent)
Report the slot of an event in its list.
DataArray * FindStickEvent(int nAction, int nStick)
Find the stick event that binds an action.
void ShowOnMap(const char *pszComponent)
Highlight the button or the stick of an event on the controller map.
bool Validate()
Mark every other event of the kind of the focused event that takes the same choice,...
DataArray * ChoiceList(DataArray *pEvent)
Report the choice list of an event.
DataArray * FindButtonEvent(int nAction, int nButton)
Find the button event that binds an action and may take a button.
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
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.