View difference between Paste ID: K2p1SnTa and zZKNyHWJ
SHOW: | | - or go back to the newest paste.
1
public class BasicGui extends GuiScreen {
2
	public final EntityPlayer thePlayer;
3
4
	public BasicGui(EntityPlayer player) {
5
		thePlayer = player;
6
	}
7
8
	private final String[] classNames = {"Miner", "Blacksmith", "Farmer", "Warrior", "Stealth", "Woodsman", "Spellbinder"};
9
	
10
	@Override
11
	public void initGui() {
12
		this.buttonList.clear();
13
		
14
		int x, y = width/2 - 30;
15
		
16
		for(int i = 0; i < classNames.length; i++)
17
		{
18
			x = (this.width/2 + ((i % 3) * 70 - (70*3) / 2));
19
			
20
			this.buttonList.add(new GuiButton(i, x, y, 70, 20, classNames[i]));
21
			
22
			if(i % 3 == 2)
23
				y += 20;
24
		}
25
	}
26
27
	@Override
28
	protected void actionPerformed(GuiButton par1GuiButton) {
29
		super.actionPerformed(par1GuiButton);
30
	}
31
32
	@Override
33
	public void drawDefaultBackground() {
34
		this.mc.bindTexture(/*texture path*/);
35
		//DrawBackground
36
	}
37
	
38
	@Override
39
	public void drawScreen(){
40
		this.drawDefaultBackground();
41
		super.drawScreen();
42
	}
43
}