Triggers should now be save and load able.

This commit is contained in:
Justin Marshall
2020-06-09 21:40:10 -07:00
parent 17464353dd
commit 6fcd7a484e
2 changed files with 452 additions and 219 deletions
+9
View File
@@ -2330,7 +2330,15 @@ void ImGui_SelectTrigger(void) {
ImGui::SetNextWindowPos(ImVec2(100, 100));
ImGui::Begin("Trigger Editor", &toolActive, ImGuiWindowFlags_AlwaysAutoResize);
ImGui::PushItemWidth(450);
bool forceClear = false;
if (triggerlist.size() == 0) {
forceClear = true;
triggerlist.push_back("<NONE>");
}
ImGui::ListBox("", &select_trigger_seleceted, &triggerlist[0], triggerlist.size());
if (forceClear) {
triggerlist.clear();
}
ImGui::PopItemWidth();
ImGui::NewLine();
ImGui::Columns(4, "outert", true);
@@ -2400,6 +2408,7 @@ int MapEditClass::Select_Trigger(void)
{
selectTriggerButtonState = SELECT_TRIGGER_BUTTON_NONE;
Imgui_Dialog_Function = ImGui_SelectTrigger;
select_trigger_seleceted = 0;
/*
** Dialog & button dimensions