UIGrid does not play nice with a regular Scrollbar.
The Solution
Use FixedScrollbar instead.
Notes
I had to make the choice between using Terraria.GameContent.UI.Elements.FixedUIScrollbar and Terraria.ModLoader.UI.Elements.FixedScrollbar. I opted for the vanilla type since that has actual official support. It seems that vanilla faced a similar situation in 1.4 that required this. Vanilla and tModLoader use identical logic in their implementations.
Furthermore, I made changes to the loading of SmartUIStates to expose their associated UserInterface as FixedUIScrollbar requires it.
Resolves #7.
The Problem
UIGrid
does not play nice with a regularScrollbar
.The Solution
Use
FixedScrollbar
instead.Notes
I had to make the choice between using
Terraria.GameContent.UI.Elements.FixedUIScrollbar
andTerraria.ModLoader.UI.Elements.FixedScrollbar
. I opted for the vanilla type since that has actual official support. It seems that vanilla faced a similar situation in 1.4 that required this. Vanilla and tModLoader use identical logic in their implementations.Furthermore, I made changes to the loading of
SmartUIState
s to expose their associatedUserInterface
asFixedUIScrollbar
requires it.