Wet-Boys / LookingGlass

A QoL UI mod that exposes statistics for items and the player, adjusts the size and features of command and scrapper menus, and much more. Fully open source and compatible with RiskUI!
https://thunderstore.io
GNU Lesser General Public License v3.0
9 stars 5 forks source link

a few misc. StatsDisplay changes #25

Closed yuukotf2 closed 1 month ago

yuukotf2 commented 1 month ago

fun fact, i had velocity and update rate PRs in the works & got beaten to the punch on both counts, gg lol. gives me hope that this project is so active though. anyway, two commits that:

in combination, a format string like the following:

<align="center">Stats:</align>
<size=70%>
<size=80%><indent=0.75em>Speed: <pos=4em><mspace=0.5em>[speed]</mspace>
Velocity: <pos=4em><mspace=0.5em>[velocity]</mspace>
Jumps: <pos=4.5em><mspace=0.5em>[availableJumps]/[maxJumps]</mspace>
Base Damage: [baseDamage]
Attack Speed: [attackSpeed]
Crit: [critWithLuck]
Armor: [armor] | [armorDamageReduction]
Regen: [regen]

will get you something like this:

statz

which i think is pretty neat

ToastedOven commented 1 month ago

Hey just wanted to weigh in on this. It came to me in a dream but I realized that TextMeshPro elements have to know how big they actually are right? Well yes actually and it makes the problem super simple devenv_1FcLNz17fR That fixes the auto scaling problem entirely.

I still think there is some value in having an option for users to manually resize the window, like if they want to resize it to be effectively invisible.

yuukotf2 commented 1 month ago

figured there should be something like that in the API; just hadn't gone looking. can confirm it works, pushed. worth noting, though, that even if you let nlines go to to -1 so the final height works out to 0, it seemingly still refuses to make the panel completely disappear.

also updated RiskOfOptions to use the new flag so the input field doesn't get formatted as rich text

ToastedOven commented 1 month ago

thanks a bunch for this!