Side buttons rework#4990
Merged
Merged
Conversation
KnightMiner
reviewed
Sep 15, 2022
KnightMiner
left a comment
Member
There was a problem hiding this comment.
Just a couple of minor things until I have a chance to test this in game.
kirderf1
commented
Sep 15, 2022
KnightMiner
reviewed
Sep 15, 2022
KnightMiner
reviewed
Sep 15, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #4841 and #4988.
Reworks
SideButtonsScreento not useModuleScreen, and does some minor additional cleanup.AbstractContainerScreenorScreen, it will no longer be treated as a screen by other mods. For example, the side buttons will no longer have anInitScreenEventposted for it. THIS FIXES Inventory Locks show up twice in Tinkers' Construct GUI kirderf1/InventoryFree#9.WidgetandGuiEventListenerbut is not added to the parent screen as a screen widget. Instead, render and mouse input functions are called by the parent class directly.leftPosandimageWidthetc) expanded to include the the side buttons that normally happens inMultiModuleScreen.updateSubmodule(). With howMultiModuleScreen.render()works, this will not affect any render functions. The size of the widget is still accounted for jei and when dropping items from the screen.screen.init()call, instead of created in the constructor. This is more inline with how vanilla widgets are handled, and allows us to make the position immutable (which has not been done at this time).TinkerStationButtonsWidget,SideButtonsWidgetwas made generic for the button type.TinkerStationButtonsWidget.selectedwas replaced by instead checkingTinkerStationScreen.currentLayout. Doing so removed any need to copy over data when the widget was recreated during a window resize.