Class UniversityModuleWindow

java.lang.Object
com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.Pane
com.ldtteam.blockui.views.View
All Implemented Interfaces:
com.ldtteam.blockui.controls.ButtonHandler, IModuleContainer<IWindowModule>, Consumer<com.ldtteam.blockui.controls.Button>

public class UniversityModuleWindow extends AbstractModuleWindow<UniversityResearchModuleView>
BOWindow for the university.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.ldtteam.blockui.views.BOWindow

    com.ldtteam.blockui.views.BOWindow.WindowRenderType
  • Field Summary

    Fields inherited from class com.minecolonies.core.client.gui.AbstractModuleWindow

    moduleView

    Fields inherited from class com.minecolonies.core.client.gui.AbstractBuildingWindow

    buildingView

    Fields inherited from class com.minecolonies.core.client.gui.AbstractWindowSkeleton

    buttonNextPage, buttonPrevPage, pageNum, switchView

    Fields inherited from class com.ldtteam.blockui.views.BOWindow

    DEFAULT_HEIGHT, DEFAULT_WIDTH, lightbox, screen, windowPausesGame, windowRenderType, xmlResourceLocation

    Fields inherited from class com.ldtteam.blockui.views.View

    children, padding

    Fields inherited from class com.ldtteam.blockui.Pane

    alignment, cursor, debugging, enabled, focus, height, hoverSource, id, lastClickedPane, mc, onHover, onHoverId, visible, wasCursorInPane, width, window, x, y

    Fields inherited from class com.ldtteam.blockui.UiRenderMacros

    HALF_BIAS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the window of the lumberjack.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<net.minecraft.network.chat.MutableComponent>
    getHidingRequirementDesc(net.minecraft.resources.ResourceLocation branch)
    Gets a list describing what requirements must be met to make at least one primary research for a branch visible.
    void
    onButtonClicked(@NotNull com.ldtteam.blockui.controls.Button button)
    Handle a button clicked event.
    void
    updateResearchCount(int offset)
    Display the count of InProgress research, and the max number for this university, and change the color text to red if at max.

    Methods inherited from class com.minecolonies.core.client.gui.AbstractModuleWindow

    setHeader

    Methods inherited from class com.minecolonies.core.client.gui.AbstractBuildingWindow

    setPage, shouldRenderDefaultSidebar

    Methods inherited from class com.ldtteam.blockui.views.BOWindow

    doesWindowPauseGame, drawSelf, getRenderType, getScreen, getXmlResourceLocation, hasLightbox, loadParams, onKeyTyped, onMouseReleased, onUnhandledKeyTyped, open, openAsLayer

    Methods inherited from class com.ldtteam.blockui.views.View

    accumulatePosition, addChild, addChild, adjustChild, childIsVisible, click, drawHidden, drawSelfLast, findPaneByID, findPaneByType, findPaneForClick, getAccumulatedPosition, getChildren, getInteriorHeight, getInteriorWidth, mouseClickableEventHandler, mouseEventProcessor, mousePointableEventHandler, onMouseDrag, parseChildren, postAddChild, removeChild, rightClick, scrollInput, setSize, setWindow

    Methods inherited from class com.ldtteam.blockui.Pane

    canHandleClick, clearFocus, disable, draw, drawLast, enable, findFirstPaneByType, findPaneOfTypeByID, getAlignment, getCursor, getFocus, getHeight, getHoverPane, getID, getParent, getWidth, getWindow, getX, getY, handleClick, handleHover, handleRightClick, hide, isClickable, isEnabled, isFocus, isPointInPane, isVisible, moveBy, off, on, onFocus, onFocusLost, putInside, scissorsEnd, scissorsStart, setAlignment, setCursor, setEnabled, setFocus, setFocus, setHoverPane, setID, setParentView, setPosition, setVisible, shouldDraw, show, wasCursorInPane

    Methods inherited from class com.ldtteam.blockui.UiRenderMacros

    blit, blit, blit, blit, blitRepeatable, drawEntity, drawLineRect, drawLineRect, drawLineRect, drawLineRectGradient, drawLineRectGradient, drawLineRectGradient, fill, fill, fillGradient, fillGradient, hLine, hLine, line, line, populateBlitTriangles, populateFillGradientTriangles, populateFillTriangles, vLine, vLine

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.ldtteam.blockui.controls.ButtonHandler

    accept

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Constructor Details

    • UniversityModuleWindow

      public UniversityModuleWindow(UniversityResearchModuleView moduleView)
      Constructor for the window of the lumberjack.
  • Method Details

    • getHidingRequirementDesc

      public List<net.minecraft.network.chat.MutableComponent> getHidingRequirementDesc(net.minecraft.resources.ResourceLocation branch)
      Gets a list describing what requirements must be met to make at least one primary research for a branch visible.
      Parameters:
      branch - The identifier for a branch.
      Returns:
      An empty list if at least one primary research is visible, or a list of MutableComponents describing the dependencies for each hidden primary research.
    • onButtonClicked

      public void onButtonClicked(@NotNull @NotNull com.ldtteam.blockui.controls.Button button)
      Description copied from class: AbstractWindowSkeleton
      Handle a button clicked event. Find the registered event and execute that.

      todo: make final once migration is complete

      Specified by:
      onButtonClicked in interface com.ldtteam.blockui.controls.ButtonHandler
      Overrides:
      onButtonClicked in class AbstractWindowSkeleton
      Parameters:
      button - the button that was clicked.
    • updateResearchCount

      public void updateResearchCount(int offset)
      Display the count of InProgress research, and the max number for this university, and change the color text to red if at max.
      Parameters:
      offset - An amount to offset the count of inProgress research, normally zero, or -1 when cancelling a research