Jump to content

Does setCursorPosition work?


MrDadosz

Recommended Posts

try wiki example code :

function centerCursorFunction() 
    local showing = isCursorShowing () 
    if showing then -- if the cursor is showing 
        local screenX, screenY = guiGetScreenSize () --get the screen size in pixels 
        setCursorPosition (screenX/2, screenY/2) --set the cursor position to the center of the screen 
    else 
        outputChatBox( "Your cursor is not showing." ) 
    end 
end 
addCommandHandler( "centerCursor", centerCursorFunction ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...