summaryrefslogtreecommitdiffstats
path: root/src/render/Font.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-30 19:46:37 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-30 19:46:37 +0100
commitc193ade58b8956d3a72ef91507c8ca23a043828d (patch)
tree558f293f37ce4a2f1b4371e58c802752c0839ab2 /src/render/Font.cpp
parentfix (diff)
downloadre3-c193ade58b8956d3a72ef91507c8ca23a043828d.tar
re3-c193ade58b8956d3a72ef91507c8ca23a043828d.tar.gz
re3-c193ade58b8956d3a72ef91507c8ca23a043828d.tar.bz2
re3-c193ade58b8956d3a72ef91507c8ca23a043828d.tar.lz
re3-c193ade58b8956d3a72ef91507c8ca23a043828d.tar.xz
re3-c193ade58b8956d3a72ef91507c8ca23a043828d.tar.zst
re3-c193ade58b8956d3a72ef91507c8ca23a043828d.zip
Diffstat (limited to 'src/render/Font.cpp')
-rw-r--r--src/render/Font.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index de1ee8b4..0f5930ee 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -406,16 +406,19 @@ CFont::DrawButton(float x, float y)
if (PS2Symbol != BUTTON_NONE) {
CRect rect;
rect.left = x;
- rect.top = Details.scaleY + Details.scaleY + y;
- rect.right = Details.scaleY * 17.0f + x;
- rect.bottom = Details.scaleY * 19.0f + y;
+ rect.top = RenderState.scaleY + RenderState.scaleY + y;
+ rect.right = RenderState.scaleY * 17.0f + x;
+ rect.bottom = RenderState.scaleY * 19.0f + y;
int vertexAlphaState;
void *raster;
RwRenderStateGet(rwRENDERSTATEVERTEXALPHAENABLE, &vertexAlphaState);
RwRenderStateGet(rwRENDERSTATETEXTURERASTER, &raster);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
- ButtonSprite[PS2Symbol].Draw(rect, CRGBA(255, 255, 255, Details.color.a));
+ if (RenderState.bIsShadow)
+ ButtonSprite[PS2Symbol].Draw(rect, RenderState.color);
+ else
+ ButtonSprite[PS2Symbol].Draw(rect, CRGBA(255, 255, 255, RenderState.color.a));
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, raster);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)vertexAlphaState);
}
@@ -585,7 +588,7 @@ CFont::RenderFontBuffer()
#ifdef BUTTON_ICONS
if(PS2Symbol != BUTTON_NONE) {
DrawButton(textPosX, textPosY);
- textPosX += Details.scaleY * 17.0f;
+ textPosX += RenderState.scaleY * 17.0f;
PS2Symbol = BUTTON_NONE;
}
#endif