Fix the custom UI drawing in front of ImGui windows. (#335)

This commit is contained in:
Skyth (Asilkan) 2025-02-09 14:25:06 +03:00 committed by GitHub
parent 138d9b616d
commit 7c1aea4e24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 51 additions and 51 deletions

View file

@ -11,7 +11,7 @@ ImGuiCallbackData* AddImGuiCallback(ImGuiCallback callback)
auto& callbackData = g_callbackData[g_callbackDataIndex];
++g_callbackDataIndex;
ImGui::GetForegroundDrawList()->AddCallback(reinterpret_cast<ImDrawCallback>(callback), callbackData.get());
ImGui::GetBackgroundDrawList()->AddCallback(reinterpret_cast<ImDrawCallback>(callback), callbackData.get());
return callbackData.get();
}

View file

@ -2321,7 +2321,7 @@ static void DrawImGui()
Fader::Draw();
BlackBar::Draw();
assert(ImGui::GetForegroundDrawList()->_ClipRectStack.Size == 1 && "Some clip rects were not removed from the stack!");
assert(ImGui::GetBackgroundDrawList()->_ClipRectStack.Size == 1 && "Some clip rects were not removed from the stack!");
DrawProfiler();
ImGui::Render();

View file

@ -67,7 +67,7 @@ static void ResetSelection()
static void DrawContainer(ImVec2 min, ImVec2 max, ImU32 gradientTop, ImU32 gradientBottom, float alpha = 1, float cornerRadius = 25)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
DrawPauseContainer(min, max, alpha);
@ -76,7 +76,7 @@ static void DrawContainer(ImVec2 min, ImVec2 max, ImU32 gradientTop, ImU32 gradi
static void DrawHeaderContainer(const char* text)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto fontSize = Scale(24);
auto textSize = g_fntNewRodinUB->CalcTextSizeA(fontSize, FLT_MAX, 0, text);
auto cornerRadius = 23;
@ -124,7 +124,7 @@ static void DrawHeaderContainer(const char* text)
static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievement, bool isUnlocked)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto clipRectMin = drawList->GetClipRectMin();
auto clipRectMax = drawList->GetClipRectMax();
@ -339,7 +339,7 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
static void DrawTrophySparkles(ImVec2 min, ImVec2 max, int recordCount, int trophyFrameIndex)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
constexpr auto recordsHalfTotal = ACH_RECORDS / 2;
@ -427,7 +427,7 @@ static void DrawTrophySparkles(ImVec2 min, ImVec2 max, int recordCount, int trop
static void DrawAchievementTotal(ImVec2 min, ImVec2 max)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
// Transparency fade animation.
auto alpha = Cubic(0, 1, ComputeMotion(g_appearTime, COUNTER_INTRO_FADE_START, COUNTER_INTRO_FADE_END));
@ -511,7 +511,7 @@ static void DrawAchievementTotal(ImVec2 min, ImVec2 max)
static void DrawContentContainer()
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
// Expand/retract animation.
auto motion = g_isClosing

View file

@ -30,7 +30,7 @@ static ImFont* g_fntSeurat;
static bool DrawContainer(ImVec2 min, ImVec2 max, float cornerRadius = 25)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
// Expand/retract animation.
auto containerMotion = ComputeMotion(g_appearTime, OVERLAY_CONTAINER_COMMON_MOTION_START, OVERLAY_CONTAINER_COMMON_MOTION_END);
@ -88,7 +88,7 @@ void AchievementOverlay::Draw()
if (ImGui::GetTime() - g_appearTime >= OVERLAY_DURATION)
AchievementOverlay::Close();
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
auto strAchievementUnlocked = Localise("Achievements_Unlock").c_str();

View file

@ -155,7 +155,7 @@ static void DrawGuide(float* offset, ImVec2 regionMin, ImVec2 regionMax, EButton
EButtonAlignment alignment, ImVec2 iconMin, ImVec2 iconMax, EFontQuality fontQuality,
ImVec2 textSize, float fontSize, const char* text)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto _icon = icon;
auto iconWidth = Scale(g_iconWidths[icon]);
auto dualIconMarginX = Scale(25);
@ -235,7 +235,7 @@ void ButtonGuide::Draw()
if (!s_isVisible)
return;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
ImVec2 regionMin = { g_aspectRatioOffsetX + Scale(g_sideMargins), g_aspectRatioOffsetY * 2.0f + Scale(720.0f - 102.0f) };

View file

@ -45,7 +45,7 @@ void Fader::Draw()
auto colour = IM_COL32(g_colour & 0xFF, (g_colour >> 8) & 0xFF, (g_colour >> 16) & 0xFF, 255 * alpha);
ImGui::GetForegroundDrawList()->AddRectFilled({ 0, 0 }, ImGui::GetIO().DisplaySize, colour);
ImGui::GetBackgroundDrawList()->AddRectFilled({ 0, 0 }, ImGui::GetIO().DisplaySize, colour);
}
static void DoFade(bool isFadeIn, float duration, std::function<void()> endCallback, float endCallbackDelay)

