GuiScreenWorking .java

net.minecraft.client.gui.GuiScreenWorking (class, 73 lines): members: field_146589_f, field_146591_a, doneWorking, resetProgressAndMessage, setDoneWorking.

net.minecraft.client.guiclass73 linesclientextends GuiScreen2.1 KB

Implements

API Surface (6)

void displaySavingString(String message)
void resetProgressAndMessage(String message)
void displayLoadingString(String message)
void setLoadingProgress(int progress)
void setDoneWorking()
void drawScreen(int mouseX, int mouseY, float partialTicks)

Fields & Constants (4)

field_146591_a
field_146589_f
progress
doneWorking

String literals (1)

"Working..."

Code Graph: Dependencies (3)

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

Full Source

GuiScreenWorking.java73 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.gui;
2
3
import net.minecraft.util.IProgressUpdate;
4
5
public class GuiScreenWorking extends GuiScreen implements IProgressUpdate
6
{
7
    private String field_146591_a = "";
8
    private String field_146589_f = "";
9
    private int progress;
10
    private boolean doneWorking;
11
12
    /**
13
     * Shows the 'Saving level' string.
14
     */
15
    public void displaySavingString(String message)
16
    {
17
        this.resetProgressAndMessage(message);
18
    }
19
20
    /**
21
     * this string, followed by "working..." and then the "% complete" are the 3 lines shown. This resets progress to 0,
22
     * and the WorkingString to "working...".
23
     */
24
    public void resetProgressAndMessage(String message)
25
    {
26
        this.field_146591_a = message;
27
        this.displayLoadingString("Working...");
28
    }
29
30
    /**
31
     * Displays a string on the loading screen supposed to indicate what is being done currently.
32
     */
33
    public void displayLoadingString(String message)
34
    {
35
        this.field_146589_f = message;
36
        this.setLoadingProgress(0);
37
    }
38
39
    /**
40
     * Updates the progress bar on the loading screen to the specified amount. Args: loadProgress
41
     */
42
    public void setLoadingProgress(int progress)
43
    {
44
        this.progress = progress;
45
    }
46
47
    public void setDoneWorking()
48
    {
49
        this.doneWorking = true;
50
    }
51
52
    /**
53
     * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
54
     */
55
    public void drawScreen(int mouseX, int mouseY, float partialTicks)
56
    {
57
        if (this.doneWorking)
58
        {
59
            if (!this.mc.isConnectedToRealms())
60
            {
61
                this.mc.displayGuiScreen((GuiScreen)null);
62
            }
63
        }
64
        else
65
        {
66
            this.drawDefaultBackground();
67
            this.drawCenteredString(this.fontRendererObj, this.field_146591_a, this.width / 2, 70, 16777215);
68
            this.drawCenteredString(this.fontRendererObj, this.field_146589_f + " " + this.progress + "%", this.width / 2, 90, 16777215);
69
            super.drawScreen(mouseX, mouseY, partialTicks);
70
        }
71
    }
72
}
73

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