mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
I had declared default in CPP
It resulted to overwrite what user would make oof. Also a ! was missing.
This commit is contained in:
parent
80d6be30a7
commit
00dfcbb11c
1 changed files with 3 additions and 3 deletions
|
@ -240,7 +240,7 @@ namespace SohImGui {
|
||||||
stbi_image_free(img_data);
|
stbi_image_free(img_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadPickersColors(ImVec4& ColorArray, const char* cvarname, const ImVec4& default_colors, bool has_alpha = false) {
|
void LoadPickersColors(ImVec4& ColorArray, const char* cvarname, const ImVec4& default_colors, bool has_alpha) {
|
||||||
std::string Cvar_Red = cvarname;
|
std::string Cvar_Red = cvarname;
|
||||||
Cvar_Red += "R";
|
Cvar_Red += "R";
|
||||||
std::string Cvar_Green = cvarname;
|
std::string Cvar_Green = cvarname;
|
||||||
|
@ -472,7 +472,7 @@ namespace SohImGui {
|
||||||
return fmin(fmax(value,min),max);
|
return fmin(fmax(value,min),max);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool has_alpha = false, bool TitleSameLine = false) {
|
void EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool has_alpha, bool TitleSameLine) {
|
||||||
std::string Cvar_Red = cvarName;
|
std::string Cvar_Red = cvarName;
|
||||||
Cvar_Red += "R";
|
Cvar_Red += "R";
|
||||||
std::string Cvar_Green = cvarName;
|
std::string Cvar_Green = cvarName;
|
||||||
|
@ -488,7 +488,7 @@ namespace SohImGui {
|
||||||
ImGui::Text("%s", text);
|
ImGui::Text("%s", text);
|
||||||
flags = ImGuiColorEditFlags_NoLabel;
|
flags = ImGuiColorEditFlags_NoLabel;
|
||||||
}
|
}
|
||||||
if (has_alpha) {
|
if (!has_alpha) {
|
||||||
if (ImGui::ColorEdit3(text, (float *)&ColorRGBA, flags)) {
|
if (ImGui::ColorEdit3(text, (float *)&ColorRGBA, flags)) {
|
||||||
CVar_SetS32(Cvar_Red.c_str(), ClampFloatToInt(ColorRGBA.x*255,0,255));
|
CVar_SetS32(Cvar_Red.c_str(), ClampFloatToInt(ColorRGBA.x*255,0,255));
|
||||||
CVar_SetS32(Cvar_Green.c_str(), ClampFloatToInt(ColorRGBA.y*255,0,255));
|
CVar_SetS32(Cvar_Green.c_str(), ClampFloatToInt(ColorRGBA.y*255,0,255));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue