mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
installer_wizard: move credits to header, improve formatting
This commit is contained in:
parent
8e58cbcbf2
commit
a9573584cd
3 changed files with 34 additions and 9 deletions
1
UnleashedRecomp/res/.gitignore
vendored
1
UnleashedRecomp/res/.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
![Ww][Ii][Nn]32/
|
![Ww][Ii][Nn]32/
|
||||||
*.c
|
*.c
|
||||||
*.h
|
*.h
|
||||||
|
!credits.h
|
||||||
19
UnleashedRecomp/res/credits.h
Normal file
19
UnleashedRecomp/res/credits.h
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
inline const char* g_credits[] =
|
||||||
|
{
|
||||||
|
"Skyth",
|
||||||
|
"Hyper",
|
||||||
|
"Darío",
|
||||||
|
"Sajid",
|
||||||
|
"RadiantDerg",
|
||||||
|
"PTKay",
|
||||||
|
"DeaThProj",
|
||||||
|
"NextinHKRY",
|
||||||
|
"M&M",
|
||||||
|
"saguinee",
|
||||||
|
"LadyLunanova",
|
||||||
|
"LJSTAR"
|
||||||
|
};
|
||||||
|
|
||||||
|
inline size_t g_creditsSize = 12;
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include <res/images/installer/miles_electric_icon.dds.h>
|
#include <res/images/installer/miles_electric_icon.dds.h>
|
||||||
#include <res/images/installer/arrow_circle.dds.h>
|
#include <res/images/installer/arrow_circle.dds.h>
|
||||||
#include <res/images/installer/pulse_install.dds.h>
|
#include <res/images/installer/pulse_install.dds.h>
|
||||||
|
#include <res/credits.h>
|
||||||
|
|
||||||
// One Shot Animations Constants
|
// One Shot Animations Constants
|
||||||
static constexpr double SCANLINES_ANIMATION_TIME = 0.0;
|
static constexpr double SCANLINES_ANIMATION_TIME = 0.0;
|
||||||
|
|
@ -151,6 +152,7 @@ static int g_currentCursorIndex = -1;
|
||||||
static int g_currentCursorDefault = 0;
|
static int g_currentCursorDefault = 0;
|
||||||
static bool g_currentCursorAccepted = false;
|
static bool g_currentCursorAccepted = false;
|
||||||
static std::vector<std::pair<ImVec2, ImVec2>> g_currentCursorRects;
|
static std::vector<std::pair<ImVec2, ImVec2>> g_currentCursorRects;
|
||||||
|
static std::string g_creditsStr;
|
||||||
|
|
||||||
class SDLEventListenerForInstaller : public SDLEventListener
|
class SDLEventListenerForInstaller : public SDLEventListener
|
||||||
{
|
{
|
||||||
|
|
@ -305,11 +307,8 @@ public:
|
||||||
g_currentCursorIndex = newCursorIndex;
|
g_currentCursorIndex = newCursorIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
g_sdlEventListenerForInstaller;
|
||||||
static SDLEventListenerForInstaller g_eventListener;
|
|
||||||
|
|
||||||
const char CREDITS_TEXT[] = "Skyth, Hyper, Darío, Sajid, RadiantDerg, PTKay, DeaThProj, NextinHKRY, M&M, LadyLunanova";
|
|
||||||
|
|
||||||
static std::string& GetWizardText(WizardPage page)
|
static std::string& GetWizardText(WizardPage page)
|
||||||
{
|
{
|
||||||
|
|
@ -710,7 +709,7 @@ static void DrawDescriptionContainer()
|
||||||
hedgeDevStr
|
hedgeDevStr
|
||||||
);
|
);
|
||||||
|
|
||||||
auto marqueeTextSize = g_seuratFont->CalcTextSizeA(fontSize, FLT_MAX, 0, CREDITS_TEXT);
|
auto marqueeTextSize = g_seuratFont->CalcTextSizeA(fontSize, FLT_MAX, 0, g_creditsStr.c_str());
|
||||||
auto marqueeTextMarginX = Scale(5);
|
auto marqueeTextMarginX = Scale(5);
|
||||||
auto marqueeTextMarginY = Scale(15);
|
auto marqueeTextMarginY = Scale(15);
|
||||||
|
|
||||||
|
|
@ -719,7 +718,7 @@ static void DrawDescriptionContainer()
|
||||||
ImVec2 textMax = { g_aspectRatioOffsetX + Scale(CONTAINER_X) + Scale(CONTAINER_WIDTH), g_aspectRatioOffsetY + Scale(CONTAINER_Y) + Scale(CONTAINER_HEIGHT) };
|
ImVec2 textMax = { g_aspectRatioOffsetX + Scale(CONTAINER_X) + Scale(CONTAINER_WIDTH), g_aspectRatioOffsetY + Scale(CONTAINER_Y) + Scale(CONTAINER_HEIGHT) };
|
||||||
|
|
||||||
SetMarqueeFade(textMin, textMax, Scale(32));
|
SetMarqueeFade(textMin, textMax, Scale(32));
|
||||||
DrawTextWithMarquee(g_seuratFont, fontSize, textPos, textMin, textMax, colWhite, CREDITS_TEXT, g_installerEndTime, 0.9, Scale(200));
|
DrawTextWithMarquee(g_seuratFont, fontSize, textPos, textMin, textMax, colWhite, g_creditsStr.c_str(), g_installerEndTime, 0.9, Scale(200));
|
||||||
ResetMarqueeFade();
|
ResetMarqueeFade();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1470,6 +1469,12 @@ void InstallerWizard::Init()
|
||||||
g_arrowCircle = LOAD_ZSTD_TEXTURE(g_arrow_circle);
|
g_arrowCircle = LOAD_ZSTD_TEXTURE(g_arrow_circle);
|
||||||
g_pulseInstall = LOAD_ZSTD_TEXTURE(g_pulse_install);
|
g_pulseInstall = LOAD_ZSTD_TEXTURE(g_pulse_install);
|
||||||
g_upHedgeDev = LOAD_ZSTD_TEXTURE(g_hedgedev);
|
g_upHedgeDev = LOAD_ZSTD_TEXTURE(g_hedgedev);
|
||||||
|
|
||||||
|
for (int i = 0; i < g_creditsSize; i++)
|
||||||
|
{
|
||||||
|
g_creditsStr += g_credits[i];
|
||||||
|
g_creditsStr += " ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallerWizard::Draw()
|
void InstallerWizard::Draw()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue