This commit is contained in:
eaglercraft 2024-12-24 20:07:55 -08:00
commit c3caf6a250
18 changed files with 100 additions and 25 deletions

View file

@ -1102,12 +1102,16 @@ public class GuiIngame extends Gui {
&& touchVPosX < interactButtonX + interactButtonW && touchVPosY < interactButtonY + interactButtonH;
float f = MathHelper.clamp_float(mc.gameSettings.touchControlOpacity, 0.0f, 1.0f);
if (f > 0.0f) {
if (f < 1.0f)
GlStateManager.enableBlend();
GlStateManager.color(1.0f, 1.0f, 1.0f, f);
drawTexturedModalRect(xx, yy, 0, hover ? 216 : 236, 118, 20);
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
drawCenteredString(mc.fontRendererObj, I18n.format("touch.interact.entity"),
parScaledResolution.getScaledWidth() / 2, yy + 6,
(hover ? 16777120 : 14737632) | ((int) (f * 255.0f) << 24));
if (f < 1.0f)
GlStateManager.disableBlend();
}
} else {
interactButtonX = -1;