Osiris: [Request] Config Saving and Deleteing Confirmation Window

Created on 5 Apr 2020  路  3Comments  路  Source: danielkrupinski/Osiris

(Idea)
A "Confirmation Window" for deleting or saving Configs, as I keep on acedentally deleting and over-righting my configs with another config. I have now just resorted to being more cautious, but when It does happen, I have to completely recreate my config, which takes a lot of time.

Most helpful comment

My delete confirm

if (ImGui::Button("Delete Config", { 100.0f, 25.0f }))
                    ImGui::OpenPopup("Config to delete");
                if (ImGui::BeginPopup("Config to delete")) {
                    static constexpr const char* names[]{ "Yes", "No" }; 
                    for (int i = 0; i < IM_ARRAYSIZE(names); i++) {
                        if (i == 1) ImGui::Separator();

                        if (ImGui::Selectable(names[i])) {
                            switch (i) {
                            case 0: config->remove(currentConfig); break;
                            case 1:  break;
                            }
                        }
                    }
                    ImGui::EndPopup();

All 3 comments

My delete confirm

if (ImGui::Button("Delete Config", { 100.0f, 25.0f }))
                    ImGui::OpenPopup("Config to delete");
                if (ImGui::BeginPopup("Config to delete")) {
                    static constexpr const char* names[]{ "Yes", "No" }; 
                    for (int i = 0; i < IM_ARRAYSIZE(names); i++) {
                        if (i == 1) ImGui::Separator();

                        if (ImGui::Selectable(names[i])) {
                            switch (i) {
                            case 0: config->remove(currentConfig); break;
                            case 1:  break;
                            }
                        }
                    }
                    ImGui::EndPopup();

wow, thx

My delete confirm

if (ImGui::Button("Delete Config", { 100.0f, 25.0f }))
                    ImGui::OpenPopup("Config to delete");
                if (ImGui::BeginPopup("Config to delete")) {
                    static constexpr const char* names[]{ "Yes", "No" }; 
                    for (int i = 0; i < IM_ARRAYSIZE(names); i++) {
                        if (i == 1) ImGui::Separator();

                        if (ImGui::Selectable(names[i])) {
                            switch (i) {
                            case 0: config->remove(currentConfig); break;
                            case 1:  break;
                            }
                        }
                    }
                    ImGui::EndPopup();

Maybe the next update @danielkrupinski ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kschou95 picture kschou95  路  3Comments

DivyanshuYT picture DivyanshuYT  路  3Comments

HeiDaShuai666 picture HeiDaShuai666  路  3Comments

noteffex picture noteffex  路  4Comments

NameNotTakenYAY picture NameNotTakenYAY  路  3Comments