mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
Implement scanline improvements in installer wizard.
This commit is contained in:
parent
543bb51df6
commit
5bbd6801c7
1 changed files with 37 additions and 16 deletions
|
|
@ -538,7 +538,6 @@ static void DrawScanlineBars()
|
||||||
const uint32_t COLOR1 = IM_COL32(203, 255, 0, 55 * scanlinesAlpha);
|
const uint32_t COLOR1 = IM_COL32(203, 255, 0, 55 * scanlinesAlpha);
|
||||||
const uint32_t FADE_COLOR0 = IM_COL32(0, 0, 0, 255 * scanlinesAlpha);
|
const uint32_t FADE_COLOR0 = IM_COL32(0, 0, 0, 255 * scanlinesAlpha);
|
||||||
const uint32_t FADE_COLOR1 = IM_COL32(0, 0, 0, 0);
|
const uint32_t FADE_COLOR1 = IM_COL32(0, 0, 0, 0);
|
||||||
const uint32_t OUTLINE_COLOR = IM_COL32(115, 178, 104, 255 * scanlinesAlpha);
|
|
||||||
|
|
||||||
float height = Scale(105.0f) * ComputeMotionInstaller(g_appearTime, g_disappearTime, 0.0, SCANLINES_ANIMATION_DURATION);
|
float height = Scale(105.0f) * ComputeMotionInstaller(g_appearTime, g_disappearTime, 0.0, SCANLINES_ANIMATION_DURATION);
|
||||||
if (height < 1e-6f)
|
if (height < 1e-6f)
|
||||||
|
|
@ -563,16 +562,21 @@ static void DrawScanlineBars()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Bottom bar
|
// Bottom bar
|
||||||
|
ImVec2 max{ 0.0f, res.y - height };
|
||||||
|
SetProceduralOrigin(max);
|
||||||
|
|
||||||
drawList->AddRectFilledMultiColor
|
drawList->AddRectFilledMultiColor
|
||||||
(
|
(
|
||||||
{ res.x, res.y },
|
{ res.x, res.y },
|
||||||
{ 0.0f, res.y - height },
|
max,
|
||||||
COLOR0,
|
COLOR0,
|
||||||
COLOR0,
|
COLOR0,
|
||||||
COLOR1,
|
COLOR1,
|
||||||
COLOR1
|
COLOR1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ResetProceduralOrigin();
|
||||||
|
|
||||||
SetShaderModifier(IMGUI_SHADER_MODIFIER_NONE);
|
SetShaderModifier(IMGUI_SHADER_MODIFIER_NONE);
|
||||||
|
|
||||||
// Installer text
|
// Installer text
|
||||||
|
|
@ -580,23 +584,40 @@ static void DrawScanlineBars()
|
||||||
auto alphaMotion = ComputeMotionInstaller(g_appearTime, g_disappearTime, TITLE_ANIMATION_TIME, TITLE_ANIMATION_DURATION);
|
auto alphaMotion = ComputeMotionInstaller(g_appearTime, g_disappearTime, TITLE_ANIMATION_TIME, TITLE_ANIMATION_DURATION);
|
||||||
DrawTextWithOutline(g_dfsogeistdFont, Scale(42.0f), { g_aspectRatioOffsetX + Scale(285.0f), Scale(57.0f) }, IM_COL32(255, 195, 0, 255 * alphaMotion), headerText.c_str(), 4, IM_COL32(0, 0, 0, 255 * alphaMotion), IMGUI_SHADER_MODIFIER_TITLE_BEVEL);
|
DrawTextWithOutline(g_dfsogeistdFont, Scale(42.0f), { g_aspectRatioOffsetX + Scale(285.0f), Scale(57.0f) }, IM_COL32(255, 195, 0, 255 * alphaMotion), headerText.c_str(), 4, IM_COL32(0, 0, 0, 255 * alphaMotion), IMGUI_SHADER_MODIFIER_TITLE_BEVEL);
|
||||||
|
|
||||||
|
auto drawLine = [&](bool top)
|
||||||
|
{
|
||||||
|
float y = top ? height : (res.y - height);
|
||||||
|
|
||||||
|
const uint32_t TOP_COLOR0 = IM_COL32(222, 255, 189, 7 * scanlinesAlpha);
|
||||||
|
const uint32_t TOP_COLOR1 = IM_COL32(222, 255, 189, 65 * scanlinesAlpha);
|
||||||
|
const uint32_t BOTTOM_COLOR0 = IM_COL32(173, 255, 156, 65 * scanlinesAlpha);
|
||||||
|
const uint32_t BOTTOM_COLOR1 = IM_COL32(173, 255, 156, 7 * scanlinesAlpha);
|
||||||
|
|
||||||
|
drawList->AddRectFilledMultiColor(
|
||||||
|
{ 0.0f, y - Scale(2.0f) },
|
||||||
|
{ res.x, y },
|
||||||
|
top ? TOP_COLOR0 : BOTTOM_COLOR1,
|
||||||
|
top ? TOP_COLOR0 : BOTTOM_COLOR1,
|
||||||
|
top ? TOP_COLOR1 : BOTTOM_COLOR0,
|
||||||
|
top ? TOP_COLOR1 : BOTTOM_COLOR0);
|
||||||
|
|
||||||
|
drawList->AddRectFilledMultiColor(
|
||||||
|
{ 0.0f, y + Scale(1.0f) },
|
||||||
|
{ res.x, y + Scale(3.0f) },
|
||||||
|
top ? BOTTOM_COLOR0 : TOP_COLOR1,
|
||||||
|
top ? BOTTOM_COLOR0 : TOP_COLOR1,
|
||||||
|
top ? BOTTOM_COLOR1 : TOP_COLOR0,
|
||||||
|
top ? BOTTOM_COLOR1 : TOP_COLOR0);
|
||||||
|
|
||||||
|
const uint32_t CENTER_COLOR = IM_COL32(115, 178, 104, 255 * scanlinesAlpha);
|
||||||
|
drawList->AddRectFilled({ 0.0f, y }, { res.x, y + Scale(1.0f) }, CENTER_COLOR);
|
||||||
|
};
|
||||||
|
|
||||||
// Top bar line
|
// Top bar line
|
||||||
drawList->AddLine
|
drawLine(true);
|
||||||
(
|
|
||||||
{ 0.0f, height },
|
|
||||||
{ res.x, height },
|
|
||||||
OUTLINE_COLOR,
|
|
||||||
Scale(1)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Bottom bar line
|
// Bottom bar line
|
||||||
drawList->AddLine
|
drawLine(false);
|
||||||
(
|
|
||||||
{ 0.0f, res.y - height },
|
|
||||||
{ res.x, res.y - height },
|
|
||||||
OUTLINE_COLOR,
|
|
||||||
Scale(1)
|
|
||||||
);
|
|
||||||
|
|
||||||
DrawHeaderIcons();
|
DrawHeaderIcons();
|
||||||
DrawVersionString(g_newRodinFont, IM_COL32(255, 255, 255, 70 * alphaMotion));
|
DrawVersionString(g_newRodinFont, IM_COL32(255, 255, 255, 70 * alphaMotion));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue