Skip to content

Commit

Permalink
Fix minor UI glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Aug 21, 2024
1 parent 9a26a26 commit cf49875
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,11 @@ void UI::DrawPlayer() {
}
}
{
bool all = *Max::get().upgrades() == 0x57FFFFFF;
bool all = (*Max::get().upgrades() & 0x57FFFE07) == 0x57FFFE07;
if (ImGui::Checkbox("Unlock all upgrades##UnlockAllUpgrades2", &all) ||
everything) {
if (everything || all) {
*Max::get().upgrades() = 0x57FFFFFF;
*Max::get().upgrades() |= 0x57FFFE07;
} else {
*Max::get().upgrades() = 0;
}
Expand Down Expand Up @@ -746,10 +746,10 @@ void UI::DrawPlayer() {
if (ImGui::CollapsingHeader("Miscellaneous##PlayerMisc")) {
ImGui::PushID("PlayerSectionMisc");
DebugPtr(Max::get().upgrades());
bool all = *Max::get().upgrades() == 0x57FFFFFF;
bool all = (*Max::get().upgrades() & 0x57FFFE07) == 0x57FFFE07;
if (ImGui::Checkbox("Unlock all upgrades##UnlockAllUpgrades", &all)) {
if (all) {
*Max::get().upgrades() = 0x57FFFFFF;
*Max::get().upgrades() |= 0x57FFFE07;
} else {
*Max::get().upgrades() = 0;
}
Expand Down Expand Up @@ -1389,6 +1389,7 @@ void UI::KeyCapture() {
key_chord |= mods;
keys[key_to_change] = (ImGuiKeyChord)key_chord;
key_to_change = "";
SaveINI();
}
}
ImGui::End();
Expand Down Expand Up @@ -1477,7 +1478,6 @@ void UI::DrawUIKeys() {
ImGui::TableNextColumn();
if (ImGui::Button("Set")) {
key_to_change = name;
SaveINI();
}
ImGui::SameLine(0, 4);
if (ImGui::Button("Unset")) {
Expand Down

0 comments on commit cf49875

Please sign in to comment.