GUI: follow up to #191

This commit is contained in:
tildearrow 2022-02-20 04:26:35 -05:00
parent 3a6beecb67
commit 0f69a6d206
2 changed files with 4 additions and 3 deletions

View File

@ -1618,13 +1618,14 @@ void FurnaceGUI::drawAbout() {
}
ImGui::PopFont();
float timeScale = 60.0f * ImGui::GetIO().DeltaTime;
float timeScale=60.0f*ImGui::GetIO().DeltaTime;
aboutHue+=(0.001+peakMix*0.004)*timeScale;
aboutScroll+=(2+(peakMix>0.78)*3)*timeScale;
aboutSin+=(1+(peakMix>0.75)*2)*timeScale;
if (aboutSin>=2400) aboutSin-=2400;
while (aboutHue>1) aboutHue--;
while (aboutSin>=2400) aboutSin-=2400;
if (aboutScroll>(42*57+scrH)) aboutScroll=-20;
}
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ABOUT;

View File

@ -417,7 +417,7 @@ class FurnaceGUI {
double dpiScale;
int aboutScroll, aboutSin;
double aboutScroll, aboutSin;
float aboutHue;
ImFont* mainFont;