mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
clean up, add spoiler file name to ui
This commit is contained in:
parent
f07ad0c117
commit
4d2b0419d3
1 changed files with 8 additions and 26 deletions
|
@ -2086,46 +2086,28 @@ void DrawRandoEditor(bool& open) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string spoilerfilepath = CVar_GetString("gSpoilerLog", "");
|
||||||
|
// todo something fancy for full path maybe?
|
||||||
|
ImGui::Text("Spoilerfile: %s", spoilerfilepath.c_str());
|
||||||
bool randoEnabled = (bool)CVar_GetS32("gRandomizer", 0);
|
bool randoEnabled = (bool)CVar_GetS32("gRandomizer", 0);
|
||||||
if (ImGui::Checkbox("Enable Randomizer", &randoEnabled)) {
|
if (ImGui::Checkbox("Enable Randomizer", &randoEnabled)) {
|
||||||
CVar_SetS32("gRandomizer", randoEnabled);
|
CVar_SetS32("gRandomizer", randoEnabled);
|
||||||
Game::SaveSettings();
|
Game::SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(randoEnabled) {
|
||||||
if (ImGui::Button("Generate")) {
|
if (ImGui::Button("Generate")) {
|
||||||
if (CVar_GetS32("gRandoGenerating", 0) == 0) {
|
if (CVar_GetS32("gRandoGenerating", 0) == 0) {
|
||||||
randoThread = std::thread(&GenerateRandomizerImgui);
|
randoThread = std::thread(&GenerateRandomizerImgui);
|
||||||
}
|
}
|
||||||
// GenerateRandomizerImgui();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
// void EnhancementCheckbox(const char* text, const char* cvarName)
|
|
||||||
// {
|
|
||||||
// bool val = (bool)CVar_GetS32(cvarName, 0);
|
|
||||||
// if (ImGui::Checkbox(text, &val)) {
|
|
||||||
// CVar_SetS32(cvarName, val);
|
|
||||||
// needs_save = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
void InitRando() {
|
void InitRando() {
|
||||||
SohImGui::AddWindow("Developer Tools", "Rando Editor", DrawRandoEditor);
|
SohImGui::AddWindow("Developer Tools", "Rando Editor", DrawRandoEditor);
|
||||||
|
|
||||||
// if (ImGui::BeginMenu("Randomizer"))
|
|
||||||
// {
|
|
||||||
// // EnhancementCheckbox("Enable Randomizer", "gRandomizer");
|
|
||||||
|
|
||||||
// if (ImGui::Button("Generate Seed")) {
|
|
||||||
// if (CVar_GetS32("gRandoGenerating", 0) == 0) {
|
|
||||||
// randoThread = std::thread(&SohImGui::GenerateRandomizerImgui);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ImGui::EndMenu();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue