fix(Protections): Fixed how the reset protections is handled (#1745)
This commit is contained in:
parent
911a3b71e7
commit
d1a8022eb7
@ -8,10 +8,13 @@ namespace big
|
|||||||
*(bool*)i = state;
|
*(bool*)i = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void reset_protections()
|
||||||
|
{
|
||||||
|
g.protections = {};
|
||||||
|
}
|
||||||
|
|
||||||
void view::protection_settings()
|
void view::protection_settings()
|
||||||
{
|
{
|
||||||
auto initial_protections = g.protections;
|
|
||||||
|
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
ImGui::Checkbox("BOUNTY"_T.data(), &g.protections.script_events.bounty);
|
ImGui::Checkbox("BOUNTY"_T.data(), &g.protections.script_events.bounty);
|
||||||
ImGui::Checkbox("CEO_MONEY"_T.data(), &g.protections.script_events.ceo_money);
|
ImGui::Checkbox("CEO_MONEY"_T.data(), &g.protections.script_events.ceo_money);
|
||||||
@ -65,7 +68,7 @@ namespace big
|
|||||||
set_all_protections(false);
|
set_all_protections(false);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Reset Protections"))
|
if (ImGui::Button("Reset Protections"))
|
||||||
g.protections = initial_protections;
|
reset_protections();
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user