From ea65542c1b63d7ee37025837bf205e55ace0c863 Mon Sep 17 00:00:00 2001 From: Kevin <115616336+lag@users.noreply.github.com> Date: Fri, 6 Mar 2026 09:52:28 -0600 Subject: Add Chat / Pastes / Formatting (#682) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial fixes for ContainerSetSlotPacket and CraftItemPacket * Chat: paste, history, ยง formatting, 1-9 block when open (Windows64) Made-with: Cursor * static_cast refactor --- Minecraft.Client/Gui.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'Minecraft.Client/Gui.cpp') 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(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(255 * t); if (isChatting) alpha = 255; if (alpha > 0) { int x = iSafezoneXHalf+2; - int y = -((int)i) * 9; + int y = -(static_cast(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)); } } -- cgit v1.2.3