Open Proxy-99 opened 3 months ago
Read #891
Read #891
We need to fix that issue. For some reason the cursor is being managed by a resource and not game itself which is ridiculous.
Read #891
We need to fix that issue. For some reason the cursor is being managed by a resource and not game itself which is ridiculous.
hope someone put the time and effort to fix this and add like isServerCursorEnabled() and check from it the cursor status
It's not a bug. Current behavior prevents additional cursor managment in scripts. You can use showCursor
without thinking about other resources. Global behavior adds much pain for scripters.
It looks like you are doing something nasty, if you need this.
It's not a bug. Current behavior prevents additional cursor managment in scripts. You can use
showCursor
without thinking about other resources. Global behavior adds much pain for scripters.It looks like you are doing something nasty, if you need this.
Quite the opposite actually. If you need to show cursor depending on the state, you have isCursorShowing
.
Thats the point: to not care about other resources otherwise it causes chaos like in this case.
Its completely pointless to have the cursor dependant on other resources instead of making it like a simple switch.
It's not a bug. Current behavior prevents additional cursor managment in scripts. You can use
showCursor
without thinking about other resources. Global behavior adds much pain for scripters.It looks like you are doing something nasty, if you need this.
Well, I have two resources one for login page and the other for lobby page I do not see why can't force it to works on others
If you need to show cursor depending on the state, you have isCursorShowing.
You should use events and binds to control the state. isCursorShowing
has many edge cases.
Its completely pointless to have the cursor dependant on other resources instead of making it like a simple switch.
You can't have a simple switch, You need sync a moment when you can hide cursor in independent resources.
Simple case: You have two resources and they show independent windows. First resource uses binds to show/hide his window, second resource shows his window after onMarkerHit event and a player should fill some data to close it. You can't have a simple switch in first resource, because the switch soft locks a player.
There are many cases like this.
Current behavior is simplest solution, i see no reason for changes
You should use events and binds to control the state.
isCursorShowing
has many edge cases.
like?
Simple case: You have two resources and they show independent windows. First resource uses binds to show/hide his window, second resource shows his window after onMarkerHit event and a player should fill some data to close it. You can't have a simple switch in first resource, because the switch soft locks a player.
if you properly utilise isCursorShowing
then you wont soft lock any player.
if you properly utilise
isCursorShowing
then you wont soft lock any player.
Only if you put this check with 'onClientRender' to show cursor when it returns false. And you need this check in every gui resource. Otherwise you can't be sure, when you are allowed to hide cursor.
like?
Chatbox, console, pause menu activate cursor.
Only if you put this check with 'onClientRender' to show cursor when it returns false. And you need this check in every gui resource. Otherwise you can't be sure, when you are allowed to hide cursor.
huh? Why onClientRender
?
Chatbox, console, pause menu activate cursor.
I mean, what are the edge cases? Can you explain them?
huh? Why
onClientRender
?
Because there is no another option to do it with isCursorShowing
in independent resources. If you know one, provide it. There is always a combination of opening and closing when your logic doesn't work. I've solved this issue by using reference counter in my gui library.
I mean, what are the edge cases? Can you explain them?
You can't control these menus and can't hide cursor when they are open (it's not allowed).
Well, I have two resources one for login page and the other for lobby page I do not see why can't force it to works on others
When the login page shows the window, do showCursor(true) in the login resource. When it closes the window, do showCursor(false). Same with the lobby. And what is wrong with it in your case?
Well, I have two resources one for login page and the other for lobby page I do not see why can't force it to works on others
When the login page shows the window, do showCursor(true) in the login resource. When it closes the window, do showCursor(false). Same with the lobby. And what is wrong with it in your case?
well after login you will be moved to lobby which you can't control the cursor so I have to use export or disable the cursor within login resource before loading the lobby page which is thing I do not like, simply you can't override showCursor(false) won't work
well after login you will be moved to lobby which you can't control the cursor so I have to use export or disable the cursor within login resource before loading the lobby page which is thing I do not like, simply you can't override showCursor(false) won't work
If lobby needs cursor then let the lobby turn on the cursor when it needs it and turn it off when it doesn't. Same for login page. Show cursor only when it really needed. If you don't, it means, that your architecture is wrong.
Describe the bug
use
showCursor(true)
in a resource foldertry to disable it from another resource folder
won't work for some reason
Steps to reproduce
as described above
Version
Multi Theft Auto v1.6-release-22650
Additional context
No response
Relevant log output
No response
Security Policy