Log inGet started
World

Powerplay: Abilities, Cooldowns and Status Effects Kit

README.md

uiBar

Draws an ability bar from a BarView, as a widget tree. Its layouts:

  • hotbar: an MMO row of square slots with key badges, and health and resources underneath.
  • moba: a portrait with a health ring, four big slots with their keys below, smaller extra slots, and health and resource bars.
  • radial: slots on a wheel around a hub. The hub gauge shows health on its right half and the main resource on its left.
  • pips: minimal pills that fill as they recharge, showing the key or the seconds left, with charge dots underneath.
  • orbs: action-RPG layout with a health globe and a resource globe (barsKit's orb look) around the slot row.
  • touch: big round buttons on arcs in the bottom-right corner, never smaller than 56 points.

Every slot shows its icon, a radial cooldown wipe (conic-gradient; the pixel theme steps it in 8 chunks) and the seconds left. It also shows a charge badge when maxCharges > 1 and its key. Each state looks distinct: ready glows; noResource is tinted blue and labelled NO STAMINA; silenced shows a lock and SILENCED; stunned shows stars and STUNNED; dead fades out. A cast flashes for 0.25 s after sinceCast.

B.render(layout, style, view, { scale, compact, onClick = prefix, free }). onClick makes every slot fire prefix .. slot. free lets the touch layout shrink, for gallery thumbnails. Other exports: B.slot, B.sweep, B.seconds, B.layouts() and B.has(id).