Merge branch 'develop-zhora' into zhora-rando-next-merge

This commit is contained in:
aMannus 2022-08-09 08:44:05 +02:00
commit 0b722eebd4
4 changed files with 490 additions and 280 deletions

View File

@ -100,11 +100,15 @@ namespace Ship {
}
void Console::Draw() {
if (!this->opened) {
CVar_SetS32("gConsoleEnabled", 0);
return;
}
bool input_focus = false;
if (!this->opened) return;
ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver);
ImGui::Begin("Console", nullptr, ImGuiWindowFlags_NoFocusOnAppearing);
ImGui::Begin("Console", &this->opened, ImGuiWindowFlags_NoFocusOnAppearing);
const ImVec2 pos = ImGui::GetWindowPos();
const ImVec2 size = ImGui::GetWindowSize();
// SohImGui::ShowCursor(ImGui::IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows | ImGuiHoveredFlags_RectOnly), SohImGui::Dialogues::dConsole);

File diff suppressed because it is too large Load Diff

View File

@ -112,6 +112,12 @@ namespace SohImGui {
void EndGroupPanel(float minHeight = 0.0f);
std::string BreakTooltip(const char* text, int lineLength = 60);
std::string BreakTooltip(const std::string& text, int lineLength = 60);
void InsertPadding(float extraVerticalPadding = 0.0f);
void PaddedSeparator(bool padTop = true, bool padBottom = true, float extraVerticalTopPadding = 0.0f, float extraVerticalBottomPadding = 0.0f);
void PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false, bool padTop = true, bool padBottom = true);
void PaddedEnhancementCheckbox(const char* text, const char* cvarName, bool padTop = true, bool padBottom = true);
void PaddedText(const char* text, bool padTop = true, bool padBottom = true);
std::string GetWindowButtonText(const char* text, bool menuOpen);
}
#endif
#endif

View File

@ -1124,7 +1124,7 @@ void DrawCosmeticsEditor(bool& open) {
return;
}
ImGui::SetNextWindowSize(ImVec2(465, 430), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("Cosmetics Editor", &open, ImGuiWindowFlags_NoFocusOnAppearing)) {
if (!ImGui::Begin("Cosmetics Editor", &open)) {
ImGui::End();
return;
}
@ -1162,7 +1162,7 @@ void InitCosmeticsEditor() {
//This allow to hide a window without disturbing the player nor adding things in menu
//LoadRainbowColor() will this way run in background once it's window is activated
//ImGui::SetNextItemWidth(0.0f);
SohImGui::AddWindow("Cosmetics", "Rainbowfunction", LoadRainbowColor, true, true);
SohImGui::AddWindow("Enhancements", "Rainbowfunction", LoadRainbowColor, true, true);
//Draw the bar in the menu.
SohImGui::AddWindow("Cosmetics", "Cosmetics Editor", DrawCosmeticsEditor);
}
SohImGui::AddWindow("Enhancements", "Cosmetics Editor", DrawCosmeticsEditor);
}