mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-15 00:14:28 -04:00
Adapt the existing creative inventory page button texture to new position (#2742)
This commit is contained in:
parent
e9dee004f1
commit
bdbead01ad
3 changed files with 4 additions and 4 deletions
fabric-item-group-api-v1/src
client/java/net/fabricmc/fabric
impl/client/itemgroup
mixin/itemgroup/client
main/resources/assets/fabric/textures/gui
|
@ -41,7 +41,7 @@ public class FabricCreativeGuiComponents {
|
|||
final Type type;
|
||||
|
||||
public ItemGroupButtonWidget(int x, int y, Type type, CreativeGuiExtensions extensions) {
|
||||
super(x, y, 11, 10, type.text, (bw) -> type.clickConsumer.accept(extensions), ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
super(x, y, 11, 12, type.text, (bw) -> type.clickConsumer.accept(extensions), ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
this.extensions = extensions;
|
||||
this.type = type;
|
||||
this.gui = (CreativeInventoryScreen) extensions;
|
||||
|
@ -55,11 +55,11 @@ public class FabricCreativeGuiComponents {
|
|||
|
||||
if (this.visible) {
|
||||
int u = active && this.isHovered() ? 22 : 0;
|
||||
int v = active ? 0 : 10;
|
||||
int v = active ? 0 : 12;
|
||||
|
||||
RenderSystem.setShaderTexture(0, BUTTON_TEX);
|
||||
RenderSystem.setShaderColor(1F, 1F, 1F, 1F);
|
||||
this.drawTexture(matrixStack, this.getX(), this.getY(), u + (type == Type.NEXT ? 11 : 0), v, 11, 10);
|
||||
this.drawTexture(matrixStack, this.getX(), this.getY(), u + (type == Type.NEXT ? 11 : 0), v, 11, 12);
|
||||
|
||||
if (this.hovered) {
|
||||
int pageCount = (int) Math.ceil((ItemGroups.getGroupsToDisplay().size() - COMMON_GROUPS.size()) / 9D);
|
||||
|
|
|
@ -99,7 +99,7 @@ public abstract class CreativeInventoryScreenMixin<T extends ScreenHandler> exte
|
|||
fabric_updateSelection();
|
||||
|
||||
int xpos = x + 170;
|
||||
int ypos = y + 5;
|
||||
int ypos = y + 4;
|
||||
|
||||
addDrawableChild(new FabricCreativeGuiComponents.ItemGroupButtonWidget(xpos + 11, ypos, FabricCreativeGuiComponents.Type.NEXT, this));
|
||||
addDrawableChild(new FabricCreativeGuiComponents.ItemGroupButtonWidget(xpos, ypos, FabricCreativeGuiComponents.Type.PREVIOUS, this));
|
||||
|
|
Binary file not shown.
Before ![]() (image error) Size: 552 B After ![]() (image error) Size: 5.4 KiB ![]() ![]() |
Loading…
Add table
Reference in a new issue