mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 13:21:42 +00:00
Handle center UI scale option for rings going to HUD.
This commit is contained in:
parent
4467a5bfc3
commit
285c2541ee
2 changed files with 18 additions and 3 deletions
|
|
@ -1019,8 +1019,17 @@ static double ComputeObjGetItemX(uint32_t type)
|
||||||
|
|
||||||
x *= g_aspectRatioScale;
|
x *= g_aspectRatioScale;
|
||||||
|
|
||||||
if (type != 47)
|
double scaleOffset = (1280.0 * (1.0 - g_aspectRatioScale));
|
||||||
x += g_aspectRatioOffsetX * 2.0 + (1280.0 * (1.0 - g_aspectRatioScale));
|
|
||||||
|
if (Config::UIScaleMode == EUIScaleMode::Edge)
|
||||||
|
{
|
||||||
|
if (type != 47) // Medal
|
||||||
|
x += g_aspectRatioOffsetX * 2.0 + scaleOffset;
|
||||||
|
}
|
||||||
|
else if (Config::UIScaleMode == EUIScaleMode::Centre)
|
||||||
|
{
|
||||||
|
x += g_aspectRatioOffsetX + scaleOffset;
|
||||||
|
}
|
||||||
|
|
||||||
auto backBuffer = Video::GetBackBuffer();
|
auto backBuffer = Video::GetBackBuffer();
|
||||||
return (x - (0.5 * backBuffer->width)) / (0.5 * backBuffer->height) * OBJ_GET_ITEM_TANGENT;
|
return (x - (0.5 * backBuffer->width)) / (0.5 * backBuffer->height) * OBJ_GET_ITEM_TANGENT;
|
||||||
|
|
|
||||||
|
|
@ -157,12 +157,18 @@ static void DrawScanlineBars()
|
||||||
|
|
||||||
SetShaderModifier(IMGUI_SHADER_MODIFIER_NONE);
|
SetShaderModifier(IMGUI_SHADER_MODIFIER_NONE);
|
||||||
|
|
||||||
|
float optionsX;
|
||||||
|
if (g_aspectRatio >= WIDE_ASPECT_RATIO)
|
||||||
|
optionsX = g_aspectRatioOffsetX;
|
||||||
|
else
|
||||||
|
optionsX = (1.0f - g_narrowOffsetScale) * -20.0f;
|
||||||
|
|
||||||
// Options text
|
// Options text
|
||||||
DrawTextWithOutline
|
DrawTextWithOutline
|
||||||
(
|
(
|
||||||
g_dfsogeistdFont,
|
g_dfsogeistdFont,
|
||||||
Scale(48.0f),
|
Scale(48.0f),
|
||||||
{ Scale((1.0f - g_narrowOffsetScale) * -20.0f + 122.0f), Scale(56.0f) },
|
{ Scale(optionsX + 122.0f), Scale(56.0f) },
|
||||||
IM_COL32(255, 190, 33, 255),
|
IM_COL32(255, 190, 33, 255),
|
||||||
Localise("Options_Header_Name").c_str(),
|
Localise("Options_Header_Name").c_str(),
|
||||||
4,
|
4,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue