mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Smoother fade animation for ImGui panels
Fade out when disabled too, in steps of 0.5f. SDK fixed frame has been increased to 100tps.
This commit is contained in:
parent
021242ece9
commit
8bf105b072
@ -190,14 +190,19 @@ void CBrowser::Think(void)
|
|||||||
{
|
{
|
||||||
if (m_bActivate)
|
if (m_bActivate)
|
||||||
{
|
{
|
||||||
if (m_flFadeAlpha <= 1.f)
|
if (m_flFadeAlpha < 1.f)
|
||||||
{
|
{
|
||||||
m_flFadeAlpha += .1f;
|
m_flFadeAlpha += .05f;
|
||||||
|
m_flFadeAlpha = (std::min)(m_flFadeAlpha, 1.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Reset to full transparent.
|
else // Reset to full transparent.
|
||||||
{
|
{
|
||||||
m_flFadeAlpha = 0.f;
|
if (m_flFadeAlpha > 0.f)
|
||||||
|
{
|
||||||
|
m_flFadeAlpha -= .05f;
|
||||||
|
m_flFadeAlpha = (std::max)(m_flFadeAlpha, 0.f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,12 +201,18 @@ void CConsole::Think(void)
|
|||||||
{
|
{
|
||||||
if (m_flFadeAlpha < 1.f)
|
if (m_flFadeAlpha < 1.f)
|
||||||
{
|
{
|
||||||
m_flFadeAlpha += .1f;
|
m_flFadeAlpha += .05f;
|
||||||
|
m_flFadeAlpha = (std::min)(m_flFadeAlpha, 1.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Reset to full transparent.
|
else // Reset to full transparent.
|
||||||
{
|
{
|
||||||
m_flFadeAlpha = 0.f;
|
if (m_flFadeAlpha > 0.f)
|
||||||
|
{
|
||||||
|
m_flFadeAlpha -= .05f;
|
||||||
|
m_flFadeAlpha = (std::max)(m_flFadeAlpha, 0.f);
|
||||||
|
}
|
||||||
|
|
||||||
m_bReclaimFocus = true;
|
m_bReclaimFocus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ void ConVar::StaticInit(void)
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// ENGINE |
|
// ENGINE |
|
||||||
hostdesc = ConVar::StaticCreate("hostdesc", "", FCVAR_RELEASE, "Host game server description.", false, 0.f, false, 0.f, nullptr, nullptr);
|
hostdesc = ConVar::StaticCreate("hostdesc", "", FCVAR_RELEASE, "Host game server description.", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||||
sdk_fixedframe_tickinterval = ConVar::StaticCreate("sdk_fixedframe_tickinterval", "0.02", FCVAR_RELEASE, "The tick interval used by the SDK fixed frame.", false, 0.f, false, 0.f, nullptr, nullptr);
|
sdk_fixedframe_tickinterval = ConVar::StaticCreate("sdk_fixedframe_tickinterval", "0.01", FCVAR_RELEASE, "The tick interval used by the SDK fixed frame.", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||||
staticProp_defaultBuildFrustum = ConVar::StaticCreate("staticProp_defaultBuildFrustum", "0", FCVAR_DEVELOPMENTONLY, "Use the old solution for building static prop frustum culling.", false, 0.f, false, 0.f, nullptr, nullptr);
|
staticProp_defaultBuildFrustum = ConVar::StaticCreate("staticProp_defaultBuildFrustum", "0", FCVAR_DEVELOPMENTONLY, "Use the old solution for building static prop frustum culling.", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||||
|
|
||||||
curl_debug = ConVar::StaticCreate("curl_debug" , "0" , FCVAR_DEVELOPMENTONLY, "Determines whether or not to enable curl debug logging.", false, 0.f, false, 0.f, nullptr, "1 = curl logs; 0 (zero) = no logs.");
|
curl_debug = ConVar::StaticCreate("curl_debug" , "0" , FCVAR_DEVELOPMENTONLY, "Determines whether or not to enable curl debug logging.", false, 0.f, false, 0.f, nullptr, "1 = curl logs; 0 (zero) = no logs.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user