mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
removed unused added public wrap,edited yadjust & removed unused variables in set uiscale
This commit is contained in:
parent
4322cc49c7
commit
02dd039e58
|
|
@ -152,26 +152,17 @@ void ChatScreen::render(int xm, int ym, float a)
|
||||||
if (uiSetting == 0)
|
if (uiSetting == 0)
|
||||||
{
|
{
|
||||||
textScale = textScale * 1.5f;
|
textScale = textScale * 1.5f;
|
||||||
barTopOffset = 10;
|
yAdjust = 70;
|
||||||
barBottomOffset = 0;
|
|
||||||
textYOffset = 8;
|
|
||||||
yAdjust = 50;
|
|
||||||
}
|
}
|
||||||
else if (uiSetting == 1)
|
else if (uiSetting == 1)
|
||||||
{
|
{
|
||||||
textScale = textScale * 1.0f;
|
textScale = textScale * 1.0f;
|
||||||
barTopOffset = 14;
|
|
||||||
barBottomOffset = 2;
|
|
||||||
textYOffset = 12;
|
|
||||||
yAdjust = 0;
|
yAdjust = 0;
|
||||||
}
|
}
|
||||||
else if (uiSetting == 2)
|
else if (uiSetting == 2)
|
||||||
{
|
{
|
||||||
textScale = textScale * 0.75f;
|
textScale = textScale * 0.75f;
|
||||||
barTopOffset = 18;
|
yAdjust = -70;
|
||||||
barBottomOffset = 4;
|
|
||||||
textYOffset = 16;
|
|
||||||
yAdjust = -50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int barY = height - barTopOffset + yAdjust;
|
int barY = height - barTopOffset + yAdjust;
|
||||||
|
|
@ -192,7 +183,7 @@ void ChatScreen::render(int xm, int ym, float a)
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef((float)x, (float)textY, 0);
|
glTranslatef((float)x, (float)textY, 0);
|
||||||
glScalef(textScale, textScale, 1.0f);
|
glScalef(textScale, textScale, 1.0f);
|
||||||
font->drawShadowLiteralCustom(beforeCursor, 0, 0, 0xe0e0e0, 0x000000);
|
font->drawShadowLiteralCustom(beforeCursor, 0, 0, 1, 1, 0xe0e0e0, 0x000000);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
x += (int)(font->widthLiteral(beforeCursor) * textScale);
|
x += (int)(font->widthLiteral(beforeCursor) * textScale);
|
||||||
|
|
@ -202,7 +193,7 @@ void ChatScreen::render(int xm, int ym, float a)
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef((float)x, (float)textY, 0);
|
glTranslatef((float)x, (float)textY, 0);
|
||||||
glScalef(textScale, textScale, 1.0f);
|
glScalef(textScale, textScale, 1.0f);
|
||||||
font->drawShadowLiteralCustom(L"_", 0, 0, 0xe0e0e0, 0x000000);
|
font->drawShadowLiteralCustom(L"_", 0, 0, 1, 1, 0xe0e0e0, 0x000000);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,7 +202,7 @@ void ChatScreen::render(int xm, int ym, float a)
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef((float)x, (float)textY, 0);
|
glTranslatef((float)x, (float)textY, 0);
|
||||||
glScalef(textScale, textScale, 1.0f);
|
glScalef(textScale, textScale, 1.0f);
|
||||||
font->drawShadowLiteralCustom(afterCursor, 0, 0, 0xe0e0e0, 0x000000);
|
font->drawShadowLiteralCustom(afterCursor, 0, 0, 1, 1, 0xe0e0e0, 0x000000);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
Screen::render(xm, ym, a);
|
Screen::render(xm, ym, a);
|
||||||
|
|
|
||||||
|
|
@ -251,9 +251,9 @@ void Font::drawShadowLiteral(const wstring& str, int x, int y, int color)
|
||||||
drawLiteral(str, x, y, 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);
|
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);
|
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)
|
wstring Font::reorderBidi(const wstring &str)
|
||||||
{
|
{
|
||||||
// 4J Not implemented
|
// 4J Not implemented
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,9 @@ private:
|
||||||
public:
|
public:
|
||||||
void drawShadow(const wstring& str, int x, int y, int color);
|
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 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 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 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
|
* Reorders the string according to bidirectional levels. A bit expensive at
|
||||||
* the moment.
|
* the moment.
|
||||||
|
|
|
||||||
|
|
@ -1030,11 +1030,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef((float)(iSafezoneXHalf+4), (float)(y), 0);
|
glTranslatef((float)(iSafezoneXHalf+4), (float)(y), 0);
|
||||||
glScalef(textScale, textScale, scaleFactor);
|
glScalef(textScale, textScale, scaleFactor);
|
||||||
glPushMatrix();
|
font->drawShadowLiteralCustom(msg, 0, 0, 2, 2, 0xffffff + (alpha << 24), 0x000000 + (alpha / 2 << 24));
|
||||||
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));
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue