Files
VVVVVV/desktop_version/src/ButtonGlyphs.h
Dav999 d730528118 Add confirmation and removal to bindings menu
This makes the following improvements to the gamepad bindings menu:

- The menu now shows a hint that you can press a button while any of
  the bind options are selected (or that you can navigate away from
  those options)
- Instead of button presses immediately setting a binding, they now
  ask for confirmation: press the same button a second time to confirm
- You can now remove a binding, the same way you add it (this has the
  same type of confirmation)
- This menu used to be inconsistent with pretty much every other menu
  in the game by showing a permanent title and description for the menu
  itself ("Game Pad", "Change controller options.") rather than showing
  a title and description for the currently selected option.
  This inconsistency is now fixed.
2025-05-03 01:35:25 -04:00

38 lines
791 B
C

#ifndef BUTTONGLYPHS_H
#define BUTTONGLYPHS_H
#include <SDL.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);
void BUTTONGLYPHS_keyboard_set_active(bool active);
void BUTTONGLYPHS_update_layout(SDL_GameController *c);
const char* BUTTONGLYPHS_get_wasd_text(void);
const char* BUTTONGLYPHS_sdlbutton_to_glyph(SDL_GameControllerButton button);
const char* BUTTONGLYPHS_get_button(ActionSet actionset, Action action, int binding);
char* BUTTONGLYPHS_get_all_gamepad_buttons(
char* buffer,
size_t buffer_len,
ActionSet actionset,
int action
);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // BUTTONGLYPHS_H