-
-
Save piXelicidio/c41cf02f56f59f8c982824fcae84f410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--making a dockable window (rollout floater registered as DialogBar) toggle open close, the legal way as Macroscript | |
macroscript macroTricks2 category:"pX Tools" buttonText:"2macroTricks" | |
( | |
local dialogOpen = false, myWindow | |
rollout Rollstuff "Rollstuff" | |
( | |
on Rollstuff close do | |
( | |
dialogOpen = false; | |
updateToolbarButtons() | |
) | |
) | |
on isChecked do dialogOpen | |
on execute do | |
( | |
myWindow = newRolloutFloater "Window" 300 200 | |
dialogOpen = true | |
addRollout Rollstuff myWindow | |
cui.registerDialogBar myWindow | |
) | |
on closeDialogs do | |
( | |
cui.unRegisterDialogBar myWindow | |
closeRolloutFloater myWindow | |
dialogOpen = false | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment