aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Gui.cpp
diff options
context:
space:
mode:
authorKevin <115616336+lag@users.noreply.github.com>2026-03-06 09:52:28 -0600
committerGitHub <noreply@github.com>2026-03-06 09:52:28 -0600
commitea65542c1b63d7ee37025837bf205e55ace0c863 (patch)
tree0ba5abdfdbf055d11bd85a460b98b51f2c9c9904 /Minecraft.Client/Gui.cpp
parent1755cd58bebf19053c6b4bbf9915b07237e1c14e (diff)
Add Chat / Pastes / Formatting (#682)
* Initial fixes for ContainerSetSlotPacket and CraftItemPacket * Chat: paste, history, ยง formatting, 1-9 block when open (Windows64) Made-with: Cursor * static_cast refactor
Diffstat (limited to 'Minecraft.Client/Gui.cpp')
-rw-r--r--Minecraft.Client/Gui.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp
index 1199c138..365ddeac 100644
--- a/Minecraft.Client/Gui.cpp
+++ b/Minecraft.Client/Gui.cpp
@@ -971,15 +971,10 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_ALPHA_TEST);
-// 4J Stu - We have moved the chat text to a xui
-#if 0
+#if defined(_WINDOWS64)
glPushMatrix();
- // 4J-PB we need to move this up a bit because we've moved the quick select
- //glTranslatef(0, ((float)screenHeight) - 48, 0);
- glTranslatef(0.0f, (float)(screenHeight - iSafezoneYHalf - iTooltipsYOffset - 16 - 3 + 22) - 24.0f, 0.0f);
- // glScalef(1.0f / ssc.scale, 1.0f / ssc.scale, 1);
+ glTranslatef(0.0f, static_cast<float>(screenHeight - iSafezoneYHalf - iTooltipsYOffset - 16 - 3 + 22) - 24.0f, 0.0f);
- // 4J-PB - we need gui messages for each of the possible 4 splitscreen players
if(bDisplayGui)
{
int iPad=minecraft->player->GetXboxPad();
@@ -993,23 +988,21 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
if (t < 0) t = 0;
if (t > 1) t = 1;
t = t * t;
- int alpha = (int) (255 * t);
+ int alpha = static_cast<int>(255 * t);
if (isChatting) alpha = 255;
if (alpha > 0)
{
int x = iSafezoneXHalf+2;
- int y = -((int)i) * 9;
+ int y = -(static_cast<int>(i)) * 9;
if(bTwoPlayerSplitscreen)
{
y+= iHeightOffset;
}
wstring msg = guiMessages[iPad][i].string;
- // 4J-PB - fill the black bar across the whole screen, otherwise it looks odd due to the safe area
this->fill(0, y - 1, screenWidth/fScaleFactorWidth, y + 8, (alpha / 2) << 24);
glEnable(GL_BLEND);
-
font->drawShadow(msg, iSafezoneXHalf+4, y, 0xffffff + (alpha << 24));
}
}