How to call a function after the tableWindow closing is triggered

Game development with Board Game Arena Studio
Post Reply
User avatar
Tabaskov
Posts: 24
Joined: 18 July 2016, 10:18

How to call a function after the tableWindow closing is triggered

Post by Tabaskov »

Hello,
I am looking for a way to intercept the closing of the score window (tableWindow) on the JS side. Do I have to handle the click event on the bottom button and the cross in the upper right corner? Or is there a trick that detects the closing (onClose doesn't exist...)?
Thanks ;)
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: How to call a function after the tableWindow closing is triggered

Post by Victoria_La »

If you pass 'closing" as parameter it will actiate close button
When notification is send - you can override function that listen on this notification and add click listener on the button

Code: Select all

     //@Override
        ntf_tableWindow: function( notif )     {
        this.inherited(arguments);
	dojo.connect( $('close_btn'), 'onclick', this,  (e)=>console.log('closing'));
       },
but it won't catch when it closed by other means
User avatar
Tabaskov
Posts: 24
Joined: 18 July 2016, 10:18

Re: How to call a function after the tableWindow closing is triggered

Post by Tabaskov »

Yes, thanks a lot,
I finally used this method, and also added the popin_tableWindow_close for the click listener. It works very well :)
User avatar
Matthias X
Posts: 16
Joined: 20 February 2022, 14:21

Re: How to call a function after the tableWindow closing is triggered

Post by Matthias X »

Had the exact same problem. Thanks for posting the question and the answer :-)
Post Reply

Return to “Developers”