Adds option to lock a cosmetic from being randomized (#1812)

Resolves #1809
This commit is contained in:
RaelCappra
2022-10-21 01:05:08 -03:00
committed by GitHub
parent 4fb78f9caa
commit af02623456
2 changed files with 15 additions and 1 deletions
+10
View File
@@ -474,6 +474,15 @@ namespace UIWidgets {
return changed;
}
void DrawLockColorCheckbox(const char* cvarName) {
std::string Cvar_Lock = cvarName;
Cvar_Lock += "Lock";
s32 lock = CVar_GetS32(Cvar_Lock.c_str(), 0);
std::string FullName = "Lock##" + Cvar_Lock;
EnhancementCheckbox(FullName.c_str(), Cvar_Lock.c_str());
Tooltip("Prevents this color from being changed upon selecting \"Randomize all\"");
}
void RainbowColor(const char* cvarName, ImVec4* colors) {
std::string Cvar_RBM = cvarName;
Cvar_RBM += "RBM";
@@ -546,6 +555,7 @@ namespace UIWidgets {
}
RainbowColor(cvarName, &ColorRGBA);
}
DrawLockColorCheckbox(cvarName);
ImGui::NewLine();
ImGui::PopItemWidth();