core.components.ui.bar module

class core.components.ui.bar.Bar(position, animation_speed=0.2)[source]

Bases: core.components.ui.UserInterface

A user interface bar used for health bars, etc.

Parameters:
  • size – The [x, y] size of the bar.
  • position (List) – The [x, y] position to draw the UI element.
  • _color – The (r,g,b) _color value of the bar.
  • value (Float) – Percentage of the bar filled.
draw(surface)[source]