Yar

Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65546

Menu

Sign in to follow this  
H_o_p_s

133 views

Well, been working on the code that will be needed to create the menu. The menu sits in a seperate panel in the window. This makes it so that the menu does not have to be redrawn every frame. By giving events direct access to the menu class they can change the settings. For example:


//IN AN EVENT//
public void activate() {
j.menu.changeTurnCounter(j.menu.getTurnCounter() + 1);
j.menu.render();
}


Now this particular event doesn't do much, it just changes the turn counter (the numbers in the top left that tell you many people you have left in your turn).

But in the menu you can also attach events:


jtMenu menu = new jtMenu("default");
jtButton moveButton = new jtButton("menu_move");//menu_move is a sck
menu.add("move", moveButton);//adds the moveButton, named "move"
menu.attachEvent("move", an_event);//attach an event to "move"


So basically in the end when I am ready to distribute, all the players need to create are Actors, maps, and events. Then they go through and attach the events. I could even have online a catalogue of cool events.... hmmm...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now