Skip to content

ProgressBar.md

cfloutier edited this page Apr 27, 2024 · 5 revisions

K2ProgressBar

image

Attributes

  • label : the center label
  • value : value between min and max
  • centered : if centered the green rectangle is drawned from the center of the control. useful for ranges like [-10 10]. image
  • min and max : the range
  • set-label-to-value : print the value to the center label : print the value to the label
  • postfix : postfix text. ex : "%" or "km"

uss

.k2-progress-bar is the main class.

divided with the #frame, #progress and #label named elements

the 4 classes are located in the K2UI.uss

The width is adapted to parent Element and the Height can be set up freely. The text will remain centered and the height of the inner bar is adapted.

What is inside the K2ProgressBar..

I've wrote a brand new progress bar because the standard one was far too complex and difficult to setup it's behavior and look.

It's my first compenent coded from scratch. A simple but good exercice.

Clone this wiki locally