UIWorldSpaceHealthBar Theming Parameters

The UIWorldSpaceHealthBar theming block id is 'world_space_health_bar'.

Colours

../_images/world_space_health_bar_colour_parameters.png

A diagram of which part of the element is themed by which colour parameter.

UIWorldSpaceHealthBar makes use of these colour parameters in a 'colours' block:

  • "normal_border" - The colour/gradient of the health bar's border if it has one.
  • "filled_bar" - The colour/gradient of the actual bar itself, of the portion of it that is still full.
  • "unfilled_bar" - The colour/gradient of an empty portion of the health bar.

Misc

UIWorldSpaceHealthBar has the following miscellaneous parameters in a 'misc' block:

  • "shape" - Can be one of 'rectangle' or 'rounded_rectangle'. Different shapes for this UI element.
  • "shape_corner_radius" - Only used if our shape is 'rounded_rectangle'. It sets the radius used for the rounded corners.
  • "follow_sprite_offset" - The x,y offset values the bar relative to the sprite. Defaults to "0,0".
  • "border_width" - The width of the border around the health bar. Defaults to "1". Can be "0" to remove the border.
  • "shadow_width" - The width of the border around the health bar. Defaults to "1". Can be "0" to remove the border.
  • "tool_tip_delay" - time in seconds before the button's tool tip (if it has one) will appear. Default is "1.0".

Example

Here is an example of a world space health bar block in a JSON theme file using the parameters described above.

world_space_health_bar.json
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 {
     "world_space_health_bar":
     {
         "colours":
         {
             "normal_border": "#AAAAAA",
             "filled_bar": "#f4251b",
             "unfilled_bar": "#CCCCCC"
         },
         "misc":
         {
             "follow_sprite_offset": "-5, 32",
             "border_width": "0"
         }
     }
 }