diff --git a/Minecraft.Client/Font.cpp b/Minecraft.Client/Font.cpp index ce2275f69..294919b05 100644 --- a/Minecraft.Client/Font.cpp +++ b/Minecraft.Client/Font.cpp @@ -251,6 +251,12 @@ 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) +{ + drawLiteral(str, x + 1, y + 1, shadowColor); + drawLiteral(str, x, y, color); +} + void Font::drawLiteral(const wstring& str, int x, int y, int color) { if (str.empty()) return; diff --git a/Minecraft.Client/Font.h b/Minecraft.Client/Font.h index a5d117ca0..4a4f55ec9 100644 --- a/Minecraft.Client/Font.h +++ b/Minecraft.Client/Font.h @@ -53,6 +53,7 @@ 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 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); /** diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp index ad390a5aa..3649b5185 100644 --- a/Minecraft.Client/Gui.cpp +++ b/Minecraft.Client/Gui.cpp @@ -972,6 +972,28 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) glDisable(GL_ALPHA_TEST); #if defined(_WINDOWS64) + int uiSetting = app.GetGameSettings(iPad, eGameSetting_UISize); + + float scaleFactor = 1.0f; + float textScale = 0.6f; + int backgroundtop = 13; + + if (uiSetting == 0) + { + textScale = textScale * 1.5; + int backgroundtop = 10; + } + else if (uiSetting == 1) + { + textScale = textScale * 1; + int backgroundtop = 13; + } + else if (uiSetting == 2) + { + textScale = textScale * 0.75; + int backgroundtop = 16; + } + glPushMatrix(); glTranslatef(0.0f, static_cast(screenHeight - iSafezoneYHalf - iTooltipsYOffset - 16 - 3 + 22) - 24.0f, 0.0f); @@ -1007,8 +1029,8 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) glPushMatrix(); glTranslatef((float)(iSafezoneXHalf+4), (float)(y), 0); - glScalef(0.6f, 0.6f, 1.0f); - font->drawShadowLiteral(msg, 0, 0, 0xffffff + (alpha << 24)); + glScalef(textScale, textScale, scaleFactor); + font->drawShadowLiteralCustom(msg, 0, 0, 0xffffff + (alpha << 24), 0x000000 + (alpha << 24)); glPopMatrix(); } }