-
Notifications
You must be signed in to change notification settings - Fork 798
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
Side buttons rework #4990
Merged
KnightMiner
merged 14 commits into
SlimeKnights:1.18.2
from
kirderf1:side_buttons_rework
Sep 18, 2022
Merged
Side buttons rework #4990
KnightMiner
merged 14 commits into
SlimeKnights:1.18.2
from
kirderf1:side_buttons_rework
Sep 18, 2022
Conversation
This file contains 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
KnightMiner
added
Bug
Issue describes unintended or broken behavior
1.18
Issue affects 1.18
labels
Sep 15, 2022
KnightMiner
reviewed
Sep 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor things until I have a chance to test this in game.
src/main/java/slimeknights/tconstruct/tables/client/inventory/module/SideButtonsWidget.java
Outdated
Show resolved
Hide resolved
.../java/slimeknights/tconstruct/tables/client/inventory/module/TinkerStationButtonsWidget.java
Outdated
Show resolved
Hide resolved
kirderf1
commented
Sep 15, 2022
.../java/slimeknights/tconstruct/tables/client/inventory/widget/TinkerStationButtonsWidget.java
Outdated
Show resolved
Hide resolved
KnightMiner
reviewed
Sep 15, 2022
src/main/java/slimeknights/tconstruct/tables/client/inventory/module/SideButtonsWidget.java
Outdated
Show resolved
Hide resolved
KnightMiner
reviewed
Sep 15, 2022
src/main/java/slimeknights/tconstruct/tables/client/inventory/module/SideButtonsWidget.java
Outdated
Show resolved
Hide resolved
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
SideButtonsScreen
to not useModuleScreen
, and does some minor additional cleanup.AbstractContainerScreen
orScreen
, it will no longer be treated as a screen by other mods. For example, the side buttons will no longer have anInitScreenEvent
posted for it. THIS FIXES Inventory Locks show up twice in Tinkers' Construct GUI kirderf1/InventoryFree#9.Widget
andGuiEventListener
but is not added to the parent screen as a screen widget. Instead, render and mouse input functions are called by the parent class directly.leftPos
andimageWidth
etc) 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
,SideButtonsWidget
was made generic for the button type.TinkerStationButtonsWidget.selected
was replaced by instead checkingTinkerStationScreen.currentLayout
. Doing so removed any need to copy over data when the widget was recreated during a window resize.