UiUiUi
UiUiUi copied to clipboard
Add Progress Bar Widget
From the README:
A progress bar which shows the progress of some operation. If it changes its setting gradually, it would be possible to render it extremely efficient by updating only the tiles of the framebuffer where the bar actually has changed. UITextLine performs similar computations on text updates.
Open questions: (favorite answers bolded)
- What datatype should be used to represent 'progress'?
- Float [0.0,1.0]
- Float [0.0,100.0]
- UInt8 [0,MAX]
- UInt16 [0,MAX] - because bar size will all be integer/pixel math anyway, but 8 bits is too small
- When progress is '0', should there be a minimum of one pixel of 'bar' showing?
- no - because you can always wrap the widget in a row or column group, then put a divider on one side
- What should the size of the widget be like?
- user preferred (compile time) 'width' of bar, 'MAX' height. - would be nice because it is more flexible
- MAX width, MAX height. - because only specifying UIDirection in one direction on a rotatable element is kind of weird. Plus you can always use an envelope.
- 'thickness' and 'length' - not to be confused with width and height, so even when rotated it still makes sense.
- Should there be some kind of border or padding?
- no - because envelope can do all of that.