#textdomain wesnoth-lib ### ### Definition of a horizontal scrollbar. ### #define _GUI_STATE GROOVE_LEFT GROOVE_RIGHT POSITIONER_LEFT POSITIONER_RIGHT IMAGE_SUFFIX IPF [draw] # # Groove # [image] # 4 pixels wide x = 0 y = 0 name = "buttons/scrollgroove-left.png{IPF}" [/image] [image] x = {GROOVE_LEFT} y = 0 w = "(if(width - {GROOVE_LEFT} - {GROOVE_RIGHT} < 0 , 0, width - {GROOVE_LEFT} - {GROOVE_RIGHT}))" h = 0 resize_mode = "stretch" name = "buttons/scrollgroove-horizontal.png{IPF}" [/image] [image] # 5 pixels wide x = "(width - {GROOVE_RIGHT})" y = 0 name = "buttons/scrollgroove-right.png{IPF}" [/image] # # Positioner # [image] # 5 pixels wide x = "(positioner_offset)" y = 0 name = "buttons/scrollleft{IMAGE_SUFFIX}{IPF}" [/image] [image] x = "(positioner_offset + {POSITIONER_LEFT})" y = 0 w = "( if(positioner_length - {POSITIONER_LEFT} - {POSITIONER_RIGHT} < 0 , 0, positioner_length - {POSITIONER_LEFT} - {POSITIONER_RIGHT}))" resize_mode = "stretch" name = "buttons/scrollhorizontal{IMAGE_SUFFIX}{IPF}" [/image] [image] # 5 pixels wide x = "(positioner_offset + positioner_length - {POSITIONER_RIGHT})" y = 0 name = "buttons/scrollright{IMAGE_SUFFIX}{IPF}" [/image] [/draw] #enddef #define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT POSITIONER_LENGHT GROOVE_LEFT GROOVE_RIGHT POSITIONER_LEFT POSITIONER_RIGHT IPF [resolution] {RESOLUTION} min_width = {WIDTH} min_height = {HEIGHT} default_width = {WIDTH} default_height = {HEIGHT} max_width = 0 max_height = {HEIGHT} minimum_positioner_length = {POSITIONER_LENGHT} left_offset = 0 right_offset = 0 [state_enabled] {_GUI_STATE ({GROOVE_LEFT}) ({GROOVE_RIGHT}) ({POSITIONER_LEFT}) ({POSITIONER_RIGHT}) ".png" ({IPF}) } [/state_enabled] [state_disabled] {_GUI_STATE ({GROOVE_LEFT}) ({GROOVE_RIGHT}) ({POSITIONER_LEFT}) ({POSITIONER_RIGHT}) ".png~GS()" ({IPF}) } [/state_disabled] [state_pressed] {_GUI_STATE ({GROOVE_LEFT}) ({GROOVE_RIGHT}) ({POSITIONER_LEFT}) ({POSITIONER_RIGHT}) "-pressed.png" ({IPF}) } [/state_pressed] [state_focussed] {_GUI_STATE ({GROOVE_LEFT}) ({GROOVE_RIGHT}) ({POSITIONER_LEFT}) ({POSITIONER_RIGHT}) "-active.png" ({IPF}) } [/state_focussed] [/resolution] #enddef [horizontal_scrollbar_definition] id = "default" description = "a horizontal scrollbar" # Note a scrollbar is normally sized by the item that "masters" it # that's why the default height is rather low. # Tiny gui sizes haven't been tested yet so might need some tuning. {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 12 11 2 2 2 2 ()} {_GUI_RESOLUTION () 20 25 11 4 5 5 5 ()} [/horizontal_scrollbar_definition] [horizontal_scrollbar_definition] id = "transparent" description = "a transparent horizontal scrollbar" # Note a scrollbar is normally sized by the item that "masters" it # that's why the default height is rather low. # Tiny gui sizes haven't been tested yet so might need some tuning. {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 12 11 2 2 2 2 "~O(65%)"} {_GUI_RESOLUTION () 20 25 11 4 5 5 5 "~O(65%)"} [/horizontal_scrollbar_definition] #undef _GUI_STATE #undef _GUI_RESOLUTION