public abstract class WidgetGroup extends Widget implements Clickable, Hoverable, Scrollable, Tickable, Typeable
| Modifier and Type | Field and Description |
|---|---|
protected double |
scaleX |
protected double |
scaleY |
protected java.util.Collection<Widget> |
widgets |
| Modifier | Constructor and Description |
|---|---|
protected |
WidgetGroup() |
protected |
WidgetGroup(@Nullable Widget parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWidget(Widget widget) |
void |
addWidgets(java.util.Collection<Widget> widgets) |
void |
addWidgets(Widget... widgets) |
protected void |
applyScale(RenderContext ctx) |
boolean |
canBackspace() |
boolean |
canType(char c) |
protected boolean |
checkEachClickable(java.util.function.Function<Clickable,java.lang.Boolean> func) |
protected boolean |
checkEachHoverable(java.util.function.Function<Hoverable,java.lang.Boolean> func) |
protected boolean |
checkEachScrollable(java.util.function.Function<Scrollable,java.lang.Boolean> func) |
protected boolean |
checkEachSelectable(java.util.function.Function<Selectable,java.lang.Boolean> func) |
protected boolean |
checkEachTickable(java.util.function.Function<Tickable,java.lang.Boolean> func) |
protected boolean |
checkEachTypeable(java.util.function.Function<Typeable,java.lang.Boolean> func) |
protected boolean |
checkEachWidget(java.util.function.Function<Widget,java.lang.Boolean> func) |
abstract WidgetGroup |
copy() |
protected void |
copyGroup(WidgetGroup other) |
void |
draw(RenderContext ctx,
Vector3 center,
double mouseX,
double mouseY) |
protected boolean |
drawHoverable(RenderContext ctx,
Hoverable hoverable,
Vector3 center,
double mouseX,
double mouseY) |
void |
drawHovered(RenderContext ctx,
Vector3 center,
double mouseX,
double mouseY) |
protected boolean |
drawSelectable(RenderContext ctx,
Selectable selectable,
Vector3 center,
double mouseX,
double mouseY) |
void |
drawWidget(RenderContext ctx,
Widget widget,
Vector3 center,
double mouseX,
double mouseY) |
protected void |
eachClickable(java.util.function.Consumer<Clickable> func) |
protected void |
eachHoverable(java.util.function.Consumer<Hoverable> func) |
protected void |
eachScrollable(java.util.function.Consumer<Scrollable> func) |
protected void |
eachSelectable(java.util.function.Consumer<Selectable> func) |
protected void |
eachTickable(java.util.function.Consumer<Tickable> func) |
protected void |
eachTypeable(java.util.function.Consumer<Typeable> func) |
protected void |
eachWidget(java.util.function.Consumer<Widget> func) |
protected double |
getElementsBottom(double z) |
protected double |
getElementsHeight() |
protected double |
getElementsLeft(double z) |
protected double |
getElementsRight(double z) |
protected double |
getElementsTop(double z) |
protected double |
getElementsWidth() |
@Nullable Widget |
getHoveredElement(double mouseX,
double mouseY) |
java.util.Collection<TextAPI<?>> |
getHoverLines(double mouseX,
double mouseY) |
double |
getRelativeTop() |
@Nullable Widget |
getSelectedElement(double mouseX,
double mouseY) |
boolean |
hasNonBlankText() |
boolean |
hasNonEmptyText() |
boolean |
isActivelyTicking() |
boolean |
isHovering(double mouseX,
double mouseY) |
boolean |
onBackspace() |
boolean |
onCharTyped(char c) |
@Nullable java.lang.String |
onCopy() |
@Nullable java.lang.String |
onCut() |
boolean |
onKeyPressed(KeyStateCache cache,
int keycode) |
boolean |
onLeftClick(double x,
double y) |
boolean |
onPaste(@Nullable java.lang.String text) |
void |
onResolutionUpdated(MinecraftWindow window) |
boolean |
onRightClick(double x,
double y) |
boolean |
onSelectAll() |
void |
onTick() |
void |
playLeftClickSound() |
void |
playRightClickSound() |
boolean |
scrollDown(double scroll) |
boolean |
scrollUp(double scroll) |
void |
setWidgets(java.util.Collection<Widget> widgets) |
void |
setWidgets(Widget... widgets) |
boolean |
shouldDrawHovered() |
protected void |
unapplyScale(RenderContext ctx) |
canDraw, copyBasic, getBottom, getCenter, getCenter, getCenter, getLeft, getRight, getTop, getX, getY, isVisible, onScreenClosed, onScreenOpenedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanCopy, canCut, canPaste, canSelectAllprotected double scaleX
protected double scaleY
protected java.util.Collection<Widget> widgets
protected WidgetGroup()
protected WidgetGroup(@Nullable
@Nullable Widget parent)
public void addWidget(Widget widget)
public void addWidgets(Widget... widgets)
public void addWidgets(java.util.Collection<Widget> widgets)
protected void applyScale(RenderContext ctx)
public boolean canBackspace()
canBackspace in interface Typeableprotected boolean checkEachClickable(java.util.function.Function<Clickable,java.lang.Boolean> func)
protected boolean checkEachHoverable(java.util.function.Function<Hoverable,java.lang.Boolean> func)
protected boolean checkEachScrollable(java.util.function.Function<Scrollable,java.lang.Boolean> func)
protected boolean checkEachSelectable(java.util.function.Function<Selectable,java.lang.Boolean> func)
protected boolean checkEachTickable(java.util.function.Function<Tickable,java.lang.Boolean> func)
protected boolean checkEachTypeable(java.util.function.Function<Typeable,java.lang.Boolean> func)
protected boolean checkEachWidget(java.util.function.Function<Widget,java.lang.Boolean> func)
public abstract WidgetGroup copy()
protected void copyGroup(WidgetGroup other)
public void draw(RenderContext ctx, Vector3 center, double mouseX, double mouseY)
protected boolean drawHoverable(RenderContext ctx, Hoverable hoverable, Vector3 center, double mouseX, double mouseY)
protected boolean drawSelectable(RenderContext ctx, Selectable selectable, Vector3 center, double mouseX, double mouseY)
public void drawHovered(RenderContext ctx, Vector3 center, double mouseX, double mouseY)
drawHovered in interface Hoverablepublic void drawWidget(RenderContext ctx, Widget widget, Vector3 center, double mouseX, double mouseY)
protected void eachClickable(java.util.function.Consumer<Clickable> func)
protected void eachHoverable(java.util.function.Consumer<Hoverable> func)
protected void eachScrollable(java.util.function.Consumer<Scrollable> func)
protected void eachSelectable(java.util.function.Consumer<Selectable> func)
protected void eachTickable(java.util.function.Consumer<Tickable> func)
protected void eachTypeable(java.util.function.Consumer<Typeable> func)
protected void eachWidget(java.util.function.Consumer<Widget> func)
protected double getElementsBottom(double z)
protected double getElementsHeight()
protected double getElementsLeft(double z)
protected double getElementsWidth()
protected double getElementsTop(double z)
protected double getElementsRight(double z)
@Nullable public @Nullable Widget getHoveredElement(double mouseX, double mouseY)
public java.util.Collection<TextAPI<?>> getHoverLines(double mouseX, double mouseY)
getHoverLines in interface Hoverablepublic double getRelativeTop()
@Nullable public @Nullable Widget getSelectedElement(double mouseX, double mouseY)
public boolean hasNonBlankText()
public boolean hasNonEmptyText()
public boolean isActivelyTicking()
isActivelyTicking in interface Tickablepublic boolean isHovering(double mouseX,
double mouseY)
isHovering in interface Hoverablepublic boolean onBackspace()
onBackspace in interface Typeablepublic boolean onCharTyped(char c)
onCharTyped in interface Typeable@Nullable public @Nullable java.lang.String onCopy()
public boolean onKeyPressed(KeyStateCache cache, int keycode)
onKeyPressed in interface Typeablepublic boolean onLeftClick(double x,
double y)
onLeftClick in interface Clickablepublic boolean onPaste(@Nullable
@Nullable java.lang.String text)
public boolean onRightClick(double x,
double y)
onRightClick in interface Clickablepublic boolean onSelectAll()
onSelectAll in interface Typeablepublic void playLeftClickSound()
playLeftClickSound in interface Clickablepublic void playRightClickSound()
playRightClickSound in interface Clickablepublic void onResolutionUpdated(MinecraftWindow window)
onResolutionUpdated in class Widgetpublic boolean scrollDown(double scroll)
scrollDown in interface Scrollablepublic boolean scrollUp(double scroll)
scrollUp in interface Scrollablepublic void setWidgets(Widget... widgets)
public void setWidgets(java.util.Collection<Widget> widgets)
public boolean shouldDrawHovered()
shouldDrawHovered in interface Hoverableprotected void unapplyScale(RenderContext ctx)