@Environment(value=CLIENT) public class MerchantScreen extends HandledScreen<MerchantScreenHandler>
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
MerchantScreen.WidgetButtonPage |
| Modifier and Type | Field and Description |
|---|---|
private static Text |
field_26569 |
private static Text |
field_26570 |
private static Text |
field_26571 |
private int |
indexStartOffset |
private MerchantScreen.WidgetButtonPage[] |
offers |
private boolean |
scrolling |
private int |
selectedIndex |
private static Identifier |
TEXTURE |
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragging, cursorDragSlots, focusedSlot, handler, playerInventory, playerInventoryTitleX, playerInventoryTitleY, titleX, titleY, x, ybuttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthGUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
MerchantScreen(MerchantScreenHandler handler,
PlayerInventory inventory,
Text title) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
canScroll(int listSize) |
protected void |
drawBackground(MatrixStack matrices,
float delta,
int mouseX,
int mouseY) |
protected void |
drawForeground(MatrixStack matrices,
int mouseX,
int mouseY) |
private void |
drawLevelInfo(MatrixStack matrixStack,
int int2,
int int3,
TradeOffer tradeOffer) |
protected void |
init() |
private void |
method_20221(MatrixStack matrixStack,
int int2,
int int3,
TradeOfferList tradeOfferList) |
private void |
method_20222(MatrixStack matrixStack,
ItemStack itemStack,
ItemStack itemStack2,
int int2,
int int3) |
private void |
method_20223(MatrixStack matrixStack,
TradeOffer tradeOffer,
int int2,
int int3) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
Callback for when a mouse button drag event
has been captured.
|
boolean |
mouseScrolled(double mouseX,
double mouseY,
double amount)
Callback for when a mouse button scroll event
has been captured.
|
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
private void |
syncRecipeIndex() |
drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isClickOutsideBounds, isPauseScreen, isPointWithinBounds, keyPressed, mouseReleased, onClose, onMouseClick, removed, tickaddButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, charTyped, focusOn, hoveredElement, keyReleased, setInitialFocusmouseMovedprivate static final Identifier TEXTURE
private static final Text field_26569
private static final Text field_26570
private static final Text field_26571
private int selectedIndex
private final MerchantScreen.WidgetButtonPage[] offers
private int indexStartOffset
private boolean scrolling
public MerchantScreen(MerchantScreenHandler handler, PlayerInventory inventory, Text title)
private void syncRecipeIndex()
protected void init()
init in class HandledScreen<MerchantScreenHandler>protected void drawForeground(MatrixStack matrices, int mouseX, int mouseY)
drawForeground in class HandledScreen<MerchantScreenHandler>protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)
drawBackground in class HandledScreen<MerchantScreenHandler>private void drawLevelInfo(MatrixStack matrixStack, int int2, int int3, TradeOffer tradeOffer)
private void method_20221(MatrixStack matrixStack, int int2, int int3, TradeOfferList tradeOfferList)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
render in interface Drawablerender in class HandledScreen<MerchantScreenHandler>private void method_20223(MatrixStack matrixStack, TradeOffer tradeOffer, int int2, int int3)
private void method_20222(MatrixStack matrixStack, ItemStack itemStack, ItemStack itemStack2, int int2, int int3)
private boolean canScroll(int listSize)
public boolean mouseScrolled(double mouseX,
double mouseY,
double amount)
mouseX - the X coordinate of the mousemouseY - the Y coordinate of the mouseamount - value is > 1 if scrolled down, < 1 if scrolled uptrue to indicate that the event handling is successful/validMouse.onMouseScroll(long, double, double)public boolean mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
GLFW class.mouseDragged in interface ElementmouseDragged in interface ParentElementmouseDragged in class HandledScreen<MerchantScreenHandler>mouseX - the current X coordinate of the mousemouseY - the current Y coordinate of the mousebutton - the mouse button numberdeltaX - the difference of the current X with the previous X coordinatedeltaY - the difference of the current Y with the previous Y coordinatetrue to indicate that the event handling is successful/validMouse.onCursorPos(long, double, double),
GLFW.GLFW_MOUSE_BUTTON_1public boolean mouseClicked(double mouseX,
double mouseY,
int button)
GLFW class.mouseClicked in interface ElementmouseClicked in interface ParentElementmouseClicked in class HandledScreen<MerchantScreenHandler>mouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousebutton - the mouse button numbertrue to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int),
GLFW.GLFW_MOUSE_BUTTON_1