Class ElementOutlines
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.gui.components.ElementOutlines
Outlines drawn around specific widgets, any
AbstractWidget (vanilla's buttons, edit boxes, sliders or your
own), without subclassing them. The outline is drawn right after the widget, only while it's visible.
ElementOutlines.set(button, Outline.rainbow().withThickness(2));
ElementOutlines.set(editBox, Outline.solid(0xFFFFAA00).withPadding(1), AbstractWidget::isFocused);
Widgets are held weakly, so a widget that's thrown away (its screen closed) drops its outline too. Call from the
render thread.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()static @Nullable Outlineget(net.minecraft.client.gui.components.AbstractWidget widget) static booleanhas(net.minecraft.client.gui.components.AbstractWidget widget) static voidremove(net.minecraft.client.gui.components.AbstractWidget widget) static voidOutlines the widget whenever it's drawn, replacing any outline it had.static voidset(net.minecraft.client.gui.components.AbstractWidget widget, Outline outline, @Nullable Predicate<? super net.minecraft.client.gui.components.AbstractWidget> when) Outlines the widget whenever it's drawn andwhenholds, e.g.
-
Method Details
-
set
Outlines the widget whenever it's drawn, replacing any outline it had. -
set
-
remove
public static void remove(net.minecraft.client.gui.components.AbstractWidget widget) -
get
@Nullable public static @Nullable Outline get(net.minecraft.client.gui.components.AbstractWidget widget) -
has
public static boolean has(net.minecraft.client.gui.components.AbstractWidget widget) -
clear
public static void clear()
-