MCPcopy Create free account
hub / github.com/EasyRPG/Player / RefreshInput

Method RefreshInput

src/window_settings.cpp:623–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623void Window_Settings::RefreshInput() {
624 Game_ConfigInput& cfg = Input::GetInputSource()->GetConfig();
625
626 AddOption(MenuItem("Key/Button mapping", "Change the keybindings", ""),
627 [this]() { Push(eInputButtonCategory); });
628 AddOption(cfg.gamepad_swap_ab_and_xy, [&cfg](){ cfg.gamepad_swap_ab_and_xy.Toggle(); Input::ResetTriggerKeys(); });
629 AddOption(cfg.gamepad_swap_analog, [&cfg](){ cfg.gamepad_swap_analog.Toggle(); Input::ResetTriggerKeys(); });
630 AddOption(cfg.gamepad_swap_dpad_with_buttons, [&cfg](){ cfg.gamepad_swap_dpad_with_buttons.Toggle(); Input::ResetTriggerKeys(); });
631 AddOption(cfg.speed_modifier_a, [this, &cfg](){ cfg.speed_modifier_a.Set(GetCurrentOption().current_value); });
632 AddOption(cfg.speed_modifier_b, [this, &cfg](){ cfg.speed_modifier_b.Set(GetCurrentOption().current_value); });
633}
634
635void Window_Settings::RefreshButtonCategory() {
636 AddOption(MenuItem("Game", "Buttons used by games", ""),

Callers

nothing calls this directly

Calls 4

MenuItemClass · 0.85
ToggleMethod · 0.80
GetConfigMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected