Excessive hud rework
"well i would just say change as less as possible but whatever" - kevin
what the heck is this
This is the hud system rewritten for better or for worse (you decide). It replaces the /widget menu to be able to move the widgets from the TAB and custom HUD around, allowing you to have a widget stick to the side of another, etc to avoid overlapping.
renbdering
Widgets shouldn't call their render method themselves, it is now handled by ScreenMaster. The widgets implement shouldRender(Location location) to see if they should appear in that island, TabHudWidget doesn't due to them being "controlled" by Hypixel. The method takes in a location instead of using Utils.getLocation() for the config screen. When the widgets get instantiated their instance gets added to a map in ScreenMaster (internalId -> instance) automagically
HudWidget need to be instantiated manually (using a static final INSTANCE for example), while TabHudWidget don't, all inheritors of TabHudWidget in the widget package get instantiated automatically with 0 arguments in the constructor at start up.
other uses
TabHudWidget will also be able to be used as some sort of interface to fetch info from tab, by getting their instance using either a public static instance or by using the map in ScreenMaster, or just directly calling related methods like in CommsWidget for the commission waypoints.
moving the widgets around
The config screen allows you to move the widgets around, it works and that's what matters. Video examples could maybe be made because it's not intuitive for everyone. (Parenting a widget etc)
Please go ahead and throw suggestions here or in the discord
With this, is there still an option to use the /widgets menu and tab list normally?
Unfortunately appears to be a bit buggy.
- There is no
Apply everywherebutton in auto positioning mode. -
Restore Positioningdoes not work when you switch a widget from custom to auto mode. - Mode of selected widget does not update when you press
Restore Positioning. -
Restore Positioningdoes not work after you switch a widget from auto to custom, drag it, reset, then switch it from auto to custom again, and drag it again.
Unfortunately appears to be a bit buggy.
these should be fixed
I think it looks good? This is way too much to review.
I believe this is good, maybe some final testing.