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

Better dpad input handling. #17

Merged
merged 2 commits into from Feb 22, 2024
Merged

Conversation

avahe-kellenberger
Copy link
Contributor

@avahe-kellenberger avahe-kellenberger commented Feb 21, 2024

The current way inputs are handled is terrible. This makes it less terrible.

I don't really like my implementation, but the ninput library sucks, this was the only way I could get it to work.

Now, 1 input = 1 change to the UI.


Unrelated side-note (there's no issue tracker), this mod doesn't work with the training modpack (the training modpack will crash).
image

If you have any idea of how to fix it, that would be nice. Atm I'm using my own version of the latency mod which has the same functionality as yours, but does not modify text on the CSS (so it can be used in conjunction with the training mod pack).

@Naxdy
Copy link
Owner

Naxdy commented Feb 21, 2024

The reason the input handling is currently the way it is, is so that you can press and hold to increase the slider every 10ish frames. With this implementation, you'd have to repeatedly press in a direction to increment/decrement the value. This could be desirable? I don't know actually, personally I do use the "press and hold" from time to time. Either way, for "1 input = 1 change" I'd probably use a struct instead of 4 global bools, it tends to get messy quick.

As for the issue tracker, I had to disable it because it was getting abused by trolls. I'll see if it's safe to turn back on however.

The training mode issue should be fixed in the latest release.

@avahe-kellenberger
Copy link
Contributor Author

With my PR it can't be held, but having 1-to-1 input responsiveness helps consistency when changing values when in "stealth mode" which I think is valuable. If you'd like to accept these changes, I'll go ahead and update the PR to use a struct like you mentioned.

Thanks for the update!

@Naxdy
Copy link
Owner

Naxdy commented Feb 21, 2024

That's a good point actually, then yeah it would make sense to have it be 1 input = 1 change. With a struct I'd be happy to merge it.

@avahe-kellenberger
Copy link
Contributor Author

I'm not very familiar with Rust, this works but feel free to clean it up as you wish

@avahe-kellenberger
Copy link
Contributor Author

Side note, I've been having ARCropolis crash on me a lot in arenas, now that I've added this mod. Have you seen this issue yourself?
arcropolis_crash

@Naxdy
Copy link
Owner

Naxdy commented Feb 22, 2024

Could it be this? #18

If not, I suggest opening a separate issue (they're enabled again now)

@Naxdy Naxdy merged commit 0a8b522 into Naxdy:master Feb 22, 2024
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 this pull request may close these issues.

None yet

2 participants