@Environment(value=CLIENT) public class AdvancementsScreen extends Screen implements ClientAdvancementManager.Listener
Modifier and Type | Field and Description |
---|---|
private ClientAdvancementManager |
advancementHandler |
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
BACKGROUND_TEXTURE, GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
AdvancementsScreen(ClientAdvancementManager advancementHandler) |
Modifier and Type | Method and Description |
---|---|
private void |
drawAdvancementTree(int mouseX,
int mouseY,
int x,
int y) |
void |
drawWidgets(int x,
int y) |
private void |
drawWidgetTooltip(int mouseX,
int mouseY,
int x,
int y) |
AdvancementWidget |
getAdvancementWidget(Advancement advancement) |
private AdvancementTab |
getTab(Advancement advancement) |
protected void |
init() |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY) |
void |
onClear() |
void |
onDependentAdded(Advancement dependent) |
void |
onDependentRemoved(Advancement dependent) |
void |
onRootAdded(Advancement root) |
void |
onRootRemoved(Advancement root) |
void |
removed() |
void |
render(int mouseX,
int mouseY,
float delta) |
void |
selectTab(Advancement advancement) |
void |
setProgress(Advancement advancement,
AdvancementProgress progress) |
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderDirtBackground, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, 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, mouseReleased, mouseScrolled, setInitialFocus
mouseMoved
private static final Identifier WINDOW_TEXTURE
private static final Identifier TABS_TEXTURE
private final ClientAdvancementManager advancementHandler
private final Map<Advancement,AdvancementTab> tabs
private AdvancementTab selectedTab
private boolean movingTab
public AdvancementsScreen(ClientAdvancementManager advancementHandler)
public boolean mouseClicked(double mouseX, double mouseY, int button)
mouseClicked
in interface Element
mouseClicked
in interface ParentElement
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
keyPressed
in interface Element
keyPressed
in interface ParentElement
keyPressed
in class Screen
public void render(int mouseX, int mouseY, float delta)
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
mouseDragged
in interface Element
mouseDragged
in interface ParentElement
private void drawAdvancementTree(int mouseX, int mouseY, int x, int y)
public void drawWidgets(int x, int y)
private void drawWidgetTooltip(int mouseX, int mouseY, int x, int y)
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)