-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Info panel screen rework and tinker station screen tweaks #4988
base: 1.18.2
Are you sure you want to change the base?
Conversation
…nstructor instead of being set directly
…ugh the constructor
…o reduce duplicated code between them
…esn't get scaled by textScale
Why are guis so complicated? |
# Conflicts: # src/main/java/slimeknights/tconstruct/tables/client/inventory/TinkerStationScreen.java
GuiEventListener.mouseReleased() is not used here because unlike the current call, the usual call to mouseReleased() only happens when the mouse is over the widget area.
… the original style with setters
# Conflicts: # src/main/java/slimeknights/tconstruct/tables/client/inventory/PartBuilderScreen.java
Any update on this? Seems the implementation of the modifier workstation broke this PR. |
I'll have a look at it to resolve the merge conflict and make sure it still works as intended. |
Might also be worth moving some of these changes back to Mantle in the future, been meaning to deprecate the nested screen method of modules for awhile, would probably be good to fully do it when we port to 1.19. I'll double check with the other people who use Mantle to see if any of them use Mantle's GUI stuff at all, if not we could probably just port the new classes there and ditch the multimodule stuff. |
# Conflicts: # src/main/java/slimeknights/tconstruct/tables/client/inventory/TinkerStationScreen.java # src/main/resources/assets/tconstruct/textures/gui/tinker_station.png
Yeah, Anyways, this PR should be ready again now. I did some basic testing and noticed no issues with |
Great, should have more time this weekend to look into this again. I will likely do a release without this change just as I don't have time to really test it, but this will be some good cleanup for the release after. |
A continuation of the module-screen-to-widget rework that started in #4841.
For the reason described in the last PR,
InfoPanelScreen
andPartInfoPanelScreen
had been converted from instances ofModuleScreen
, to widgets using vanillas system.There are also some changes to how the info panel is used, to the point that the part builder no longer needed its own extension of the info panel.
Effects of the conversion from a module screen to a widget are akin to last time:
AbstractContainerScreen
orScreen
, it will no longer be treated as a screen by other mods. For example, the info panel will no longer have anInitScreenEvent
posted for it.Widget
andGuiEventListener
and is thus added to the parent screen as a screen widget instead of as a module screen.NarratableEntry
is also implemented in order to make it usable withscreen.addRenderableWidget()
, however it is set to not have any narration for now.leftPos
andimageWidth
etc) expanded to include the the info panels that normally happens inMultiModuleScreen.updateSubmodule()
. With howMultiModuleScreen.render()
works, this will not affect any render functions. The size of the info panels are still accounted for jei and when dropping items from the screen.There are also a number of other cleanup and changes included:
screen.init()
call, instead of created in the constructor and getting its position updated inscreen.init()
. This is more inline with how vanilla widgets are handled, and allows us to make the position immutable (which it now also is).screen.resize()
call.infoPanel.wood()
orinfoPanel.stone()
.PartInfoPanelScreen
, a helper classCaptionsBuilder
was introduced.SimpleElementWidget
has been added to achieve the previous step in a simple manner.For comparison on the info panel height and beam changes, here's the screen before:
and here's the screen after the changes:
After this PR has been merged, I will as a final step also rework
SideButtonsScreen
andTinkerStationButtonsScreen
.