GUI Close event

Started by crimson_fluff on Thu, 11/21/2019 - 21:05

Topic category: Feature requests and ideas for MCreator

Last seen on 12:45, 8. Dec 2019
Joined Aug 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
GUI Close event
Thu, 11/21/2019 - 21:06 (edited)

Hi I searched the forum for this but didnt find anything, hopefully its not a dupe

As the title suggests can we please have a 'GUI Closed' Event/Trigger.  I have a block that deletes items, its a trashcan.  When the GUI is open I want to pause the trashcan until the GUI is closed.  This is easy enough for me to do, except I will never know when the GUI is closed and so cant unpause my trashcan

I realise I could have a button in the GUI linked to a Procedure that closes the GUI and unpauses my trashcan, BUT if the player presses ESC and closes the GUI, my trashcan will remain forever paused

Thank you

Edited by crimson_fluff on Thu, 11/21/2019 - 21:06
0Upvote this forum topic
Last seen on 11:21, 8. Dec 2019
Joined Jan 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Meanwhile, you can just…
Fri, 11/22/2019 - 08:08

Meanwhile, you can just create a button in the trashcan GUI that clears every slot when clicking.

Useful if you have the bad reflex of closing the GUI when you place something in the wrong slot, like me.

Don't forget to make the block keep the items in its internal inventory.

0Upvote this forum topic