mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-16 21:38:07 -04:00
Cosmetic Editor v3 (#1898)
* Cosmetic Editor v3 * Workaround for cvar_clear not working correctly * Nest RGBA values under Value key * Implement arrow cosmetics * Implement keese cosmetics * Tweaks to life meter * Implement file choose color * Remove old title fire colors * A few more silly things * Fix from upstream pulls * Fix hilts and sword during ganon cutscene * Add slingshot * Add metal trap and red ice * Add iron knuckles cosmetics * Add navi cosmetics * Attempt to fix linux error * adjust some comments and alignment * Implement trails cosmetics * Implement charged sword spins * Comment out options that haven't been implemented * Fix exploded rupee color in shooting gallery * Add two silly options * Add comments and minor changes from feedback * Adjust comment about boomerang gem * Gracefully handle chest textures missing
This commit is contained in:
+18
-2
@@ -292,7 +292,8 @@ namespace UIWidgets {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
||||
}
|
||||
|
||||
void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool changed = false;
|
||||
int val = CVar_GetS32(cvarName, defaultValue);
|
||||
|
||||
float alpha;
|
||||
@@ -316,6 +317,7 @@ namespace UIWidgets {
|
||||
val--;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||
@@ -337,6 +339,7 @@ namespace UIWidgets {
|
||||
{
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
if (PlusMinusButton) {
|
||||
ImGui::PopItemWidth();
|
||||
@@ -354,6 +357,7 @@ namespace UIWidgets {
|
||||
val++;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,6 +374,7 @@ namespace UIWidgets {
|
||||
val = min;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (val > max)
|
||||
@@ -377,10 +382,14 @@ namespace UIWidgets {
|
||||
val = max;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool changed = false;
|
||||
float val = CVar_GetFloat(cvarName, defaultValue);
|
||||
|
||||
if (disabled) {
|
||||
@@ -405,6 +414,7 @@ namespace UIWidgets {
|
||||
}
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||
@@ -425,6 +435,7 @@ namespace UIWidgets {
|
||||
CVar_SetFloat(cvarName, val);
|
||||
}
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
if (PlusMinusButton) {
|
||||
ImGui::PopItemWidth();
|
||||
@@ -442,6 +453,7 @@ namespace UIWidgets {
|
||||
}
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,13 +469,17 @@ namespace UIWidgets {
|
||||
val = min;
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (val > max) {
|
||||
val = max;
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
void PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText) {
|
||||
|
||||
Reference in New Issue
Block a user