Tom.docsHomeHomePIXEL UIPIXEL UIUI3D2DUI3D2DI18NI18N
GitHubGitHub (opens in a new tab)
  • Getting Started
  • API Reference
  • StartDraw
  • EndDraw
  • GetCursorPos
  • IsHovering
  • IsPressing
  • IsPressed
  • DrawVGUI
  • More
  • GitHub Repository ↗ (opens in a new tab)
  • Home
    • Getting Started
    • Configuration
    • API Reference
    • Elements
      • ValidatedTextEntry
        • IsTextValid
        • OnValidate
        • SetValue
        • GetValue
        • SetPlaceholderText
        • GetPlaceholderText
      • TextEntry
        • IsEnabled
        • SetEnabled
        • GetValue
        • SetValue
        • IsMultiline
        • SetMultiline
        • IsEditing
        • GetEnterAllowed
        • SetEnterAllowed
        • GetUpdateOnType
        • SetUpdateOnType
        • GetNumeric
        • SetNumeric
        • GetHistoryEnabled
        • SetHistoryEnabled
        • GetTabbingDisabled
        • SetTabbingDisabled
        • GetPlaceholderText
        • SetPlaceholderText
        • GetFont
        • SetFont
        • GetInt
        • GetFloat
        • SetEditable
        • AllowInput
        • GetAutoComplete
        • OnKeyCode
      • TextButton
        • SizeToText
        • PaintExtra
      • Slider
        • OnValueChanged
      • Sidebar
        • SetImgurID
        • GetImgurID
        • SetImgurScale
        • GetImgurScale
        • SetImgurOffset
        • GetImgurOffset
        • AddItem
        • RemoveItem
        • SelectItem
      • ScrollPanel
        • AddItem
        • OnChildAdded
        • GetVBar
        • GetCanvas
        • InnerWidth
        • Rebuild
        • OnMouseWheeled
        • OnVScroll
        • ScrollToChild
        • LayoutContent
        • Clear
      • PropertySheet
        • AddSheet
        • SetActiveTab
        • OnActiveTabChanged
        • GetItems
        • SizeToContentWidth
        • SwitchToName
        • CloseTab
      • Navbar
        • AddItem
        • RemoveItem
        • SelectItem
      • MenuOptionCVar
        • OnChecked
      • Menu
        • AddPanel
        • AddOption
        • AddCVar
        • AddSpacer
        • AddSubMenu
        • Hide
        • OpenSubMenu
        • CloseSubMenu
        • ChildCount
        • GetChild
        • LayoutContent
        • Open
        • OptionSelectedInternal
        • OptionSelected
        • ClearHighlights
        • HighlightItem
      • LabelledCheckbox
        • OnToggled
        • SetText
        • GetText
        • SetFont
        • GetFont
        • SetTextColor
        • GetTextColor
        • SetAutoWrap
        • GetAutoWrap
      • Label
        • SetText
        • CalculateSize
      • ImgurButton
        • SetImgurID
        • GetImgurID
        • SetImgurSize
        • GetImgurSize
      • Frame
        • SetImgurID
        • GetImgurID
        • DragThink
        • SizeThink
        • CreateSidebar
        • AddHeaderButton
        • LayoutContent
        • Open
        • Close
        • OnClose
        • PaintHeader
        • PaintBefore
      • ComboBox
        • Clear
        • GetOptionText
        • GetOptionData
        • GetOptionTextByData
        • ChooseOption
        • ChooseOptionID
        • GetSelectedID
        • GetSelected
        • OnSelect
        • AddChoice
        • IsMenuOpen
        • CloseMenu
        • CheckConVarChanges
        • SetValue
      • ColorPicker
        • UpdateColor
        • SetColor
        • UpdatePositions
        • GetCenter
        • GetRadius
        • GetTriangleRadius
        • GetRingThickness
        • GetHueColor
      • Checkbox
      • Category
        • UnselectAll
        • SetTitle
        • SetContents
        • SetExpanded
        • Toggle
        • OnToggle
        • DoExpansion
        • LayoutContent
      • Button
        • DoToggle
        • PaintExtra
        • IsDown
        • OnPressed
        • OnReleased
        • OnToggled
        • DoClick
        • DoRightClick
        • DoMiddleClick
      • Avatar
        • SetPlayer
        • SetSteamID
    • Color
      • CopyColor
      • OffsetColor
      • LerpColor
      • GetRainbowColor
      • IsColorEqualTo
      • IsColorLight
      • ColorToHex
      • ColorToHSL
      • HexToColor
      • HSLToColor
    • Drawing
      • Text
        • DrawSimpleText
        • DrawText
        • DrawShadowText
        • DrawDualText
      • Rounded Boxes
        • DrawRoundedBox
        • DrawRoundedBoxEx
        • DrawFullRoundedBox
        • DrawFullRoundedBoxEx
      • Images
        • DrawImage
        • DrawImageRotated
        • DrawImgur
        • DrawImgurRotated
        • DrawProgressWheel
      • Overheads
        • DrawEntOverhead
        • DrawNPCOverhead
        • EnableIconOverheads
      • Circles
        • DrawCircle
        • CreateCircle
        • DrawCircleUncached
      • Outlined Boxes
        • DrawOutlinedBox
        • DrawOutlinedRoundedBox
      • Miscellaneous
        • DrawBlur
        • DrawRoundedTextBox
        • DrawFixedRoundedTextBox
    • Fonts
      • RegisterFont
      • RegisterFontUnscaled
      • GetRealFont
      • GetTextSize
    • Formatting
      • WrapText
      • EllipsesText
      • FormatMoney
      • FormatTime
      • DecToHex
    • Images
      • GetImage
      • GetImgur
    • Loaders
      • LoadDirectory
      • LoadDirectoryRecursive
    • Scaling
      • Scale
      • GetScaledConstant
      • RegisterScaledConstant
    • More
    • Example Projects
    • GitHub Repository ↗ (opens in a new tab)
    • Getting Started
    • API Reference
    • StartDraw
    • EndDraw
    • GetCursorPos
    • IsHovering
    • IsPressing
    • IsPressed
    • DrawVGUI
    • More
    • GitHub Repository ↗ (opens in a new tab)
    • Getting Started
    • Examples
    • API Reference
    • Core
      • GetLanguage
      • GetAddon
      • RegisterAddon
      • RegisterTranslation
    • Addon
      • New
      • GetName
      • GetAuthor
      • SetAuthor
      • GetFallbackLanguage
      • SetFallbackLanguage
      • GetTranslations
      • GetString
      • AddTranslation
    • Translation
      • New
      • GetLanguage
      • GetAuthor
      • GetPhrases
      • GetString
      • AddPhrase
    • Phrase
      • New
      • GetIdentifier
      • GetTemplate
      • GetFallbacks
      • GetString
    • More
    • GitHub Repository ↗ (opens in a new tab)
Create an issue → (opens in a new tab)Edit this page →
UI3D2D
GetCursorPos

GetCursorPos

number, number ui3d2d.getCursorPos()
Search GitHubView Source

Description

Returns the current position of the cursor. This will be nil when the player is not looking at the UI.

Returns

number x

The X position of the cursor.

number y

The Y position of the cursor.

EndDrawIsHovering

MIT License – © 2026 Tom O'Sullivan