Lock MAX UI

I'm looking for lock max UI, while my Script is open.
in the code below is a little code that open a new rollout inside other, but I wanna while second rollout is open User can't navigate or touch anything in MAX even previous rollout, just like when Align command open it's rollout and you can't do anything...

rollout test "test"
(
	button btn "Win"
	 on btn pressed do
	 (
		 rollout win "win"
		 (
			 button clo "Close"
			 on clo pressed do
				(
					DestroyDialog win
				)
		 )
		 createdialog win 150 150
	 )
)
createdialog test 100 100

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
3dline's picture

thanks

thank you very much.

3dline's picture

thanks vary much

thanks vary much @barigazy
thanks vary much @miauu

barigazy's picture

...

Simply use modal properties of rollout

rollout test "test"
(
	button btn "Win"
	 on btn pressed do
	 (
		 rollout win "win"
		 (
			 button clo "Close"
			 on clo pressed do
				(
					DestroyDialog win
				)
		 )
		 createdialog win 150 150 modal:on
	 )
)
createdialog test 100 100

bga

barigazy's picture

...

Hey Kostadin
again you posted solution second earlier. :)
Cheers!

bga

miauu's picture

.

createdialog win 150 150 modal:true

When modal is set to true, the user can press buttons only in the current rollout. All other controls(in other rollouts and in MAX UI) become inactive. When the current rollout is closed you can press the controls in MAxUI and other rollouts.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.