home *** CD-ROM | disk | FTP | other *** search
- -- Animate Button System Colors
- --
- -- Created: Sept 12 2000
- -- Last Updated:
- --
- -- Author : Fred Ruff
- -- Version: 3D Studio Max Version 4.0
- --
- --***********************************************************************************************
- -- MODIFY THIS AT YOUR OWN RISK
- -- These functions gets called when the animate button gets turned on and Off
-
- QuadAnimButtonState = False
-
- fn ChangeSystemColorsAnimateOn =
- (
- -- Store original quad border colors in array then change corder color
- global QuadOriginalColors = #()
- for i = 1 to 4 do QuadOriginalColors[i] = quadmenusettings.GetTitleBarBackgroundColor i
- -- get Ui color of animate button and convert from 0 - 1 to 0 - 255
- AnimateColorR = ((GetUiColor 12)*255.) as color
- for i = 1 to 4 do quadmenusettings.SetTitleBarBackgroundColor i AnimateColorR
- QuadAnimButtonState = True
- )
-
-
- fn ChangeSystemColorsAnimateOff =
- (
- if QuadAnimButtonState then
- (
- -- Change quads back to original colors
- for i = 1 to 4 do quadmenusettings.SetTitleBarBackgroundColor i QuadOriginalColors[i]
- )
- QuadAnimButtonState = False
- )
-
-
- --Register callbacks from animate button
- ChangeSystemColorsAnimateOn()
- ChangeSystemColorsAnimateOff()
- callbacks.addscript #AnimateOn "ChangeSystemColorsAnimateOn()" id:#AnimateOnChangeUIColors
- callbacks.addscript #AnimateOff "ChangeSystemColorsAnimateOff()" id:#AnimateOffChangeUIColors
-
- -- Register callbacks to turn the colors back befre a file load and a reset.
- callbacks.addscript #SystemPreReset "ChangeSystemColorsAnimateOff()" id:#ResetAnimateOffChangeUIColors
- callbacks.addscript #FilePreOpen "ChangeSystemColorsAnimateOff()" id:#PreLoadAnimateOffChangeUIColors
- callbacks.addscript #SystemPreNew "ChangeSystemColorsAnimateOff()" id:#PreNewAnimateOffChangeUIColors
-