@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 int |
indexStartOffset |
private MerchantScreen.WidgetButtonPage[] |
offers |
private boolean |
scrolling |
private int |
selectedIndex |
private static Identifier |
TEXTURE |
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragSlots, focusedSlot, handler, isCursorDragging, playerInventory, x, y
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_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(float delta,
int mouseX,
int mouseY) |
protected void |
drawForeground(int mouseX,
int mouseY) |
private void |
drawLevelInfo(int int2,
int int3,
TradeOffer tradeOffer) |
protected void |
init() |
private void |
method_20221(int int2,
int int3,
TraderOfferList traderOfferList) |
private void |
method_20222(ItemStack itemStack,
ItemStack itemStack2,
int int2,
int int3) |
private void |
method_20223(TradeOffer tradeOffer,
int int2,
int int3) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY) |
boolean |
mouseScrolled(double mouseX,
double mouseY,
double amount) |
void |
render(int mouseX,
int mouseY,
float delta) |
private void |
syncRecipeIndex() |
drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isClickOutsideBounds, isPauseScreen, isPointWithinBounds, keyPressed, mouseReleased, onMouseClick, removed, shouldCloseOnEsc, tick
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderDirtBackground, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawHorizontalLine, drawSprite, drawString, drawTexture, drawTexture, drawTexture, drawTexture, drawTexturedQuad, drawVerticalLine, fill, fill, fillGradient, getZOffset, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, setInitialFocus
mouseMoved
private static final Identifier TEXTURE
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(int mouseX, int mouseY)
drawForeground
in class HandledScreen<MerchantScreenHandler>
protected void drawBackground(float delta, int mouseX, int mouseY)
drawBackground
in class HandledScreen<MerchantScreenHandler>
private void drawLevelInfo(int int2, int int3, TradeOffer tradeOffer)
private void method_20221(int int2, int int3, TraderOfferList traderOfferList)
public void render(int mouseX, int mouseY, float delta)
render
in interface Drawable
render
in class HandledScreen<MerchantScreenHandler>
private void method_20223(TradeOffer tradeOffer, int int2, int int3)
private void method_20222(ItemStack itemStack, ItemStack itemStack2, int int2, int int3)
private boolean canScroll(int listSize)
public boolean mouseScrolled(double mouseX, double mouseY, double amount)
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
mouseDragged
in interface Element
mouseDragged
in interface ParentElement
mouseDragged
in class HandledScreen<MerchantScreenHandler>
public boolean mouseClicked(double mouseX, double mouseY, int button)
mouseClicked
in interface Element
mouseClicked
in interface ParentElement
mouseClicked
in class HandledScreen<MerchantScreenHandler>