ImGui.Core:filledSliderFloat3

From GiderosMobile
Revision as of 15:28, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2020.9
Class: ImGui

Description

Displays three regular filled float sliders side by side. <syntaxhighlight lang="lua"> (number), (number), (number), (bool) =

 ImGui:filledSliderFloat3(label, mirrorFlag, value1, value2, value3, [min=0, max=0, formatString="%.3f",
   ImGuiSliderFlags=0])

</source>

Parameters

label: (string) the label
mirrorFlag: (bool) whether to mirror the slider or not
value1: (number) the current first value
value2: (number) the current second value
value3: (number) the current third value
min: (number) the min value
max: (number) the max value
formatString: (string) the format of the value
ImGuiSliderFlags: (number) the drag slider flag

Return values

Returns (number) the current first value
Returns (number) the current second value
Returns (number) the current third value
Returns (bool) whether a value has changed

Example

<syntaxhighlight lang="lua"> require "ImGui"

local imgui = ImGui.new() stage:addChild(imgui)

local window01 = true local value01 = 50 local value02 = 30 local value03 = 60

function onEnterFrame(e) -- 1 we start ImGui imgui:newFrame(e) -- 2 we add some child windows and build our GUI window01 = imgui:beginWindow("Window 01") -- no close button (X) if window01 then -- the variable is false when window is collapsed imgui:text("Hello Dear ImGui!") local isChanged = false value01, value02, value03, isChanged = imgui:filledSliderFloat3("slider3", true, value01, value02, value03, 0, 100, "%.1f", 0) if isChanged then print(value01, value02, value03) end end -- 3 we end the frame and render to screen imgui:endFrame() imgui:render() end

stage:addEventListener(Event.ENTER_FRAME, onEnterFrame) </source>