Jump to content

Cursor


tosfera

Recommended Posts

Posted

Hey guys,

It's a quite... weird question but is there any idea to return the cursor as an element? I know you can get elements with some specific data, but I'm not sure if the cursor has any data assigned to it or something like that. I was thinking about storing the ShowCursor into a variable but it returns a bool instead of an element.

Anyone that knows if there is any data assigned to it, if you can return it as an element?

Thanks!

Posted (edited)

There is not a cursor element. But if you want you can make a kind of element (an object) from it, but it isn't a big difference from the standard functions:

cursor = {} 
  
function cursor.show ( state ) 
    return showCursor ( state ) 
end 
  
function cursor.getPos () 
    return getCursorPosition () 
end 
-- etc... 
  
cursor.show(false) -- hide it 
x, y, wx, wy,wz = cursor.getPos () -- get it's positions 

Edited by Guest
Posted
There is not a cursor element. But if you want you can make a kind of element from it, but it isn't a big difference from the standard functions:
cursor = {} 
  
function cursor.show ( state ) 
    return showCursor ( state ) 
end 
  
function cursor.getPos () 
    return getCursorPosition () 
end 
-- etc... 
  
cursor.show(false) -- hide it 
x, y, wx, wy,wz = cursor.getPos () -- get it's positions 

Omg I love you, I totally forgot about the getCursorPosition THANKS!

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...