Page 1 of 1

end turn link in states.inc.php

Posted: 27 April 2013, 13:04
by garcia1968
I'd like to give the player the option to 'end my turn' in the notification bar area, similar to the game 'takenoko' which gives the link option styled in color brown.

How do I set this up? I tried passing a php link in states.inc.php->descriptionmyturn but was getting error messages. Thought maybe I saw an example of this somewhere on the site documented earlier but can't find at the moment.

Thanks

Re: end turn link in states.inc.php

Posted: 27 April 2013, 15:03
by Een
This is can be done in your javascript by using

Code: Select all

              case 'yourStateName':
                	   this.addActionButton( 'action_pass', _("End your turn"), 'onPass' );                	   
    	        	   break;
in the onUpdateActionButtons function.
(NB : you need to create the onPass function first)