#textdomain wesnoth-lib ### ### Definition of a vertical scrollbar. ### #define _GUI_STATE GROOVE_TOP GROOVE_BOTTOM POSITIONER_TOP POSITIONER_BOTTOM IMAGE_SUFFIX IPF [draw] # # Groove # [image] # 4 pixels high x = 0 y = 0 name = "buttons/scrollgroove-top.png{IPF}" [/image] [image] x = 0 y = {GROOVE_TOP} h = "(if(height - {GROOVE_TOP} - {GROOVE_BOTTOM} < 0 , 0, height - {GROOVE_TOP} - {GROOVE_BOTTOM}))" resize_mode = "stretch" name = "buttons/scrollgroove-mid.png{IPF}" [/image] [image] # 5 pixels high x = 0 y = "(height - {GROOVE_BOTTOM})" name = "buttons/scrollgroove-bottom.png{IPF}" [/image] # # Positioner # [image] # 5 pixels high x = 0 y = "(positioner_offset)" name = "buttons/scrolltop{IMAGE_SUFFIX}{IPF}" [/image] [image] x = 0 y = "(positioner_offset + {POSITIONER_TOP})" h = "( if(positioner_length - {POSITIONER_TOP} - {POSITIONER_BOTTOM} < 0 , 0, positioner_length - {POSITIONER_TOP} - {POSITIONER_BOTTOM}))" resize_mode = "stretch" name = "buttons/scrollmid{IMAGE_SUFFIX}{IPF}" [/image] [image] # 5 pixels high x = 0 y = "(positioner_offset + positioner_length - {POSITIONER_BOTTOM})" name = "buttons/scrollbottom{IMAGE_SUFFIX}{IPF}" [/image] [/draw] #enddef #define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT POSITIONER_LENGHT GROOVE_TOP GROOVE_BOTTOM POSITIONER_TOP POSITIONER_BOTTOM IPF [resolution] {RESOLUTION} min_width = {WIDTH} min_height = {HEIGHT} default_width = {WIDTH} default_height = {HEIGHT} max_width = {WIDTH} max_height = 0 minimum_positioner_length = {POSITIONER_LENGHT} top_offset = 0 bottom_offset = 0 [state_enabled] {_GUI_STATE ({GROOVE_TOP}) ({GROOVE_BOTTOM}) ({POSITIONER_TOP}) ({POSITIONER_BOTTOM}) ".png" ({IPF}) } [/state_enabled] [state_disabled] {_GUI_STATE ({GROOVE_TOP}) ({GROOVE_BOTTOM}) ({POSITIONER_TOP}) ({POSITIONER_BOTTOM}) ".png~GS()" ({IPF}) } [/state_disabled] [state_pressed] {_GUI_STATE ({GROOVE_TOP}) ({GROOVE_BOTTOM}) ({POSITIONER_TOP}) ({POSITIONER_BOTTOM}) "-pressed.png" ({IPF}) } [/state_pressed] [state_focussed] {_GUI_STATE ({GROOVE_TOP}) ({GROOVE_BOTTOM}) ({POSITIONER_TOP}) ({POSITIONER_BOTTOM}) "-active.png" ({IPF}) } [/state_focussed] [/resolution] #enddef [vertical_scrollbar_definition] id = "default" description = "a vertical 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}) 12 20 11 2 2 2 2 ()} {_GUI_RESOLUTION () 25 20 11 4 5 5 5 ()} [/vertical_scrollbar_definition] [vertical_scrollbar_definition] id = "transparent" description = "a transparent vertical 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}) 12 20 11 2 2 2 2 "~O(65%)"} {_GUI_RESOLUTION () 25 20 11 4 5 5 5 "~O(65%)"} [/vertical_scrollbar_definition] #undef _GUI_STATE #undef _GUI_RESOLUTION