mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-23 01:42:19 -05:00
TWEAK: Layout/styling overhaul for the F1 menu (#1026)
* First pass of UX changes * More padding/styling/layout * More styling * Moar styling * Some more styling * Implemented padding helpers * More styling, added closing buttons to windows * Fixed merge conflict mistake * Fixed new enhancements * Hopefully fix jenkins errors * Changed button behaviour, more styling * Tiny code cleanup * Change buttons from close/open to > when open * Small button spacing fix * Small styling changes after merge * Small fix after merge mistake
This commit is contained in:
parent
0d9c390526
commit
e4b58e5a0c
@ -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
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user