// styles used by the elements of stdui.cfg for the game menus

textbright 90

UIwindow_padding = 0.010
UIbutton_padding = 0.008

// preset colors used in styles below
c_menu   = 0x1D1D1D   // window background
c_menu_a = 0xE61C1C1C // window transparent background
c_line   = 0x2B2B2B   // all-around line
c_line_a = 0xE6383838 // all-around transparent line

c_slider = 0x131313

c_main1  = 0x292929   // main title gradient top
c_main2  = 0x161616   // main title gradient bottom

c_boxmod = 0xE0E0E0   // box modulate
c_grdmod = 0xC0C0C0   // gradient modulate
c_fill   = 0xF0E8E0   // white area
c_focus  = 0xFF1008   // focus area

c_off    = 0x484848   // checkbox/radio off
c_on1    = 0x48BACE   // checkbox on
c_on2    = 0x48BACE   // radio on

// generic styles used for combinations below
style_generic_default = [style_generic_box]
style_generic_none = []

style_generic_box = [
   uimodcolor $c_boxmod
   //uioutline $c_line
]

style_generic_focus = [
   uioutline (uifocus? $c_focus $c_line)
   uiclamp- 1 1 1 1
]

style_generic_gradient1 = [uimodvgradient $c_grdmod 0xFFFFFF]
style_generic_gradient2 = [uimodvgradient 0xFFFFFF $c_grdmod]
style_generic_gradient3 = [uimodhgradient $c_grdmod 0xFFFFFF]
style_generic_gradient4 = [uimodhgradient 0xFFFFFF $c_grdmod]

style_generic_linesh = [
   uivlist $arg2 [
      loop i $arg1 [uiline $c_line $arg3]
   ]
]

style_generic_linesv = [
   uihlist $arg2 [
      loop i $arg1 [uiline $c_line 0 $arg3]
   ]
]

// button specific styles below
style_button_default = [style_button_hold1]
style_button_none = []

style_button_hold1 = [// H
   style_generic_default
   uihold [style_generic_gradient1] [
      uihover [
         style_generic_gradient2
      ]
   ]
]

style_button_hold2 = [// H, HOVER
   uihover [
      style_generic_default
      uihold [style_generic_gradient1] [
         style_generic_gradient2
      ]
   ]
]

style_button_hold3 = [// H, ESC
   style_generic_default
   uihold [style_generic_gradient1] [
      uieschold [style_generic_gradient1] [
         uihover [style_generic_gradient2]
      ]
   ]
]

style_button_hold4 = [// H, HOVER, ESC
   uihover [
      style_generic_default
      uihold [style_generic_gradient1] [
         uieschold [style_generic_gradient1] [
            style_generic_gradient2
         ]
      ]
   ]
]

style_button_hold5 = [// V
   style_generic_default
   uihold [style_generic_gradient3] [
      uihover [style_generic_gradient4]
   ]
]

style_button_hold6 = [// V, HOVER
   uihover [
      style_generic_default
      uihold [style_generic_gradient3] [
         style_generic_gradient4
      ]
   ]
]

style_button_hold7 = [// V, ESC
   style_generic_default
   uihold [style_generic_gradient3] [
      uieschold [style_generic_gradient3] [
         uihover [style_generic_gradient4]
      ]
   ]
]

style_button_hold8 = [// V, HOVER, ESC
   uihover [
      style_generic_default
      uihold [style_generic_gradient3] [
         uieschold [style_generic_gradient3] [
            style_generic_gradient4
         ]
      ]
   ]
]

// image button specific styles below
style_img_default = [style_img_hold1]
style_img_none = []

style_img_hold1 = [// HOVER
   uihold [
      uispace 0.003 0.003 [
         uialign -1 1
         UItriangle $c_on1 0.016 0.008 135
      ]
   ] [
      uihover [
         uispace 0.003 0.003 [
            uialign -1 -1
            UItriangle 0 0.016 0.008 45
         ]
      ]
   ]
]

style_img_hold2 = [// HOVER, ESC
   uihold [
      uispace 0.003 0.003 [
         uialign -1 1
         UItriangle $c_on1 0.016 0.008 135
      ]
   ]
   uieschold [
      uispace 0.003 0.003 [
         uialign 1 1
         UItriangle $c_on2 0.016 0.008 225
      ]
   ]
   if (&& uihover? [! (|| uihold? uieschold?)]) [
      uispace 0.003 0.003 [
         uialign -1 -1
         UItriangle 0 0.016 0.008 45
      ]
   ]
]

