Difference between revisions of "UI.Bar"
From GiderosMobile
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | '''Available since:''' Gideros 2023.1<br/> | ||
+ | '''Class:''' [[UI]]<br/> | ||
+ | |||
=== Description === | === Description === | ||
− | + | Creates a Bar widget. | |
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
UI.Bar.new(maximum) | UI.Bar.new(maximum) | ||
Line 32: | Line 35: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | {{ | + | {{UI}} |
Latest revision as of 07:16, 17 October 2023
Available since: Gideros 2023.1
Class: UI
Description
Creates a Bar widget.
UI.Bar.new(maximum)
Parameters
maximum: (number) the bar maximum value
Functions
setValue: (number) sets the bar current value
setMaximum: (number) sets the bar maximum value
setSize: (number, number) sets the bar size
Example
local maxvalue = 200
local value = 102
local gui = UI.Bar.new(maxvalue)
gui:setSize(400, 32)
gui:setPosition(64,64)
stage:addChild(gui)
local way = 1
stage:addEventListener(Event.ENTER_FRAME, function(e)
value += 3*way
if value < 0 then way=1 end
if value > maxvalue then way=-1 end
gui:setValue(value)
end)
- UI.Accordion
- UI.Animation
- UI.Bar
- UI.Behavior
- UI.Border
- UI.BreadCrumbs
- UI.Builder
- UI.Button
- UI.Calendar
- UI.Checkbox
- UI.Combobox
- UI.ImageText
- UI.Keyboard
- UI.Label
- UI.Panel
- UI.Progress
- UI.Slider
- UI.Spinner
- UI.Splitpane
- UI.TabbedPane
- UI.Table
- UI.TextField
- UI.TimePicker
- UI.Toolbox
- UI.Tree
- UI.Viewport
- UI.WeekSchedule