GuiErrorScreen .java

net.minecraft.client.gui.GuiErrorScreen (class): members: field_146312_f, field_146313_a, keyTyped, actionPerformed, initGui, drawScreen. imports: I18n.

net.minecraft.client.guiclass54 linesclientextends GuiScreen1.8 KB

API Surface (4)

void initGui()
void drawScreen(int mouseX, int mouseY, float partialTicks)
void keyTyped(char typedChar, int keyCode)
void actionPerformed(GuiButton button)

Fields & Constants (2)

field_146313_a
field_146312_f

String literals (1)

"gui.cancel"

Code Graph: Dependencies (4)

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

Full Source

GuiErrorScreen.java54 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.gui;
2
3
import java.io.IOException;
4
import net.minecraft.client.resources.I18n;
5
6
public class GuiErrorScreen extends GuiScreen
7
{
8
    private String field_146313_a;
9
    private String field_146312_f;
10
11
    public GuiErrorScreen(String p_i46319_1_, String p_i46319_2_)
12
    {
13
        this.field_146313_a = p_i46319_1_;
14
        this.field_146312_f = p_i46319_2_;
15
    }
16
17
    /**
18
     * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
19
     * window resizes, the buttonList is cleared beforehand.
20
     */
21
    public void initGui()
22
    {
23
        super.initGui();
24
        this.buttonList.add(new GuiButton(0, this.width / 2 - 100, 140, I18n.format("gui.cancel", new Object[0])));
25
    }
26
27
    /**
28
     * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
29
     */
30
    public void drawScreen(int mouseX, int mouseY, float partialTicks)
31
    {
32
        this.drawGradientRect(0, 0, this.width, this.height, -12574688, -11530224);
33
        this.drawCenteredString(this.fontRendererObj, this.field_146313_a, this.width / 2, 90, 16777215);
34
        this.drawCenteredString(this.fontRendererObj, this.field_146312_f, this.width / 2, 110, 16777215);
35
        super.drawScreen(mouseX, mouseY, partialTicks);
36
    }
37
38
    /**
39
     * Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of
40
     * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
41
     */
42
    protected void keyTyped(char typedChar, int keyCode) throws IOException
43
    {
44
    }
45
46
    /**
47
     * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
48
     */
49
    protected void actionPerformed(GuiButton button) throws IOException
50
    {
51
        this.mc.displayGuiScreen((GuiScreen)null);
52
    }
53
}
54

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