Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BasicGui extends GuiScreen {
- public final EntityPlayer thePlayer;
- public BasicGui(EntityPlayer player) {
- thePlayer = player;
- }
- private final String[] classNames = {"Miner", "Blacksmith", "Farmer", "Warrior", "Stealth", "Woodsman", "Spellbinder"};
- @Override
- public void initGui() {
- this.buttonList.clear();
- int x, y = width/2 - 30;
- for(int i = 0; i < classNames.length; i++)
- {
- x = (this.width/2 + ((i % 3) * 70 - (70*3) / 2));
- this.buttonList.add(new GuiButton(i, x, y, 70, 20, classNames[i]));
- if(i % 3 == 2)
- y += 20;
- }
- }
- @Override
- protected void actionPerformed(GuiButton par1GuiButton) {
- super.actionPerformed(par1GuiButton);
- }
- @Override
- public void drawDefaultBackground() {
- this.mc.bindTexture(/*texture path*/);
- //DrawBackground
- }
- @Override
- public void drawScreen(){
- this.drawDefaultBackground();
- super.drawScreen();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement