ScriptSpot

Forum topic · Scripts Wanted

Lock MAX UI

By 3dline · 2013-08-23

Description

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 (5)

thanks

3dline · 2016-05-15

thank you very much.

3dline · 2013-08-23

thanks vary much @barigazy
thanks vary much @miauu

barigazy · 2013-08-23

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

barigazy · 2013-08-23

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

.

miauu · 2013-08-23


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.