Advertisement
Shadowfury333

Visibility attempt

Mar 2nd, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. path='Settings/Interface/Visibility'
  2.   ShTick2( 'Visibility widgets', {
  3.     {name = 'Outline',key='visOutline', desc='Adds cartoon-like outline to units. Mutually exclusive with Halo', hotkey=nil},
  4.     {name = 'Halo',key='visHalo', desc='Adds halo effect to units. Mutually exclusive with Outline', hotkey=nil},
  5.   },
  6.   function(self)
  7.     local key = self.value
  8.     if key == 'visOutline' then
  9.       spSendCommands{"luaui disablewidget Halo","luaui enablewidget Outline"}
  10.     elseif key == 'visHalo' then
  11.       spSendCommands{"luaui disablewidget Outline","luaui enablewidget Halo"}
  12.     end
  13.   end
  14.   )
  15.   ShLabel('Various')
  16.   AddOption({
  17.     name = 'XRayShader',
  18.     type = 'bool',
  19.     OnChange = function(self) Spring.SendCommands{"luaui togglewidget XRayShader"} end,
  20.   } )
  21.   AddOption({
  22.     name = 'XRayHaloSelections',
  23.     type = 'bool',
  24.     OnChange = function(self) Spring.SendCommands{"luaui togglewidget XRayHaloSelections"} end,
  25.   } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement