GE Lua Documentation

Press F to search!

IsMouseDown

Definition


-- @/lua/common/extensions/ui/imgui_gen_luaintf.lua:1134
function M.IsMouseDown(ImGuiMouseButton_button) return imgui.IsMouseDown(ImGuiMouseButton_button) end

Callers

@/lua/ge/extensions/editor/toolUtilities/ribbonInput.lua
        render.drawSphereHighlight(ribbons[rIdx].nodes[nodeIdx]) -- User is over a node, so highlight that.
        if im.IsMouseDown(0) then
          out.ribbonIdx, out.nodeIdx = rIdx, nodeIdx -- User is starting to drag a node.
        else
          if not isNodeDrag and not im.IsMouseDown(0) and markupTime < 0.0 then
            render.markupDrag(ribbons[rIdx].nodes[nodeIdx]) -- Draw a special markup when the mouse is over a node.
      end
      if not im.IsMouseDown(0) then
        editor.history:commitAction("Drag Node", { old = dragStatePre, new = deepCopyFn() }, undoFn, redoFn)
@/lua/ge/extensions/editor/terrainEditor.lua
          if im.GetIO().MouseDelta.x ~= 0 or im.GetIO().MouseDelta.y ~= 0 then
            if im.IsMouseDown(0) and startDragHeight then
              terrainEditor:on3DMouseDragged(gui3DMouseEvent, true)
@/lua/ge/extensions/editor/toolUtilities/splineInput.lua
    -- Handle 'end drag' events.
    if not im.IsMouseDown(0) then
      local joinHandled = handleEndDragEvents(splines, selSpline, deepCopyFunct, deepCopyStateFunct, joinFunct, undoFunct, redoFunct, undoStateFunct, redoStateFunct, afterEndDragCallback, isShiftDown)
            render.markupSelectSpline(splines[actualHoverSplineIdx].nodes[hoverNodeIdx])
          elseif not dragSplineIdx and not im.IsMouseDown(0) and markupTime < 0.0 then
            render.markupDrag(splines[actualHoverSplineIdx].nodes[hoverNodeIdx])
          render.drawSphereNode(pHit)
          if not dragSplineIdx and not im.IsMouseDown(0) and markupTime < 0.0 then
            render.markupInsertNode(pHit)
    -- Handle 'end bar drag' events.
    if not im.IsMouseDown(0) then
      if dragStatePre then
      render.drawSphereHighlight(nodes[hoverNodeKey]) -- Draw a highlight when the mouse is over a graph node.
      if not im.IsMouseDown(0) and markupTime < 0.0 then
        render.markupGraphNodeHover(nodes[hoverNodeKey]) -- Draw a special markup when the mouse is over a graph node.
@/lua/ge/extensions/editor/scriptAIEditor.lua
  -- Handle the mouse up event (only applies to trajectory nodes, to commit history).
  if im.IsMouseDown(0) == false then
    mState.isDragArmed = false
@/lua/ge/extensions/editor/dragRaceEditor/utils.lua
    mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/crawlEditor/input.lua
    mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/gameplay/missions/missionTypes/editorHelper.lua
    self.mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    self.mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    self.mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/api/gizmo.lua

  if not imgui.IsMouseDown(0) and  not imgui.IsMouseDown(1) and not imgui.IsMouseDown(2) and not imgui.GetIO().WantCaptureMouse then
    editor.objectIconHoverId = editor.objectIconHitId

  if not imgui.IsMouseDown(0) and  not imgui.IsMouseDown(1) and not imgui.IsMouseDown(2) and not imgui.GetIO().WantCaptureMouse then
    editor.objectIconHoverId = editor.objectIconHitId

  if not imgui.IsMouseDown(0) and  not imgui.IsMouseDown(1) and not imgui.IsMouseDown(2) and not imgui.GetIO().WantCaptureMouse then
    editor.objectIconHoverId = editor.objectIconHitId
    if not axisGizmoEventState.mouseDown
        and imgui.IsMouseDown(0)
        and editor.isViewportHovered()
    -- end dragging the gizmo, finalize transform and add undo
    elseif axisGizmoEventState.mouseDown and not imgui.IsMouseDown(0) then
      axisGizmoEventState.mouseDown = false
@/lua/ge/extensions/editor/objectTool.lua
  -- move selection around the normals of terrain/objects
  if imgui.IsMouseClicked(0) or imgui.IsMouseDown(0) or draggingObjectToAlign then
    if editor.selection.object and altDown and ctrlDown and #editor.selection.object then

        if not imgui.IsMouseDown(0) and draggingObjectToAlign then
          draggingObjectToAlign = false
  if editor.selection.object and editor.selection.object[1] then
    if imgui.IsMouseDown(0) then
      pasteObjects(getMementoFromManipulableSelection())
@/lua/ge/extensions/editor/roadEditor.lua
    -- Debug cursor
    --[[if not im.IsMouseDown(1) then
      debugDrawer:drawSphere(focusPoint, 0.5, cursorColor)
    -- The mouse button is down
    if mouseButtonHeldOnNode and im.IsMouseDown(0) and mouseMoved then
      local cursorPosImVec = im.GetMousePos()
@/lua/ge/extensions/flowgraph/nodes/debug/cameraMouseRayCast.lua
      self.pinOut.clicking.value = im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
      self.pinOut.hold.value = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    else
@/lua/ge/extensions/editor/barriersEditor.lua
  local down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
  local hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/slotTrafficEditor.lua
    -- The mouse button is down
    if mouseButtonHeldOnNode and im.IsMouseDown(0) then
      local cursorPosImVec = im.GetMousePos()
@/lua/ge/extensions/editor/flowgraph/variables.lua
  end
  if not im.IsMouseDown(0) then self.dragPayload = nil end
  self:End()
@/lua/ge/extensions/editor/toolUtilities/polygon.lua
    -- Handle 'end drag' events.
    if not im.IsMouseDown(0) then
      dragNodeIdx = nil -- Keep this empty any time the mouse button is not held down.
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
      local doFill = not im.GetIO().KeyShift and im.GetIO().KeyCtrl and im.IsMouseClicked(0,false)
      local holdAndPaint = not im.GetIO().KeyShift and not im.GetIO().KeyCtrl and im.IsMouseDown(0)
      local pipette = im.GetIO().KeyShift and not im.GetIO().KeyCtrl and im.IsMouseClicked(0,false)
    local doFill = not im.GetIO().KeyShift and im.GetIO().KeyCtrl and im.IsMouseClicked(0,false)
    local holdAndPaint = not im.GetIO().KeyShift and not im.GetIO().KeyCtrl and im.IsMouseDown(0)
    local pipette = im.GetIO().KeyShift and not im.GetIO().KeyCtrl and im.IsMouseClicked(0,false)
@/lua/ge/extensions/editor/sceneTree.lua
          and node.renameRequestTime
          and not imgui.IsMouseDown(0)
          and (socket.gettime() - node.renameRequestTime) > imgui.GetIO().MouseDoubleClickTime
@/lua/ge/extensions/editor/gen/decal.lua

    if im.IsMouseDown(0) and rayCast and not im.IsWindowHovered(im.HoveredFlags_AnyWindow) and not im.IsAnyItemHovered() then
--            if _dbdrag then return end
@/lua/ge/extensions/util/vehicleRopeDebug.lua
    local mouseReleased = im.IsMouseReleased(0)
    local mouseDown = im.IsMouseDown(0)
@/lua/ge/extensions/editor/roadArchitect.lua
  local mousePos = util.mouseOnMapPos()
  local isMouseClickedL, isMouseClickedR, isMouseDownL = im.IsMouseClicked(0), im.IsMouseClicked(1), im.IsMouseDown(0)
  local dt = mouseTimer:stopAndReset()
@/lua/ge/extensions/editor/rallyEditor/drivelineTab.lua
  local isDelDown = im.IsKeyDown(im.GetKeyIndex(im.Key_Delete))
  local isMouseDown = im.IsMouseDown(0)
  local isMouseClicked = im.IsMouseClicked(0)
@/lua/ge/extensions/editor/forestEditor.lua
            if im.GetIO().MouseDelta.x ~= 0 or im.GetIO().MouseDelta.y ~= 0 then
              if im.IsMouseDown(0) then
              if hit then
                if im.IsMouseDown(0) and var.lassoFHLastMousePos == nil then
                  var.lassoFHLastMousePos = hit.pos
    selectForestItems(duplicateForestItems(editor.selection.forestItem))
    if not im.IsMouseDown(0) then
      addItems(editor.selection.forestItem, true)
@/lua/ge/extensions/editor/raceEditor.lua
    mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/inspector.lua
    end
    if hoveredHandleSquare ~= nil and imgui.IsMouseDown(0) then
      draggingGCUVHandleSq = hoveredHandleSquare
  if imgui.IsItemHovered() then
    if imgui.IsMouseDown(0) then
      uvButtonBGColor = imgui.GetStyleColorVec4(imgui.Col_ButtonActive)
@/lua/ge/extensions/editor/util/editorElementHelper.lua
    self.mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    self.mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    self.mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/meshEditor.lua
    -- Debug cursor
    --[[if not im.IsMouseDown(1) then
      debugDrawer:drawSphere(focusPoint, 0.5, cursorColor)
    -- The mouse button is down
    if mouseButtonHeldOnNode and im.IsMouseDown(0) then
@/lua/ge/extensions/editor/driftDataEditor.lua
    mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/sitesEditor.lua
    mouseInfo.down = im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.up   = im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/rallyEditor.lua
    mouseInfo.down =  im.IsMouseClicked(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.hold = im.IsMouseDown(0) and not im.GetIO().WantCaptureMouse
    mouseInfo.up =  im.IsMouseReleased(0) and not im.GetIO().WantCaptureMouse
@/lua/ge/extensions/editor/vehicleDetailViewer.lua

    if im.IsMouseDown(0) then
      if not view.isDragging then
@/lua/ge/extensions/editor/missionStartPositionEditor.lua
        -- Handle dragging only for selected mission
        if isSelected and isDragging and im.IsMouseDown(0) then
          if mousePos3D then
@/lua/ge/extensions/editor/biomeTool.lua
  if imgui.IsItemActive() then
    if imgui.GetIO().MouseDelta.y ~= 0 and imgui.IsMouseDown(0)then
      local newHeightVal = levelBiomeToolbarHeight + imgui.GetIO().MouseDelta.y
  if imgui.IsItemActive() then
    if imgui.GetIO().MouseDelta.y ~= 0 and imgui.IsMouseDown(0)then
      local newHeightVal = levelBiomeLevelsListHeight + imgui.GetIO().MouseDelta.y
  if imgui.IsItemActive() then
    if imgui.GetIO().MouseDelta.y ~= 0 and imgui.IsMouseDown(0)then
      local newHeightVal = levelBiomeLevelPropsHeight + imgui.GetIO().MouseDelta.y
  if imgui.IsItemActive() then
    if imgui.GetIO().MouseDelta.y ~= 0 and imgui.IsMouseDown(0)then
      local newHeightVal = biomeAreasToolbarHeight + imgui.GetIO().MouseDelta.y
  if imgui.IsItemActive() then
    if imgui.GetIO().MouseDelta.y ~= 0 and imgui.IsMouseDown(0)then
      local newHeightVal = biomeAreasLevelsListHeight + imgui.GetIO().MouseDelta.y
  if imgui.IsItemActive() then
    if imgui.GetIO().MouseDelta.y ~= 0 and imgui.IsMouseDown(0)then
      local newHeightVal = biomeAreasLevelPropsHeight + imgui.GetIO().MouseDelta.y

  if not imgui.IsMouseDown(0) then
    local hoveredNodeInfo = getLassoNodeUnderCursor()
@/lua/ge/extensions/editor/vizHelper.lua
    -- interactive hacky input
    if not im.IsMouseDown(1) then
      -- right mouse means we are moving the camera ...

    if not im.GetIO().WantCaptureMouse and im.IsMouseDown(0) then
      if (lastPos - focusPos):length() >= minDistance[0] then
@/lua/ge/extensions/core/ropeVisualTest.lua
    local mouseReleased = im.IsMouseReleased(0)
    local mouseDown = im.IsMouseDown(0)
@/lua/ge/extensions/flowgraph/nodes/ui/imgui/elemental/imButton.lua
    local down = im.IsMouseClicked(0)
    local hold = im.IsMouseDown(0)
    local up =   im.IsMouseReleased(0)