mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
overlay: remove navigator input (#288)
## Link to GitHub Issue, if one exists
n/a
## Description of change
No one uses this, remove them to reduce clutter. This is in preparation
to migrate from deprecated ImGui IO model to new one, and this is part
of that.
## Compiling
👍
## Testing
This commit is contained in:
@@ -461,18 +461,6 @@ namespace games {
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Force Exit Game");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Navigator Activate");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Navigator Cancel");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Navigator Up");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Navigator Down");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Navigator Left");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Navigator Right");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Hotkey Enable 1");
|
||||
vkey_defaults.push_back(0xFF);
|
||||
names.emplace_back("Hotkey Enable 2");
|
||||
|
||||
@@ -30,12 +30,6 @@ namespace games {
|
||||
ScreenResizeScene3,
|
||||
ScreenResizeScene4,
|
||||
SuperExit,
|
||||
NavigatorActivate,
|
||||
NavigatorCancel,
|
||||
NavigatorUp,
|
||||
NavigatorDown,
|
||||
NavigatorLeft,
|
||||
NavigatorRight,
|
||||
HotkeyEnable1,
|
||||
HotkeyEnable2,
|
||||
HotkeyToggle,
|
||||
|
||||
@@ -361,27 +361,6 @@ void ImGui_ImplSpice_NewFrame() {
|
||||
}
|
||||
}
|
||||
|
||||
// navigator input
|
||||
auto buttons = games::get_buttons_overlay(eamuse_get_game());
|
||||
if (buttons && (!overlay::OVERLAY || overlay::OVERLAY->hotkeys_triggered())) {
|
||||
struct {
|
||||
size_t index;
|
||||
Button &btn;
|
||||
} NAV_MAPPING[] = {
|
||||
{ ImGuiNavInput_Activate, buttons->at(games::OverlayButtons::NavigatorActivate )},
|
||||
{ ImGuiNavInput_Cancel, buttons->at(games::OverlayButtons::NavigatorCancel) },
|
||||
{ ImGuiNavInput_DpadUp, buttons->at(games::OverlayButtons::NavigatorUp) },
|
||||
{ ImGuiNavInput_DpadDown, buttons->at(games::OverlayButtons::NavigatorDown) },
|
||||
{ ImGuiNavInput_DpadLeft, buttons->at(games::OverlayButtons::NavigatorLeft) },
|
||||
{ ImGuiNavInput_DpadRight, buttons->at(games::OverlayButtons::NavigatorRight) },
|
||||
};
|
||||
for (auto mapping : NAV_MAPPING) {
|
||||
if (GameAPI::Buttons::getState(RI_MGR, mapping.btn)) {
|
||||
io.NavInputs[mapping.index] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set mouse wheel
|
||||
auto mouse_diff = mouse_wheel - mouse_wheel_last;
|
||||
mouse_wheel_last = mouse_wheel;
|
||||
|
||||
Reference in New Issue
Block a user