Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freeroam: Map key bind interferes with race editor help #535

Closed
dnl-k opened this issue Aug 16, 2024 · 0 comments
Closed

freeroam: Map key bind interferes with race editor help #535

dnl-k opened this issue Aug 16, 2024 · 0 comments

Comments

@dnl-k
Copy link
Contributor

dnl-k commented Aug 16, 2024

Which resource(s) have this problem?
freeroam, editor / race

Describe the bug
4083f3a Added F2 to show the map in the freeroam resource. The race editor help thingy in the race gamemode uses F2 as show/hide. Since the editor relies on freeroam and both need to be present at the same time, a different key for either the map or the help thingy should be considered.

To Reproduce

  1. Start your local map editor
  2. Start a map with the race gamemode
  3. Try hiding the help thingy by pressing F2
  4. It'll show the map.

Expected behavior
One key shouldn't be bound to two functions.

Version
1.6

MittellBuurman added a commit to MittellBuurman/mtasa-resources that referenced this issue Nov 11, 2024
Added onClientResourceStart and onClientResourceStop event handlers to
listen on the root element.

When both the editor resource, and the race resource are active, it
unbinds toggleMap from F2

When the editor resource is active, and you stop the race resource, it
binds toggleMap back to F2.

Since the help menu in Race is only active when the editor is active,
this should really be the only time it should either bind or unbind the
toggleMap.
MittellBuurman added a commit to MittellBuurman/mtasa-resources that referenced this issue Nov 11, 2024
Added onClientResourceStart and onClientResourceStop event handlers to
listen on the root element.

When both the editor resource, and the race resource are active, it
unbinds toggleMap from F2

When the editor resource is active, and you stop the race resource, it
binds toggleMap back to F2.

Since the help menu in Race is only active when the editor is active,
this should really be the only time it should either bind or unbind the
toggleMap.
MittellBuurman added a commit to MittellBuurman/mtasa-resources that referenced this issue Nov 11, 2024
Added onClientResourceStart and onClientResourceStop event handlers to
listen on the root element.

When both the editor resource, and the race resource are active, it
unbinds toggleMap from F2

When the editor resource is active, and you stop the race resource, it
binds toggleMap back to F2.

Since the help menu in Race is only active when the editor is active,
this should really be the only time it should either bind or unbind the
toggleMap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant