removed unused added public wrap,edited yadjust & removed unused variables in set uiscale

This commit is contained in:
KKNecmi 2026-03-07 10:06:20 +03:00
parent 4322cc49c7
commit 02dd039e58
4 changed files with 9 additions and 28 deletions

View file

@ -152,26 +152,17 @@ void ChatScreen::render(int xm, int ym, float a)
if (uiSetting == 0)
{
textScale = textScale * 1.5f;
barTopOffset = 10;
barBottomOffset = 0;
textYOffset = 8;
yAdjust = 50;
yAdjust = 70;
}
else if (uiSetting == 1)
{
textScale = textScale * 1.0f;
barTopOffset = 14;
barBottomOffset = 2;
textYOffset = 12;
yAdjust = 0;
}
else if (uiSetting == 2)
{
textScale = textScale * 0.75f;
barTopOffset = 18;
barBottomOffset = 4;
textYOffset = 16;
yAdjust = -50;
yAdjust = -70;
}
int barY = height - barTopOffset + yAdjust;
@ -192,7 +183,7 @@ void ChatScreen::render(int xm, int ym, float a)
glPushMatrix();
glTranslatef((float)x, (float)textY, 0);
glScalef(textScale, textScale, 1.0f);
font->drawShadowLiteralCustom(beforeCursor, 0, 0, 0xe0e0e0, 0x000000);
font->drawShadowLiteralCustom(beforeCursor, 0, 0, 1, 1, 0xe0e0e0, 0x000000);
glPopMatrix();
x += (int)(font->widthLiteral(beforeCursor) * textScale);
@ -202,7 +193,7 @@ void ChatScreen::render(int xm, int ym, float a)
glPushMatrix();
glTranslatef((float)x, (float)textY, 0);
glScalef(textScale, textScale, 1.0f);
font->drawShadowLiteralCustom(L"_", 0, 0, 0xe0e0e0, 0x000000);
font->drawShadowLiteralCustom(L"_", 0, 0, 1, 1, 0xe0e0e0, 0x000000);
glPopMatrix();
}
@ -211,7 +202,7 @@ void ChatScreen::render(int xm, int ym, float a)
glPushMatrix();
glTranslatef((float)x, (float)textY, 0);
glScalef(textScale, textScale, 1.0f);
font->drawShadowLiteralCustom(afterCursor, 0, 0, 0xe0e0e0, 0x000000);
font->drawShadowLiteralCustom(afterCursor, 0, 0, 1, 1, 0xe0e0e0, 0x000000);
glPopMatrix();
Screen::render(xm, ym, a);

View file

@ -251,9 +251,9 @@ void Font::drawShadowLiteral(const wstring& str, int x, int y, int color)
drawLiteral(str, x, y, color);
}
void Font::drawShadowLiteralCustom(const wstring& str, int x, int y, int color, int shadowColor)
void Font::drawShadowLiteralCustom(const wstring& str, int x, int y, int xplus, int yplus, int color, int shadowColor)
{
drawLiteral(str, x + 1, y + 1, shadowColor);
drawLiteral(str, x + xplus, y + yplus, shadowColor);
drawLiteral(str, x, y, color);
}
@ -281,11 +281,6 @@ void Font::draw(const wstring& str, int x, int y, int color)
draw(str, x, y, color, false);
}
void Font::drawLiteralPublic(const wstring& str, int x, int y, int color)
{
drawLiteral(str, x, y, color);
}
wstring Font::reorderBidi(const wstring &str)
{
// 4J Not implemented

View file

@ -53,10 +53,9 @@ private:
public:
void drawShadow(const wstring& str, int x, int y, int color);
void drawShadowLiteral(const wstring& str, int x, int y, int color); // draw without interpreting § codes
void drawShadowLiteralCustom(const wstring& str, int x, int y, int color, int shadowColor); // custom shadow color
void drawShadowLiteralCustom(const wstring& str, int x, int y, int xplus, int yplus, int color, int shadowColor); // custom shadow color
void drawShadowWordWrap(const wstring &str, int x, int y, int w, int color, int h); // 4J Added h param
void draw(const wstring &str, int x, int y, int color);
void drawLiteralPublic(const wstring& str, int x, int y, int color);
/**
* Reorders the string according to bidirectional levels. A bit expensive at
* the moment.

View file

@ -1030,11 +1030,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
glPushMatrix();
glTranslatef((float)(iSafezoneXHalf+4), (float)(y), 0);
glScalef(textScale, textScale, scaleFactor);
glPushMatrix();
glScalef(1.0f, 1.0f, 1.0f);
font->drawLiteralPublic(msg, 2, 2, 0x000000 + (alpha / 2 << 24));
glPopMatrix();
font->drawLiteralPublic(msg, 0, 0, 0xffffff + (alpha << 24));
font->drawShadowLiteralCustom(msg, 0, 0, 2, 2, 0xffffff + (alpha << 24), 0x000000 + (alpha / 2 << 24));
glPopMatrix();
}
}