Class AbstractQuestGridScreen

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
fr.pacdu.pacpackquests.client.screen.AbstractQuestGridScreen
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement
Direct Known Subclasses:
ParentSelectionScreen, QuestScreen

public abstract class AbstractQuestGridScreen extends net.minecraft.client.gui.screens.Screen
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     

    Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen

    net.minecraft.client.gui.screens.Screen.NarratableSearchResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
     
    protected final int
     
    protected final int
     
    protected String
     
    protected final int
     
    protected static final int
     
    protected double
     
    protected double
     
    protected int
     
    protected int
     
    protected final int
     
    protected int
     
    protected int
     
    protected int
     
    protected float
     

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, screenExecutor, title, width

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractQuestGridScreen(net.minecraft.network.chat.Component title)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    centerOn(int canvasX, int canvasY)
    Centers the camera on specific canvas coordinates (canvasX, canvasY).
    protected void
     
    protected void
    drawBackgroundFrame(net.minecraft.client.gui.GuiGraphics context, net.minecraft.network.chat.Component titleText)
     
    protected void
    drawConnectionLine(net.minecraft.client.gui.GuiGraphics context, AbstractQuestGridScreen.GridNode parent, AbstractQuestGridScreen.GridNode child, int lineColor, int arrowColor, boolean isDragging)
     
    protected boolean
     
    protected fr.pacdu.pacpackquests.client.screen.AbstractQuestGridScreen.Bounds
    Computes the bounding box of current nodes, including padding.
    protected abstract List<? extends AbstractQuestGridScreen.GridNode>
     
    protected void
     
    protected boolean
    isHovering(int x, int y, int width, int height, double localMouseX, double localMouseY)
     
    protected boolean
    isHoveringNode(int nodeX, int nodeY, double localMouseX, double localMouseY)
     
    boolean
    mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
     
    boolean
    mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount)
     
    protected void
    renderNodeBase(net.minecraft.client.gui.GuiGraphics context, AbstractQuestGridScreen.GridNode node, int bgColor)
     
    void
    Resets zoom to 1.0f and adaptively positions the camera: - Horizontal: Centers if content fits; otherwise aligns leftmost quest to the left border with padding.

    Methods inherited from class net.minecraft.client.gui.screens.Screen

    added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, render, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenError

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseReleased, nextFocusPath, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

    • windowWidth

      protected int windowWidth
    • windowHeight

      protected int windowHeight
    • startX

      protected int startX
    • startY

      protected int startY
    • PADDING

      protected static final int PADDING
      See Also:
    • panX

      protected double panX
    • panY

      protected double panY
    • zoom

      protected float zoom
    • gridSpacing

      protected final int gridSpacing
      See Also:
    • canvasOffsetX

      protected final int canvasOffsetX
      See Also:
    • canvasOffsetY

      protected final int canvasOffsetY
      See Also:
    • tabWidth

      protected int tabWidth
    • tabHeight

      protected final int tabHeight
      See Also:
    • categoryNameMaxChars

      protected final int categoryNameMaxChars
      See Also:
    • draggedQuestId

      protected String draggedQuestId
  • Constructor Details

    • AbstractQuestGridScreen

      protected AbstractQuestGridScreen(net.minecraft.network.chat.Component title)
  • Method Details

    • getNodes

      protected abstract List<? extends AbstractQuestGridScreen.GridNode> getNodes()
    • init

      protected void init()
      Overrides:
      init in class net.minecraft.client.gui.screens.Screen
    • mouseDragged

      public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
    • forceFullGridBounds

      protected boolean forceFullGridBounds()
    • mouseScrolled

      public boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount)
    • clampPanning

      protected void clampPanning()
    • centerOn

      public void centerOn(int canvasX, int canvasY)
      Centers the camera on specific canvas coordinates (canvasX, canvasY).
    • resetCamera

      public void resetCamera()
      Resets zoom to 1.0f and adaptively positions the camera: - Horizontal: Centers if content fits; otherwise aligns leftmost quest to the left border with padding. - Vertical: Centers on the leftmost quest(s) (or the whole tree if it fits), clamped within bounds so the starting quest never disappears.
    • getNodeBounds

      protected fr.pacdu.pacpackquests.client.screen.AbstractQuestGridScreen.Bounds getNodeBounds()
      Computes the bounding box of current nodes, including padding. Returns null if no nodes exist.
    • drawBackgroundFrame

      protected void drawBackgroundFrame(net.minecraft.client.gui.GuiGraphics context, net.minecraft.network.chat.Component titleText)
    • renderNodeBase

      protected void renderNodeBase(net.minecraft.client.gui.GuiGraphics context, AbstractQuestGridScreen.GridNode node, int bgColor)
    • drawConnectionLine

      protected void drawConnectionLine(net.minecraft.client.gui.GuiGraphics context, AbstractQuestGridScreen.GridNode parent, AbstractQuestGridScreen.GridNode child, int lineColor, int arrowColor, boolean isDragging)
    • isHovering

      protected boolean isHovering(int x, int y, int width, int height, double localMouseX, double localMouseY)
    • isHoveringNode

      protected boolean isHoveringNode(int nodeX, int nodeY, double localMouseX, double localMouseY)