end turn link in states.inc.php

Game development with Board Game Arena Studio
Post Reply
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

end turn link in states.inc.php

Post 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
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: end turn link in states.inc.php

Post 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)
Post Reply

Return to “Developers”