Add support for button glyph display
This adds a function that converts an action (such as interacting
in-game) to the corresponding button text ("ENTER", "E") or button
glyph (PlayStation triangle, Steam Deck Y, etc). This function
currently only gives the existing ENTERs or Es, because I don't know
how best to detect controller usage, or whether the game is running on
a Steam Deck, or what buttons need to be displayed there. Still, it
should now be really easy to adapt the rendering of keyboard keys to
consoles, controllers, or rebound keys.
To identify the actions that currently need to be displayed, this
commit also adds the initial enums for action sets as described by
Ethan in a comment in #834 (Jan 18, 2022).
2023-03-18 22:30:16 +01:00
|
|
|
/* For now, this isn't really a foundation for action sets yet; button glyphs
|
|
|
|
* just need to be able to identify actions that are printed in text like
|
|
|
|
* "Press ENTER to teleport". Thus, this currently ONLY contains identifiers
|
|
|
|
* for the actions that button glyphs are needed for.
|
|
|
|
*
|
|
|
|
* Based on this comment:
|
|
|
|
* https://github.com/TerryCavanagh/VVVVVV/issues/834#issuecomment-1015692161
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef ACTIONSETS_H
|
|
|
|
#define ACTIONSETS_H
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------*
|
|
|
|
* List of all action sets (all "states") *
|
|
|
|
*----------------------------------------*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
//ActionSet_Global,
|
2023-03-18 22:32:26 +01:00
|
|
|
ActionSet_Menu,
|
Add support for button glyph display
This adds a function that converts an action (such as interacting
in-game) to the corresponding button text ("ENTER", "E") or button
glyph (PlayStation triangle, Steam Deck Y, etc). This function
currently only gives the existing ENTERs or Es, because I don't know
how best to detect controller usage, or whether the game is running on
a Steam Deck, or what buttons need to be displayed there. Still, it
should now be really easy to adapt the rendering of keyboard keys to
consoles, controllers, or rebound keys.
To identify the actions that currently need to be displayed, this
commit also adds the initial enums for action sets as described by
Ethan in a comment in #834 (Jan 18, 2022).
2023-03-18 22:30:16 +01:00
|
|
|
ActionSet_InGame
|
|
|
|
//ActionSet_Editor
|
|
|
|
}
|
|
|
|
ActionSet;
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------*
|
|
|
|
* An enum for each actionset, with the actions in that set *
|
|
|
|
*----------------------------------------------------------*/
|
|
|
|
/*
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
Action_Global_Mute,
|
|
|
|
Action_Global_MuteMusic
|
|
|
|
}
|
|
|
|
Action_Global;
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2023-03-18 22:32:26 +01:00
|
|
|
Action_Menu_Accept
|
|
|
|
}
|
|
|
|
Action_Menu;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
Action_InGame_ACTION,
|
Add support for button glyph display
This adds a function that converts an action (such as interacting
in-game) to the corresponding button text ("ENTER", "E") or button
glyph (PlayStation triangle, Steam Deck Y, etc). This function
currently only gives the existing ENTERs or Es, because I don't know
how best to detect controller usage, or whether the game is running on
a Steam Deck, or what buttons need to be displayed there. Still, it
should now be really easy to adapt the rendering of keyboard keys to
consoles, controllers, or rebound keys.
To identify the actions that currently need to be displayed, this
commit also adds the initial enums for action sets as described by
Ethan in a comment in #834 (Jan 18, 2022).
2023-03-18 22:30:16 +01:00
|
|
|
Action_InGame_Interact,
|
2023-03-13 04:16:36 +01:00
|
|
|
Action_InGame_Map,
|
|
|
|
Action_InGame_Restart,
|
|
|
|
Action_InGame_Esc
|
Add support for button glyph display
This adds a function that converts an action (such as interacting
in-game) to the corresponding button text ("ENTER", "E") or button
glyph (PlayStation triangle, Steam Deck Y, etc). This function
currently only gives the existing ENTERs or Es, because I don't know
how best to detect controller usage, or whether the game is running on
a Steam Deck, or what buttons need to be displayed there. Still, it
should now be really easy to adapt the rendering of keyboard keys to
consoles, controllers, or rebound keys.
To identify the actions that currently need to be displayed, this
commit also adds the initial enums for action sets as described by
Ethan in a comment in #834 (Jan 18, 2022).
2023-03-18 22:30:16 +01:00
|
|
|
}
|
|
|
|
Action_InGame;
|
|
|
|
|
|
|
|
/*
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
//Action_Editor_PrevTool,
|
|
|
|
//Action_Editor_NextTool
|
|
|
|
}
|
|
|
|
Action_Editor;
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*-----------------------------------------*
|
|
|
|
* A union to represent any actionset enum *
|
|
|
|
*-----------------------------------------*/
|
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
int intval;
|
|
|
|
//Action_Global Global;
|
2023-03-18 22:32:26 +01:00
|
|
|
Action_Menu Menu;
|
Add support for button glyph display
This adds a function that converts an action (such as interacting
in-game) to the corresponding button text ("ENTER", "E") or button
glyph (PlayStation triangle, Steam Deck Y, etc). This function
currently only gives the existing ENTERs or Es, because I don't know
how best to detect controller usage, or whether the game is running on
a Steam Deck, or what buttons need to be displayed there. Still, it
should now be really easy to adapt the rendering of keyboard keys to
consoles, controllers, or rebound keys.
To identify the actions that currently need to be displayed, this
commit also adds the initial enums for action sets as described by
Ethan in a comment in #834 (Jan 18, 2022).
2023-03-18 22:30:16 +01:00
|
|
|
Action_InGame InGame;
|
|
|
|
//Action_Editor Editor;
|
|
|
|
}
|
|
|
|
Action;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // ACTIONSETS_H
|