Class AbstractWindowSkeleton
java.lang.Object
com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.Pane
com.ldtteam.blockui.views.View
com.ldtteam.blockui.views.BOWindow
com.ldtteam.structurize.client.gui.AbstractWindowSkeleton
- All Implemented Interfaces:
com.ldtteam.blockui.controls.ButtonHandler,Consumer<com.ldtteam.blockui.controls.Button>
- Direct Known Subclasses:
AbstractBlueprintManipulationWindow,WindowScan,WindowSelectRes,WindowSwitchPack,WindowTagTool,WindowUndoRedo
public abstract class AbstractWindowSkeleton
extends com.ldtteam.blockui.views.BOWindow
implements com.ldtteam.blockui.controls.ButtonHandler
Manage windows and their events.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ldtteam.blockui.views.BOWindow
com.ldtteam.blockui.views.BOWindow.WindowRenderTypeNested classes/interfaces inherited from class com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.UiRenderMacros.ResolvedBlit -
Field Summary
Fields inherited from class com.ldtteam.blockui.views.BOWindow
DEFAULT_HEIGHT, DEFAULT_WIDTH, lightbox, screen, windowPausesGame, windowRenderType, xmlResourceLocationFields inherited from class com.ldtteam.blockui.views.View
children, paddingFields inherited from class com.ldtteam.blockui.Pane
alignment, cursor, debugging, enabled, focus, height, hoverSource, id, lastClickedPane, mc, onHover, onHoverId, parent, visible, wasCursorInPane, width, window, x, yFields inherited from class com.ldtteam.blockui.UiRenderMacros
HALF_BIAS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractWindowSkeleton(String resource) Constructor for the skeleton class of the windows.AbstractWindowSkeleton(net.minecraft.resources.ResourceLocation resource) Constructor for the skeleton class of the windows. -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddoNothing(com.ldtteam.blockui.controls.Button ignored) Button clicked without an action.voidonButtonClicked(com.ldtteam.blockui.controls.Button button) Handle a button clicked event.final voidregisterButton(String id, Runnable action) Register a button on the window.final voidregisterButton(String id, Consumer<com.ldtteam.blockui.controls.Button> action) Register a button on the window.Methods inherited from class com.ldtteam.blockui.views.BOWindow
close, doesWindowPauseGame, drawSelf, getRenderType, getScreen, getXmlResourceLocation, hasLightbox, loadParams, onClosed, onKeyTyped, onMouseReleased, onOpened, onUnhandledKeyTyped, open, openAsLayerMethods 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, onUpdate, parseChildren, postAddChild, removeChild, rightClick, scrollInput, setSize, setWindowMethods 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, wasCursorInPaneMethods inherited from class com.ldtteam.blockui.UiRenderMacros
blit, blit, blit, blit, blitRepeatable, blitSprite, blitSprite, drawEntity, drawLineRect, drawLineRect, drawLineRect, drawLineRectGradient, drawLineRectGradient, drawLineRectGradient, fill, fill, fillGradient, fillGradient, hLine, hLine, line, line, populateBlitTriangles, populateFillGradientTriangles, populateFillTriangles, resolveSprite, vLine, vLineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ldtteam.blockui.controls.ButtonHandler
accept
-
Constructor Details
-
AbstractWindowSkeleton
Constructor for the skeleton class of the windows.- Parameters:
resource- Resource location string.
-
AbstractWindowSkeleton
public AbstractWindowSkeleton(net.minecraft.resources.ResourceLocation resource) Constructor for the skeleton class of the windows.- Parameters:
resource- Resource location
-
-
Method Details
-
registerButton
Register a button on the window.- Parameters:
id- Button ID.action- Consumer with the action to be performed.
-
registerButton
Register a button on the window.- Parameters:
id- Button ID.action- Consumer with the action to be performed.
-
onButtonClicked
public void onButtonClicked(com.ldtteam.blockui.controls.Button button) Handle a button clicked event. Find the registered event and execute that.todo: make final once migration is complete
- Specified by:
onButtonClickedin interfacecom.ldtteam.blockui.controls.ButtonHandler- Parameters:
button- the button that was clicked.
-
doNothing
public final void doNothing(com.ldtteam.blockui.controls.Button ignored) Button clicked without an action. Method does nothing.- Parameters:
ignored- Parameter is ignored. Since some actions require a button, we must accept a button parameter.
-