mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Switch sides & add arrow buttons
This commit is contained in:
parent
b45563da60
commit
1e33244fbf
1 changed files with 15 additions and 15 deletions
|
@ -122,8 +122,8 @@ void ModMenuWindow::DrawElement() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginTable("tableMods", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
if (ImGui::BeginTable("tableMods", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||||
ImGui::TableSetupColumn("Enabled Mods", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
|
||||||
ImGui::TableSetupColumn("Disabled Mods", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
ImGui::TableSetupColumn("Disabled Mods", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||||
|
ImGui::TableSetupColumn("Enabled Mods", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||||
ImGui::TableHeadersRow();
|
ImGui::TableHeadersRow();
|
||||||
ImGui::PopItemFlag();
|
ImGui::PopItemFlag();
|
||||||
|
@ -131,13 +131,13 @@ void ModMenuWindow::DrawElement() {
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
if (ImGui::BeginChild("Enabled Mods", ImVec2(0, -8))) {
|
if (ImGui::BeginChild("Disabled Mods", ImVec2(0, -8))) {
|
||||||
std::vector<std::string> enabledMods = GetEnabledModFiles();
|
std::vector<std::string> disabledMods = GetDisabledModFiles();
|
||||||
if (!enabledMods.empty()) {
|
if (!disabledMods.empty()) {
|
||||||
for (std::string file : enabledMods) {
|
for (std::string file : disabledMods) {
|
||||||
if (ImGui::Button(("Disable##" + file).c_str())) {
|
if (ImGui::ArrowButton(file.c_str(), ImGuiDir_Right)) {
|
||||||
modFiles[file] = false;
|
modFiles[file] = true;
|
||||||
GetArchiveManager()->RemoveArchive(file);
|
GetArchiveManager()->AddArchive(file);
|
||||||
AfterModChange();
|
AfterModChange();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -152,13 +152,13 @@ void ModMenuWindow::DrawElement() {
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
if (ImGui::BeginChild("Disabled Mods", ImVec2(0, -8))) {
|
if (ImGui::BeginChild("Enabled Mods", ImVec2(0, -8))) {
|
||||||
std::vector<std::string> disabledMods = GetDisabledModFiles();
|
std::vector<std::string> enabledMods = GetEnabledModFiles();
|
||||||
if (!disabledMods.empty()) {
|
if (!enabledMods.empty()) {
|
||||||
for (std::string file : disabledMods) {
|
for (std::string file : enabledMods) {
|
||||||
if (ImGui::Button(("Enable##" + file).c_str())) {
|
if (ImGui::ArrowButton(file.c_str(), ImGuiDir_Left)) {
|
||||||
modFiles[file] = true;
|
modFiles[file] = false;
|
||||||
GetArchiveManager()->AddArchive(file);
|
GetArchiveManager()->RemoveArchive(file);
|
||||||
AfterModChange();
|
AfterModChange();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue