Skyblocker icon indicating copy to clipboard operation
Skyblocker copied to clipboard

Excessive hud rework

Open viciscat opened this issue 1 year ago • 4 comments

"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

viciscat avatar Jul 01 '24 16:07 viciscat

With this, is there still an option to use the /widgets menu and tab list normally?

MisterCheezeCake avatar Jul 24 '24 13:07 MisterCheezeCake

Unfortunately appears to be a bit buggy.

  1. There is no Apply everywhere button in auto positioning mode.
  2. Restore Positioning does not work when you switch a widget from custom to auto mode.
  3. Mode of selected widget does not update when you press Restore Positioning.
  4. Restore Positioning does 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.

kevinthegreat1 avatar Aug 30 '24 23:08 kevinthegreat1

Unfortunately appears to be a bit buggy.

these should be fixed

viciscat avatar Sep 08 '24 22:09 viciscat

I think it looks good? This is way too much to review.

kevinthegreat1 avatar Sep 09 '24 18:09 kevinthegreat1

I believe this is good, maybe some final testing.

kevinthegreat1 avatar Oct 19 '24 21:10 kevinthegreat1