View file

@ -169,7 +169,7 @@ double ComputeMotion(double duration, double offset, double total)
void DrawPauseContainer(ImVec2 min, ImVec2 max, float alpha)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto commonWidth = Scale(35);
auto commonHeight = Scale(35);
@ -200,7 +200,7 @@ void DrawPauseContainer(ImVec2 min, ImVec2 max, float alpha)
void DrawPauseHeaderContainer(ImVec2 min, ImVec2 max, float alpha)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto commonWidth = Scale(35);
@ -217,14 +217,14 @@ void DrawPauseHeaderContainer(ImVec2 min, ImVec2 max, float alpha)
void DrawTextBasic(const ImFont* font, float fontSize, const ImVec2& pos, ImU32 colour, const char* text)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
drawList->AddText(font, fontSize, pos, colour, text, nullptr);
}
void DrawTextWithMarquee(const ImFont* font, float fontSize, const ImVec2& position, const ImVec2& min, const ImVec2& max, ImU32 color, const char* text, double time, double delay, double speed)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto rectWidth = max.x - min.x;
auto textSize = font->CalcTextSizeA(fontSize, FLT_MAX, 0, text);
auto textX = position.x - fmodf(std::max(0.0, ImGui::GetTime() - (time + delay)) * speed, textSize.x + rectWidth);
@ -278,7 +278,7 @@ void DrawTextWithMarquee(const ImFont* font, float fontSize, const ImVec2& posit
void DrawTextWithMarqueeShadow(const ImFont* font, float fontSize, const ImVec2& pos, const ImVec2& min, const ImVec2& max, ImU32 colour, const char* text, double time, double delay, double speed, float offset, float radius, ImU32 shadowColour)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto rectWidth = max.x - min.x;
auto textSize = font->CalcTextSizeA(fontSize, FLT_MAX, 0, text);
auto textX = pos.x - fmodf(std::max(0.0, ImGui::GetTime() - (time + delay)) * speed, textSize.x + rectWidth);
@ -296,7 +296,7 @@ void DrawTextWithMarqueeShadow(const ImFont* font, float fontSize, const ImVec2&
void DrawTextWithOutline(const ImFont* font, float fontSize, const ImVec2& pos, ImU32 color, const char* text, float outlineSize, ImU32 outlineColor, uint32_t shaderModifier)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
SetOutline(outlineSize);
drawList->AddText(font, fontSize, pos, outlineColor, text);
@ -313,7 +313,7 @@ void DrawTextWithOutline(const ImFont* font, float fontSize, const ImVec2& pos,
void DrawTextWithShadow(const ImFont* font, float fontSize, const ImVec2& pos, ImU32 colour, const char* text, float offset, float radius, ImU32 shadowColour)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
offset = Scale(offset);
@ -732,7 +732,7 @@ ImU32 ColourLerp(ImU32 c0, ImU32 c1, float t)
void DrawVersionString(const ImFont* font, const ImU32 col)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
auto fontSize = Scale(12);
auto textMargin = Scale(2);
@ -743,7 +743,7 @@ void DrawVersionString(const ImFont* font, const ImU32 col)
void DrawSelectionContainer(ImVec2 min, ImVec2 max, bool fadeTop)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
static auto breatheStart = ImGui::GetTime();
auto alpha = BREATHE_MOTION(1.0f, 0.55f, breatheStart, 0.92f);
@ -787,7 +787,7 @@ void DrawSelectionContainer(ImVec2 min, ImVec2 max, bool fadeTop)
void DrawToggleLight(ImVec2 pos, bool isEnabled, float alpha)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto lightSize = Scale(14);
auto lightCol = IM_COL32(255, 255, 255, 255 * alpha);

View file

@ -464,7 +464,7 @@ static void ResetCursorRects()
static void DrawBackground()
{
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
drawList->AddRectFilled({ 0.0, 0.0 }, res, IM_COL32_BLACK);
}
@ -483,7 +483,7 @@ static void DrawLeftImage()
int a = std::lround(255.0 * imageAlpha);
GuestTexture *guestTexture = g_installTextures[installTextureIndex % g_installTextures.size()].get();
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
ImVec2 min = { g_aspectRatioOffsetX + Scale(IMAGE_X), g_aspectRatioOffsetY + Scale(IMAGE_Y) };
ImVec2 max = { min.x + Scale(IMAGE_WIDTH), min.y + Scale(IMAGE_HEIGHT) };
drawList->AddImage(guestTexture, min, max, ImVec2(0, 0), ImVec2(1, 1), IM_COL32(255, 255, 255, a));
@ -491,7 +491,7 @@ static void DrawLeftImage()
static void DrawHeaderIconsForInstallPhase(double iconsPosX, double iconsPosY, double iconsScale)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
// Arrow Circle Icon
ImVec2 arrowCircleMin = { g_aspectRatioOffsetX + Scale(iconsPosX - iconsScale / 2), Scale(iconsPosY - iconsScale / 2) };
@ -546,7 +546,7 @@ static void DrawHeaderIconsForInstallPhase(double iconsPosX, double iconsPosY, d
static void DrawHeaderIcons()
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
float iconsPosX = 256.0f;
float iconsPosY = 80.0f;
@ -582,7 +582,7 @@ static void DrawScanlineBars()
}
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
SetShaderModifier(IMGUI_SHADER_MODIFIER_SCANLINE);
@ -680,7 +680,7 @@ static void DrawScanlineBars()
static void DrawContainer(ImVec2 min, ImVec2 max, bool isTextArea)
{
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
double gridAlpha = ComputeMotionInstaller(g_appearTime, g_disappearTime,
isTextArea ? CONTAINER_INNER_TIME : CONTAINER_OUTER_TIME,
@ -711,7 +711,7 @@ static void DrawContainer(ImVec2 min, ImVec2 max, bool isTextArea)
static void DrawDescriptionContainer()
{
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto fontSize = Scale(28.0f);
auto annotationFontSize = fontSize * ANNOTATION_FONT_SIZE_MODIFIER;
@ -896,7 +896,7 @@ static void DrawDescriptionContainer()
static void DrawButtonContainer(ImVec2 min, ImVec2 max, int baser, int baseg, float alpha)
{
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
SetShaderModifier(IMGUI_SHADER_MODIFIER_SCANLINE_BUTTON);
drawList->AddRectFilledMultiColor(min, max, IM_COL32(baser, baseg + 130, 0, 223 * alpha), IM_COL32(baser, baseg + 130, 0, 178 * alpha), IM_COL32(baser, baseg + 130, 0, 223 * alpha), IM_COL32(baser, baseg + 130, 0, 178 * alpha));
drawList->AddRectFilledMultiColor(min, max, IM_COL32(baser, baseg, 0, 13 * alpha), IM_COL32(baser, baseg, 0, 0), IM_COL32(baser, baseg, 0, 55 * alpha), IM_COL32(baser, baseg, 0, 6 * alpha));
@ -924,7 +924,7 @@ static void DrawButton(ImVec2 min, ImVec2 max, const char *buttonText, bool sour
buttonPressed = false;
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
float alpha = ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_INNER_TIME, CONTAINER_INNER_DURATION);
if (!buttonEnabled)
{
@ -1030,7 +1030,7 @@ static void DrawSourceButton(ButtonColumn buttonColumn, float yRatio, const char
static void DrawProgressBar(float progressRatio)
{
auto &res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
float alpha = 1.0;
const uint32_t innerColor0 = IM_COL32(0, 65, 0, 255 * alpha);
const uint32_t innerColor1 = IM_COL32(0, 32, 0, 255 * alpha);
@ -1532,7 +1532,7 @@ static void DrawHorizontalBorder(bool bottomBorder)
const uint32_t FADE_COLOR_LEFT = IM_COL32(155, 155, 155, 0);
const uint32_t SOLID_COLOR = IM_COL32(155, 200, 155, 255);
const uint32_t FADE_COLOR_RIGHT = IM_COL32(155, 225, 155, 0);
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
double borderScale = 1.0 - ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_LINE_ANIMATION_TIME, CONTAINER_LINE_ANIMATION_DURATION);
float midX = g_aspectRatioOffsetX + Scale(CONTAINER_X + CONTAINER_WIDTH / 5);
float minX = std::lerp(g_aspectRatioOffsetX + Scale(CONTAINER_X - BORDER_SIZE - BORDER_OVERSHOOT), midX, borderScale);
@ -1564,7 +1564,7 @@ static void DrawVerticalBorder(bool rightBorder)
{
const uint32_t SOLID_COLOR = IM_COL32(155, rightBorder ? 225 : 155, 155, 255);
const uint32_t FADE_COLOR = IM_COL32(155, rightBorder ? 225 : 155, 155, 0);
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
double borderScale = 1.0 - ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_LINE_ANIMATION_TIME, CONTAINER_LINE_ANIMATION_DURATION);
float minX = g_aspectRatioOffsetX + (rightBorder ? Scale(CONTAINER_X + CONTAINER_WIDTH) : Scale(CONTAINER_X - BORDER_SIZE));
float maxX = minX + Scale(BORDER_SIZE);
@ -1661,7 +1661,7 @@ static void PickerDrawForeground()
{
if (g_currentPickerVisible)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
drawList->AddRectFilled({ 0.0f, 0.0f }, ImGui::GetIO().DisplaySize, IM_COL32(0, 0, 0, 190));
}
}

View file

@ -150,7 +150,7 @@ g_sdlEventListenerForMessageWindow;
bool DrawContainer(float appearTime, ImVec2 centre, ImVec2 max, bool isForeground = true)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
ImVec2 _min = { centre.x - max.x, centre.y - max.y };
ImVec2 _max = { centre.x + max.x, centre.y + max.y };
@ -201,7 +201,7 @@ bool DrawContainer(float appearTime, ImVec2 centre, ImVec2 max, bool isForegroun
void DrawButton(int rowIndex, float yOffset, float width, float height, std::string& text)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto clipRectMin = drawList->GetClipRectMin();
auto clipRectMax = drawList->GetClipRectMax();
@ -275,7 +275,7 @@ void MessageWindow::Draw()
if (!s_isVisible)
return;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
ImVec2 centre = { res.x / 2, res.y / 2 };

View file

@ -127,7 +127,7 @@ static void DrawTitle()
g_titleAnimBegin = false;
}
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto x = Scale(122);
auto y = Scale(56);
@ -238,7 +238,7 @@ static void DrawScanlineBars()
float height = Scale(105.0f);
auto& res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
if (OptionsMenu::s_pauseMenuType != SWA::eMenuType_WorldMap)
{
@ -350,7 +350,7 @@ static void DrawContainer(ImVec2 min, ImVec2 max, bool drawRightOutline)
max.y = Lerp(center, max.y, containerHeight);
auto& res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
double outerAlpha = g_isStage ? 1.0 : ComputeMotion(g_appearTime, CONTAINER_OUTER_TIME, CONTAINER_OUTER_DURATION);
double innerAlpha = g_isStage ? 1.0 : ComputeMotion(g_appearTime, CONTAINER_INNER_TIME, CONTAINER_INNER_DURATION);
@ -454,7 +454,7 @@ static bool DrawCategories()
Game_PlaySound("sys_actstg_score");
}
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto clipRectMin = drawList->GetClipRectMin();
auto clipRectMax = drawList->GetClipRectMax();
@ -601,7 +601,7 @@ static void DrawSelectionArrows(ImVec2 min, ImVec2 max, bool isLeftTapped, bool
static bool isLeftArrowMotion = false;
static bool isRightArrowMotion = false;
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto gridSize = Scale(GRID_SIZE);
auto width = gridSize * 2.5f;
auto padding = gridSize;
@ -725,7 +725,7 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef<T>* conf
bool isAccessible, std::string* inaccessibleReason = nullptr,
T valueMin = T(0), T valueCenter = T(0.5), T valueMax = T(1), bool isSlider = true)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto clipRectMin = drawList->GetClipRectMin();
auto clipRectMax = drawList->GetClipRectMax();
auto& padState = SWA::CInputState::GetInstance()->GetPadState();
@ -1153,7 +1153,7 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef<T>* conf
static void DrawConfigOptions()
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto clipRectMin = drawList->GetClipRectMin();
auto clipRectMax = drawList->GetClipRectMax();
@ -1363,7 +1363,7 @@ static void DrawConfigOptions()
static void DrawSettingsPanel(ImVec2 settingsMin, ImVec2 settingsMax)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
SetProceduralOrigin(settingsMin);
DrawContainer(settingsMin, settingsMax, true);
@ -1387,7 +1387,7 @@ static void DrawSettingsPanel(ImVec2 settingsMin, ImVec2 settingsMax)
static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
SetProceduralOrigin(infoMin);
DrawContainer(infoMin, infoMax, false);
@ -1584,7 +1584,7 @@ static void SetOptionsMenuVisible(bool isVisible)
static bool DrawMilesElectric()
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
// Compensate for the lack of CSD UI dimming the background.
@ -1637,7 +1637,7 @@ static bool DrawMilesElectric()
static bool DrawFadeTransition()
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
auto scaleMotion = ComputeMotion(g_appearTime, 0, MILES_ELECTRIC_SCALE_DURATION);
@ -1682,7 +1682,7 @@ void OptionsMenu::Draw()
if (!g_isClosing)
{
auto drawList = ImGui::GetForegroundDrawList();
auto drawList = ImGui::GetBackgroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
if (g_isStage)