GuiButtonRealmsProxy .java

net.minecraft.client.gui.GuiButtonRealmsProxy (class): members: getRealmsButton, func_154312_c, getButtonWidth, getPositionY, realmsButton, getEnabled.

net.minecraft.client.guiclass106 linesclientextends GuiButton2.5 KB

API Surface (13)

int getId()
boolean getEnabled()
void setEnabled(boolean isEnabled)
void setText(String text)
int getButtonWidth()
int getPositionY()
boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
void mouseReleased(int mouseX, int mouseY)
void mouseDragged(Minecraft mc, int mouseX, int mouseY)
RealmsButton getRealmsButton()
int getHoverState(boolean mouseOver)
int func_154312_c(boolean p_154312_1_)
int getHeight()

Fields & Constants (1)

realmsButton

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

GuiButtonRealmsProxy.java106 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.gui;
2
3
import net.minecraft.client.Minecraft;
4
import net.minecraft.realms.RealmsButton;
5
6
public class GuiButtonRealmsProxy extends GuiButton
7
{
8
    private RealmsButton realmsButton;
9
10
    public GuiButtonRealmsProxy(RealmsButton realmsButtonIn, int buttonId, int x, int y, String text)
11
    {
12
        super(buttonId, x, y, text);
13
        this.realmsButton = realmsButtonIn;
14
    }
15
16
    public GuiButtonRealmsProxy(RealmsButton realmsButtonIn, int buttonId, int x, int y, String text, int widthIn, int heightIn)
17
    {
18
        super(buttonId, x, y, widthIn, heightIn, text);
19
        this.realmsButton = realmsButtonIn;
20
    }
21
22
    public int getId()
23
    {
24
        return super.id;
25
    }
26
27
    public boolean getEnabled()
28
    {
29
        return super.enabled;
30
    }
31
32
    public void setEnabled(boolean isEnabled)
33
    {
34
        super.enabled = isEnabled;
35
    }
36
37
    public void setText(String text)
38
    {
39
        super.displayString = text;
40
    }
41
42
    public int getButtonWidth()
43
    {
44
        return super.getButtonWidth();
45
    }
46
47
    public int getPositionY()
48
    {
49
        return super.yPosition;
50
    }
51
52
    /**
53
     * Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent
54
     * e).
55
     */
56
    public boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
57
    {
58
        if (super.mousePressed(mc, mouseX, mouseY))
59
        {
60
            this.realmsButton.clicked(mouseX, mouseY);
61
        }
62
63
        return super.mousePressed(mc, mouseX, mouseY);
64
    }
65
66
    /**
67
     * Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
68
     */
69
    public void mouseReleased(int mouseX, int mouseY)
70
    {
71
        this.realmsButton.released(mouseX, mouseY);
72
    }
73
74
    /**
75
     * Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
76
     */
77
    public void mouseDragged(Minecraft mc, int mouseX, int mouseY)
78
    {
79
        this.realmsButton.renderBg(mouseX, mouseY);
80
    }
81
82
    public RealmsButton getRealmsButton()
83
    {
84
        return this.realmsButton;
85
    }
86
87
    /**
88
     * Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over
89
     * this button.
90
     */
91
    public int getHoverState(boolean mouseOver)
92
    {
93
        return this.realmsButton.getYImage(mouseOver);
94
    }
95
96
    public int func_154312_c(boolean p_154312_1_)
97
    {
98
        return super.getHoverState(p_154312_1_);
99
    }
100
101
    public int getHeight()
102
    {
103
        return this.height;
104
    }
105
}
106

Deobfuscated MCP 1.8.9 source of GuiButtonRealmsProxy from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/gui/GuiButtonRealmsProxy.java), stored verbatim.