Up-Mods / OkZoomer

Adds a highly-configurable zoom key for Fabric and Quilt. The zoom is yours!
131 stars 24 forks source link

Issues with zoom logic. #82

Closed chezzzer closed 1 year ago

chezzzer commented 2 years ago

Hello,

It seems the logic that handles zooming in and out with key binds is flawed, permalink: https://github.com/EnnuiL/OkZoomer/blob/de260d1f82a16e87cb199d98ca8ee00740278c1f/src/main/java/io/github/ennuil/ok_zoomer/utils/ZoomUtils.java#L63

My config settings: https://i.imgur.com/fwb4z8B.png

So when I go past the minimum zoom using the decrease zoom key, it keeps decreasing the value, so it takes me how ever much time I zoomed past the minimum zoom distance, to zoom back in again.

Example: https://i.gyazo.com/9bb053d77c4a33a10748ddcb4b4625d8.gif (I start pressing the increase zoom key after I open chat)

EnnuiL commented 1 year ago

Hmm, this is something to be investigated

EnnuiL commented 1 year ago

wait oh i just understood what was the issue here and i see why: The zoom divisor is 1.0, and the minimum zoom divisor is 1.0; The main zoom divisor acts as a divisor (heh :P) between the upper and lower scroll steps, meaning that here? There are 1000 (upper) scroll steps between 50.0 (the max. zoom divisor) and 1.0 (the main zoom divisor) and there are 1000 (lower) scroll steps between 1.0 (the main zoom divisor) and 1.0 (the minimum zoom divisor); Yep, this means that this is intentional behavior, you can fix it by setting Lower Scroll Steps to 0; However, this does remind me that I should make the config screen cleaner, and this also gives me an idea for a feature