Jump to content

Fix for multiple cursors


ds1-e

Recommended Posts

  • Scripting Moderators

Hey, i've encountered a annoying issue.

I use:

showCursor(not isCursorShowing(), true)

For toggle on/off cursor. Code works well, when it's a single use, but whenever i use it 2 times at once (different GUIs), it causes that cursor enables when closing GUI, so to fix this i need to reconnect or mess up with toggling on/off cursor with console. So i am curious how i could fix it. Any ideas?

Link to comment

It's totally expected, when you hide the gui at the first time, isCursorShowing will return false after, so when you execute the function again it will show the cursor, as simple as that:

not true = false

not false = true

So, it you only want to hide it, why checking for its visibility

 

showCursor(false, true)

 

  • Like 1
Link to comment
  • Scripting Moderators
2 hours ago, IIYAMA said:

Are we talking about 1 resource or multiple ones? Because resource A can't disable the cursor for resource B.

GUI's do not have any influence on the cursor function.

One resource.

2 hours ago, savour said:

It's totally expected, when you hide the gui at the first time, isCursorShowing will return false after, so when you execute the function again it will show the cursor, as simple as that:

not true = false

not false = true

So, it you only want to hide it, why checking for its visibility

 


showCursor(false, true)

 

Ye but this is not what i want. For example. 2 GUI's opened, i close 1st, cursor stays until i close 2nd.

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