Package multididdy_view

Source Code of multididdy_view.Gui

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package multididdy_view;

import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.gui.GUIContext;

/**
*
* @author jones
*/
public class Gui {
    public GameContainer guiContext;
   
    Button startButton;
    TextField tex;
   
   
    public Gui(GameContainer gc){
        guiContext=gc;
        try {
            Image start = new Image("data/gfx/gui/Start.png");
           
            startButton=new Button(guiContext,start,100,100);
           
            tex = new TextField(guiContext,guiContext.getDefaultFont(),200,400,120,30);
            tex.setBackgroundColor(Color.darkGray);
            tex.setBorderColor(Color.red);
           
        } catch (SlickException ex) {
            ex.printStackTrace();
        }
       
    }
   
   
    public void render(GUIContext guic, Graphics grphcs) throws SlickException {
        startButton.render(guic, grphcs);
        tex.render(guic, grphcs);
    }
   
}
TOP

Related Classes of multididdy_view.Gui

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.