Better Slider Logic #11

Closed
opened 2022-05-21 23:58:21 +01:00 by pastaq · 3 comments
pastaq commented 2022-05-21 23:58:21 +01:00 (Migrated from github.com)

I'm developing a similar tool for the Aya Neo in Linux, which I actually forked from your repo. I don't have a steam-deck so I haven't tested the native functionality in the designed environment so this may not apply, but I wanted to pass along what I did to get the slider to function with a more expected behavior. As written, I had to select the tiny notch location to move the slider which was kind of a pain. The slider indicator was not "dragable". I came up with a solution which is in my repo here:

ce612cad78/main_view.html (L74)

Basically, you can get the local x position from a mouse event (up/down/move) which is relative to slider. You can then divide that x over the slider size to get a %, which you can send to the slider.style. If you know the # of elements for that slider you can also trigger notching logic, or have it snap to the nearest on mouseup events.

I'm developing a similar tool for the Aya Neo in Linux, which I actually forked from your repo. I don't have a steam-deck so I haven't tested the native functionality in the designed environment so this may not apply, but I wanted to pass along what I did to get the slider to function with a more expected behavior. As written, I had to select the tiny notch location to move the slider which was kind of a pain. The slider indicator was not "dragable". I came up with a solution which is in my repo here: https://github.com/pastaq/Aya-Neo-Power-Tools/blob/ce612cad78c512ca0dda17197d059af0b453c7bd/main_view.html#L74 Basically, you can get the local x position from a mouse event (up/down/move) which is relative to slider. You can then divide that x over the slider size to get a %, which you can send to the slider.style. If you know the # of elements for that slider you can also trigger notching logic, or have it snap to the nearest on mouseup events.
NGnius commented 2022-05-22 02:32:01 +01:00 (Migrated from github.com)

Thanks for letting me know how to do it!
I was really procrastinating doing this in hope that I could wait long enough for the whole React UI update to hit and not have to actually do it. Let's see if I can slip this into v0.6.0

Also, I checked out your fork a couple of days ago and thought it was pretty cool! I didn't even realize what RyzenAdj was -- had to look it up when I saw you were using it.

Thanks for letting me know how to do it! I was really procrastinating doing this in hope that I could wait long enough for the whole React UI update to hit and not have to actually do it. Let's see if I can slip this into v0.6.0 Also, I checked out your fork a couple of days ago and thought it was pretty cool! I didn't even realize what RyzenAdj was -- had to look it up when I saw you were using it.
pastaq commented 2022-05-22 05:24:01 +01:00 (Migrated from github.com)

RyzenAdj does have a couple of advantages. Firstly, its easy to add a polkit or sudoers as a single exposed utility. It's also specifically designed with APU's in mind since most of the exposed interfaces are different than desktop GPU's and the VanGogh chip in the steam deck. It is still limited though, so I'll probably need to target some of the native character files to replicate things like SMT, CPU frequency limits, etc.

Anyway, keep up the good work.

RyzenAdj does have a couple of advantages. Firstly, its easy to add a polkit or sudoers as a single exposed utility. It's also specifically designed with APU's in mind since most of the exposed interfaces are different than desktop GPU's and the VanGogh chip in the steam deck. It is still limited though, so I'll probably need to target some of the native character files to replicate things like SMT, CPU frequency limits, etc. Anyway, keep up the good work.
NGnius commented 2022-05-23 03:19:08 +01:00 (Migrated from github.com)

Implemented in d023f42ac5 and the commit after that (I got carried away with implement per-game profiles and forgot to commit polishing tweaks).

Implemented in d023f42ac552ff1a4c918594673b5d3ff2359eb6 and the commit after that (I got carried away with implement per-game profiles and forgot to commit polishing tweaks).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: NG-SD-Plugins/PowerTools#11
No description provided.