mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 13:53:49 -07:00
Add window to customize specific controls (#1122)
This commit is contained in:
parent
b7f9960a60
commit
46a421f933
12 changed files with 753 additions and 363 deletions
|
@ -1162,10 +1162,27 @@ namespace SohImGui {
|
|||
PaddedSeparator();
|
||||
|
||||
if (ImGui::BeginMenu("Controls")) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12.0f, 6.0f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
float availableWidth = ImGui::GetContentRegionAvail().x;
|
||||
if (ImGui::Button(
|
||||
GetWindowButtonText("Customize Game Controls", CVar_GetS32("gGameControlEditorEnabled", 0)).c_str(),
|
||||
ImVec2(availableWidth, 0)
|
||||
)) {
|
||||
bool currentValue = CVar_GetS32("gGameControlEditorEnabled", 0);
|
||||
CVar_SetS32("gGameControlEditorEnabled", !currentValue);
|
||||
needs_save = true;
|
||||
customWindows["Game Control Editor"].enabled = CVar_GetS32("gGameControlEditorEnabled", 0);
|
||||
}
|
||||
ImGui::PopStyleVar(3);
|
||||
ImGui::PopStyleColor(1);
|
||||
|
||||
// TODO mutual exclusions -- There should be some system to prevent conclifting enhancements from being selected
|
||||
EnhancementCheckbox("D-pad Support on Pause and File Select", "gDpadPauseName");
|
||||
PaddedEnhancementCheckbox("D-pad Support on Pause and File Select", "gDpadPauseName");
|
||||
Tooltip("Enables Pause and File Select screen navigation with the D-pad\nIf used with D-pad as Equip Items, you must hold C-Up to equip instead of navigate");
|
||||
PaddedEnhancementCheckbox("D-pad Support in Ocarina and Text Choice", "gDpadOcarinaText", true, false);
|
||||
PaddedEnhancementCheckbox("D-pad Support in Text Choice", "gDpadText", true, false);
|
||||
PaddedEnhancementCheckbox("D-pad Support for Browsing Shop Items", "gDpadShop", true, false);
|
||||
PaddedEnhancementCheckbox("D-pad as Equip Items", "gDpadEquips", true, false);
|
||||
Tooltip("Allows the D-pad to be used as extra C buttons");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue