GE Lua Documentation

Press F to search!

DragFloat

Definition


-- @/lua/common/extensions/ui/imgui_gen_luaintf.lua:420
function M.DragFloat(string_label, float_v, float_v_speed, float_v_min, float_v_max, string_format, ImGuiSliderFlags_flags)
  if float_v_speed == nil then float_v_speed = 1 end
  if float_v_min == nil then float_v_min = 0 end
  if float_v_max == nil then float_v_max = 0 end
  if string_format == nil then string_format = "%.3f" end
  if ImGuiSliderFlags_flags == nil then ImGuiSliderFlags_flags = 0 end
  if string_label == nil then log("E", "", "Parameter 'string_label' of function 'DragFloat' cannot be nil, as the c type is 'const char *'") ; return end
  if float_v == nil then log("E", "", "Parameter 'float_v' of function 'DragFloat' cannot be nil, as the c type is 'float *'") ; return end
  return imgui.DragFloat(string_label, float_v, float_v_speed, float_v_min, float_v_max, string_format, ImGuiSliderFlags_flags)
end

Callers

@/lua/ge/extensions/flowgraph/nodes/ui/imgui/elemental/imNumbers.lua
    imVal = im.FloatPtr(self.val)
    ret = im.DragFloat(label, imVal, step, min, max, format, self.pinIn.power.value or 1)
  end
@/lua/ge/extensions/editor/api/gui.lua
local function uiDragFloat(label, v, v_speed, v_min, v_max, format, flags, editEnded)
  local res = imgui.DragFloat(label, v, v_speed, v_min, v_max, format, flags)
  if editEnded then
@/lua/ge/extensions/editor/engineAudioDebug.lua
      im.Indent()
      changed = im.DragFloat("mainGain", mainGain, 1, -30, 10) or changed
      changed = im.DragFloat("muffling", muffling, 0.01, 0, 1) or changed
      changed = im.DragFloat("mainGain", mainGain, 1, -30, 10) or changed
      changed = im.DragFloat("muffling", muffling, 0.01, 0, 1) or changed
      im.Unindent()
      im.Indent()
      changed = im.DragFloat("onLoadGain", onLoadGain, 0.01, -0, 1) or changed
      changed = im.DragFloat("offLoadGain", offLoadGain, 0.01, 0, 1) or changed
      changed = im.DragFloat("onLoadGain", onLoadGain, 0.01, -0, 1) or changed
      changed = im.DragFloat("offLoadGain", offLoadGain, 0.01, 0, 1) or changed
      im.Unindent()
      im.Indent()
      changed = im.DragFloat("lowShelfFreq", lowShelfFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("lowShelfGain", lowShelfGain, 1, -30, 30) or changed
      changed = im.DragFloat("lowShelfFreq", lowShelfFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("lowShelfGain", lowShelfGain, 1, -30, 30) or changed
      changed = im.DragFloat("highShelfFreq", highShelfFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("lowShelfGain", lowShelfGain, 1, -30, 30) or changed
      changed = im.DragFloat("highShelfFreq", highShelfFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("highShelfGain", highShelfGain, 1, -30, 30) or changed
      changed = im.DragFloat("highShelfFreq", highShelfFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("highShelfGain", highShelfGain, 1, -30, 30) or changed
      im.Unindent()
      im.Indent()
      changed = im.DragFloat("eqLowGain", eqLowGain, 1, -30, 30) or changed
      changed = im.DragFloat("eqLowFreq", eqLowFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("eqLowGain", eqLowGain, 1, -30, 30) or changed
      changed = im.DragFloat("eqLowFreq", eqLowFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("eqLowWidth", eqLowWidth, 0.01, 0, 1) or changed
      changed = im.DragFloat("eqLowFreq", eqLowFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("eqLowWidth", eqLowWidth, 0.01, 0, 1) or changed
      im.Unindent()
      im.Indent()
      changed = im.DragFloat("eqHighGain", eqHighGain, 1, -30, 30) or changed
      changed = im.DragFloat("eqHighFreq", eqHighFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("eqHighGain", eqHighGain, 1, -30, 30) or changed
      changed = im.DragFloat("eqHighFreq", eqHighFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("eqHighWidth", eqHighWidth, 0.01, 0, 1) or changed
      changed = im.DragFloat("eqHighFreq", eqHighFreq, 100, 20, 20000) or changed
      changed = im.DragFloat("eqHighWidth", eqHighWidth, 0.01, 0, 1) or changed
      im.Unindent()
      im.Indent()
      changed = im.DragFloat("eqFundamentalGain", eqFundamentalGain, 1, -30, 30) or changed
      changed = im.SliderInt("fundamentalFrequencyCylinderCount", fundamentalFreqCylCount, 0, 32) or changed
@/lua/common/extensions/ui/imgui_gen_luaintf.lua
  if float_v == nil then log("E", "", "Parameter 'float_v' of function 'DragFloat' cannot be nil, as the c type is 'float *'") ; return end
  return imgui.DragFloat(string_label, float_v, float_v_speed, float_v_min, float_v_max, string_format, ImGuiSliderFlags_flags)
end
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
  local x = im.GetCursorPosX()
  if im.DragFloat(translateLanguage("ui.trackBuilder.wallsCeiling.height", "Height") .. "##left", modifierValues.leftWall.value,0.1) then
    if modifierValues.leftWall.value[0] > 50 then
  x = im.GetCursorPosX()
  if im.DragFloat(translateLanguage("ui.trackBuilder.wallsCeiling.height", "Height") .. "##right", modifierValues.rightWall.value,0.1) then
    if modifierValues.rightWall.value[0] > 50 then
  x = im.GetCursorPosX()
  if im.DragFloat(translateLanguage("ui.trackBuilder.wallsCeiling.height", "Height") .. "##ceil", modifierValues.ceilingMesh.value,0.1) then
    if modifierValues.ceilingMesh.value[0] > 50 then
  x = im.GetCursorPosX()
  if im.DragFloat("Height", modifierValues.height.value,0.1, nil, nil, "%.1f") then
     tbFunctions.modifierChange('height')
  end
  if im.DragFloat(translateLanguage("ui.trackBuilder.trackSettings.rotation", "Rotation"),trackPositionValues.rotation) then
    tb.setTrackPosition(trackPositionValues.position[0],trackPositionValues.position[1],trackPositionValues.position[2],trackPositionValues.rotation[0])
        if dimensions == 1 then
          if im.DragFloat("Scale   ##o"..i,o.scale,0.01, nil, nil, "%.2f") then tbFunctions.modifierChange('obstacles') end
        elseif dimensions == 2 then
          if im.DragFloat3("   ##o"..i,o.scale,0.01, nil, nil, "%.2f") then tbFunctions.modifierChange('obstacles') end
          if im.DragFloat("Scale   ##xo"..i,o.extra,0.01, nil, nil, "%.2f") then tbFunctions.modifierChange('obstacles') end
        elseif dimensions == 5 then
local function checkPointInput()
  if im.DragFloat("Size##cp",modifierValues.checkpoint.size, 0.25) then
    if modifierValues.checkpoint.size[0] > 50 then
    im.Combo1("Mode",addSubtrackParams.mode,addSubtrackParams.modes)
    im.DragFloat("Distance",addSubtrackParams.distance,0.1)
    if im.DragFloat("Radius",addSubtrackParams.radius,0.1) then
    im.DragFloat("Distance",addSubtrackParams.distance,0.1)
    if im.DragFloat("Radius",addSubtrackParams.radius,0.1) then
      addSubtrackParams.radius[0] = math.max(0,addSubtrackParams.radius[0])
    if addSubtrackParams.mode[0] == 1 or addSubtrackParams.mode[0] == 2 then
      im.DragFloat("Angle", addSubtrackParams.angle, 1)
    end
    if addSubtrackParams.mode[0] == 1 then
      im.DragFloat("Offset", addSubtrackParams.angleOffset, 1)
    end
@/lua/ge/extensions/editor/scriptAIManager.lua
        im.PushItemWidth(60)
        im.DragFloat('Start Offset', timeOffsetFloatPtr[vehId], 0.01)
        im.tooltip('Cuts of X seconds from the start. You need to restart the playback after changing this.')
        im.PushItemWidth(60)
        im.DragFloat('Start Delay', startDelayFloatPtr[vehId], 0.01)
        im.tooltip('Delays the start for X seconds. You need to restart the playback after changing this.')
@/lua/ge/extensions/editor/dynamicDecals/widgets.lua
  im.PushItemWidth(im.GetContentRegionAvailWidth() + (widgetOptions.widthMod or 0))
  if im.DragFloat(widgetId, editor.getTempFloat_NumberNumber(baseProp.getMod and baseProp.getMod(value) or value), baseProp.dragSpeed, baseProp.min, baseProp.max, baseProp.format) then
    local newVal = editor.getTempFloat_NumberNumber()
  im.PushItemWidth(width)
  if im.DragFloat(string.format("%s_x", widgetId), editor.getTempFloat_NumberNumber(baseProp.getMod and baseProp.getMod(value[1]) or value[1]), baseProp.dragSpeed, baseProp.min[1], baseProp.max[1], baseProp.format) then
    local newVal = editor.getTempFloat_NumberNumber()
  im.PushItemWidth(width)
  if im.DragFloat(string.format("%s_y", widgetId), editor.getTempFloat_NumberNumber(baseProp.getMod and baseProp.getMod(value[2]) or value[2]), baseProp.dragSpeed, baseProp.min[2], baseProp.max[2], baseProp.format) then
    local newVal = editor.getTempFloat_NumberNumber()