Tempad

Tempad

1M Downloads

[Bug]: Scrolling with mouse wheel breaks list order

Opened this issue ยท 2 comments

commented

Bug Description

if you have 12 location saved in the tempad, when you save a new location then re-open the tempad, if you scroll with the mouse wheel to go lower, the list order breaks. it seens to have no type of order since they are no correlation with the locations.
test1
test1

How to Reproduce?

  1. get 12 location on tempad
  2. add new location
  3. re-open tempad tp menu
  4. scroll up or down with mouse wheel

Expected Behavior

keep the order, not scramble completly

Version

1.4.0

Mod Loader Version

1.18.2

Mod Loader

Forge

Logs or additional context

No response

Code of Conduct

  • I have searched the issue tracker and confirmed that the issue has not been reported
  • I have checked the FAQ (if one is present) and my issue is not listed
  • I have verified that I am using the latest version of the mod
  • I have verified that I have installed all the required dependencies for the mod
  • I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
commented

1.18 is no longer supported

commented

Using the Tempad mod in the LPS SteamPunk mod pack (mc version 1.19.2, which you committed to 3 weeks ago) and I can confirm that the list still breaks when you scroll. I even know the reason, but I am not able to fix it right now.
me.codexadrian.tempad.client.gui.RunProgramScreen::init() & me.codexadrian.tempad.client.gui.RunProgramScreen::tick() use different code to fill the list. I can't tell if it is the only issue right now, but from what I can see the issue is cause by init() sorting the list while tick() doesn't. An issue I can see coming up is that it moves at most 12 items of allLocations to shownLocationData before sorting.
I might suggest either adding sorting before moving to shownLocationData for best experience, or removing the sort from init for a quick fix?