FIX: Sword Trail not appearing when using custom color (#1625)

This was caused by the trail duration not being init properly until we change the duration manually.

cf this video: https://streamable.com/a9u4fm

- Also changed Lengh to Duration for clarity
This commit is contained in:
PurpleHato 2022-09-28 02:58:25 +02:00 committed by GitHub
parent c487e4ba0b
commit 87125ae334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,7 @@ void BootCommands_Init()
CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French
CVar_RegisterS32("gHudColors", 1); //0 = N64 / 1 = NGC / 2 = Custom
CVar_RegisterS32("gInvertYAxis", 1);
CVar_RegisterS32("gTrailDuration", 4); // 4 = Default trail duration
#if defined(__SWITCH__) || defined(__WIIU__)
CVar_RegisterS32("gControlNav", 1); // always enable controller nav on switch/wii u
#endif

View File

@ -467,8 +467,8 @@ void Draw_ItemsSkills(){
Table_InitHeader();
DrawColorSection(Trail_section, SECTION_SIZE(Trail_section));
ImGui::EndTable();
UIWidgets::EnhancementSliderInt("Sword Trail Length: %d", "##TrailsMul", "gTrailDuration", 1, 16, "", 4, true);
UIWidgets::Tooltip("Determines length of Link's sword trails.");
UIWidgets::EnhancementSliderInt("Sword Trail Duration: %d", "##TrailsMul", "gTrailDuration", 1, 16, "", 4, true);
UIWidgets::Tooltip("Determines the duration of Link's sword trails.");
ResetTrailLength("gTrailDuration", 4);
UIWidgets::EnhancementCheckbox("Swords use separate colors", "gSeperateSwords");
if (CVar_GetS32("gSeperateSwords", 0) && ImGui::CollapsingHeader("Individual Sword Colors")) {