﻿
	Toggles the Left/RIGHT + TITLE BAR


[RoutineDef,LeftTrayToggle,
	// Script will compare the location of the tray position and keep clicking till it changes
	[VarSet,StartPosition,[IHPos,1000,1]]
	[Loop,5,
		[VarSet,CurrentPosition,[IHPos,1000,1]]
		[If,CurrentPosition=StartPosition,
			[IClick,1000]
		,
			[LoopExit]
		]
	]
]
[RoutineDef,RightTrayToggle,
	// Script will compare the location of the tray position and keep clicking till it changes
	[VarSet,StartPosition,[IHPos,1001,1]]
	[Loop,5,
		[VarSet,CurrentPosition,[IHPos,1001,1]]
		[If,CurrentPosition=StartPosition,
			[IClick,1001]
		, 
		[LoopExit]
		]
	]
]//Routine RightTrayToggle

[IButton,???,"fullscreen.",
	[IShowActions,0]
	[IConfig,4.8]
	//[IFreeze,

[VarDef,ISHOW,0] // set  variable to hide 
[If,ISHOW=0,
		[IHIDE, "1007"] // MENUS  ALPHA BRUSH COLOR DOCUMENT EDIT , ETC ETC
		[IHIDE, "1008"] //ZBRUSH 2025.1.0.6 FREE MEM , ETC ETC -------- TITLE BAR
		[IHIDE, "1011"] //NOTES TOP LEFT
		[VarSET,ISHOW,1] // set  variable to SHOW
		[RoutineCall,LeftTrayToggle]
		[RoutineCall,RightTrayToggle]
		[IHIDE, "1000"] // LEFT TRAY CLICKEABLE
		[IHIDE, "1001"]	//	RIGHT TRAY CLICKEABLE
		[IHIDE, "1002"]	//	BOTTOM TRAY CLICKEABLE
		[IHIDE, "1003"]	//	TOP TRAY CLICKEABLE 
		,
		//else
		[ISHOW, "1007"] // MENUS  ALPHA BRUSH COLOR DOCUMENT EDIT , ETC ETC
		[ISHOW, "1008"] //ZBRUSH 2025.1.0.6 FREE MEM , ETC ETC -------- TITLE BAR
		[ISHOW, "1011"] //NOTES TOP LEFT
				[ISHOW, "1000"] // LEFT TRAY CLICKEABLE
		[ISHOW, "1001"]	//	RIGHT TRAY CLICKEABLE
		//[ISHOW, "1002"]	//	BOTTOM TRAY CLICKEABLE
		//[ISHOW, "1003"]	//	TOP TRAY CLICKEABLE

		[RoutineCall,LeftTrayToggle]
		[RoutineCall,RightTrayToggle]
		[VarSET,ISHOW,0] // set  variable to SHOW 
		]
	//]
,,1/2,,,]