@Environment(value=CLIENT) public class AdvancementsScreen extends Screen implements ClientAdvancementManager.Listener
Modifier and Type | Field and Description |
---|---|
private ClientAdvancementManager |
advancementHandler |
private static Text |
field_26553 |
private static Text |
field_26554 |
private static Text |
field_26555 |
private boolean |
movingTab |
private AdvancementTab |
selectedTab |
private Map<Advancement,AdvancementTab> |
tabs |
private static Identifier |
TABS_TEXTURE |
private static Identifier |
WINDOW_TEXTURE |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
AdvancementsScreen(ClientAdvancementManager advancementHandler) |
Modifier and Type | Method and Description |
---|---|
private void |
drawAdvancementTree(MatrixStack matrixStack,
int mouseY,
int int2,
int int3,
int int4) |
void |
drawWidgets(MatrixStack matrixStack,
int int2,
int int3) |
private void |
drawWidgetTooltip(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5) |
AdvancementWidget |
getAdvancementWidget(Advancement advancement) |
private AdvancementTab |
getTab(Advancement advancement) |
protected void |
init()
Called when a screen should be initialized.
|
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
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.
|
void |
onClear() |
void |
onDependentAdded(Advancement dependent) |
void |
onDependentRemoved(Advancement dependent) |
void |
onRootAdded(Advancement root) |
void |
onRootRemoved(Advancement root) |
void |
removed() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
void |
selectTab(Advancement advancement) |
void |
setProgress(Advancement advancement,
AdvancementProgress progress) |
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseReleased, mouseScrolled, setInitialFocus
mouseMoved
private static final Identifier WINDOW_TEXTURE
private static final Identifier TABS_TEXTURE
private static final Text field_26553
private static final Text field_26554
private static final Text field_26555
private final ClientAdvancementManager advancementHandler
private final Map<Advancement,AdvancementTab> tabs
private AdvancementTab selectedTab
private boolean movingTab
public AdvancementsScreen(ClientAdvancementManager advancementHandler)
protected void init()
This method is called when this screen is opened
or resized.
public boolean mouseClicked(double mouseX, double mouseY, int button)
GLFW
class.mouseClicked
in interface Element
mouseClicked
in interface ParentElement
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
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
GLFW
class.keyPressed
in interface Element
keyPressed
in interface ParentElement
keyPressed
in class Screen
keyCode
- the named key code of the event as described in the GLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true
to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int)
,
GLFW.GLFW_KEY_Q
,
GLFWKeyCallbackI.invoke(long, int, int, int, int)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
GLFW
class.mouseDragged
in interface Element
mouseDragged
in interface ParentElement
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_1
private void drawAdvancementTree(MatrixStack matrixStack, int mouseY, int int2, int int3, int int4)
public void drawWidgets(MatrixStack matrixStack, int int2, int int3)
private void drawWidgetTooltip(MatrixStack matrixStack, int int2, int int3, int int4, int int5)
public void onRootAdded(Advancement root)
onRootAdded
in interface AdvancementManager.Listener
public void onRootRemoved(Advancement root)
onRootRemoved
in interface AdvancementManager.Listener
public void onDependentAdded(Advancement dependent)
onDependentAdded
in interface AdvancementManager.Listener
public void onDependentRemoved(Advancement dependent)
onDependentRemoved
in interface AdvancementManager.Listener
public void setProgress(Advancement advancement, AdvancementProgress progress)
setProgress
in interface ClientAdvancementManager.Listener
public void selectTab(@Nullable Advancement advancement)
selectTab
in interface ClientAdvancementManager.Listener
public void onClear()
onClear
in interface AdvancementManager.Listener
@Nullable public AdvancementWidget getAdvancementWidget(Advancement advancement)
@Nullable private AdvancementTab getTab(Advancement advancement)