mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-01 18:52:02 +03:00
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).
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
5180e430a2
commit
3354a1a352
24
desktop_version/src/ButtonGlyphs.h
Normal file
24
desktop_version/src/ButtonGlyphs.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef BUTTONGLYPHS_H
|
||||
#define BUTTONGLYPHS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "ActionSets.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void BUTTONGLYPHS_init(void);
|
||||
|
||||
bool BUTTONGLYPHS_keyboard_is_available(void);
|
||||
bool BUTTONGLYPHS_keyboard_is_active(void);
|
||||
const char* BUTTONGLYPHS_get_wasd_text(void);
|
||||
const char* BUTTONGLYPHS_get_button(ActionSet actionset, Action action);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // BUTTONGLYPHS_H
|
||||
Reference in New Issue
Block a user