onUpdateActionButtons removes buttons

Game development with Board Game Arena Studio
Post Reply
User avatar
AxeCrazy
Posts: 22
Joined: 15 March 2014, 01:07

onUpdateActionButtons removes buttons

Post by AxeCrazy »

Goodday,
i have a strange issue.
when entering a multipleactiveplayer state a onUpdateActionButtons is called
first onUpdateActionButtons placeCard
then enterstate placeCard
then again onUpdateActionButtons placeCard

in the enterstate i add buttons to the titlebar do set cardstae/ confirm, but these dissappear after last onUpdateActionButtons

when i refresh the page (F5) the buttons remain visible.

Any clue on how to fix this?
User avatar
Tisaac
Posts: 2390
Joined: 26 August 2014, 21:28

Re: onUpdateActionButtons removes buttons

Post by Tisaac »

AxeCrazy wrote: 07 May 2024, 13:27 Goodday,
i have a strange issue.
when entering a multipleactiveplayer state a onUpdateActionButtons is called
first onUpdateActionButtons placeCard
then enterstate placeCard
then again onUpdateActionButtons placeCard

in the enterstate i add buttons to the titlebar do set cardstae/ confirm, but these dissappear after last onUpdateActionButtons

when i refresh the page (F5) the buttons remain visible.

Any clue on how to fix this?
Nothing to fix, this is a feature, not a bug...
If you want to avoid this, easiest solution is to just make your own div next to generalactions and place all your buttons here instead (check my boilerplate or my games for some example)
User avatar
AxeCrazy
Posts: 22
Joined: 15 March 2014, 01:07

Re: onUpdateActionButtons removes buttons

Post by AxeCrazy »

Oké.
Which game can I use to look at your example?
User avatar
Victoria_La
Posts: 626
Joined: 28 December 2015, 20:55

Re: onUpdateActionButtons removes buttons

Post by Victoria_La »

you don't need a game, its trivial
can add this in your onUpdateActionButtons
Something like (did not test this code)

Code: Select all

if (!$('extra_actions')) dojo.place("<div id='extra_actions'></div>",'generalactions');
this.addActionButton(..., 'extra_actions'); // one of parameters is place
Post Reply

Return to “Developers”