Class ExtensionsKt
-
- All Implemented Interfaces:
public final class ExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <S extends Inputtable> SaddHoverInfo(S $self, Drawable drawables, Vec2 size, Align align, Point position)Add some text that is shown when the mouse is left still over this drawable for 1 second or more. final static <S extends TextInput> Snumeric(S $self, Float min, Float max, Boolean integral, Inputtable acceptor)Make this TextInput only accept numbers between min and max. final static <S extends Component> SnamedId(S $self, String name)final static <S extends Component> Snamed(S $self, String name)final static <S extends Scrollable> SdontScroll(S $self)Instruct this component to refuse scrolling even if it is deemed necessary. final static <S extends Inputtable> Sdisable(S $self, Boolean state)final static <S extends Drawable> Sdisable(S $self, Boolean state)final static <S extends Component> Shide(S $self, Boolean state)final static <S extends Component> SignoreLayout(S $self, Boolean state)Specify that this component should be ignored during the layout stage. final static <S extends Drawable> SsetAlpha(S $self, Float alpha)final static <S extends Component> Spadded(S $self, Float xPad, Float yPad)final static <S extends Component> Spadded(S $self, Float left, Float top, Float right, Float bottom)final static <S extends Component> Spadded(S $self, Vec4 padding)final static <S extends Component> Sfix(S $self)final static <S extends Component> UnitensureLargerThan(S $self, Vec2 vec)final static <S extends Scrollable> SminimumSize(S $self, Vec2 size)Specify a minimum size for this component. -
-
Method Detail
-
addHoverInfo
final static <S extends Inputtable> S addHoverInfo(S $self, Drawable drawables, Vec2 size, Align align, Point position)
Add some text that is shown when the mouse is left still over this drawable for 1 second or more.
- Since:
1.0.3
-
numeric
final static <S extends TextInput> S numeric(S $self, Float min, Float max, Boolean integral, Inputtable acceptor)
Make this TextInput only accept numbers between min and max. It will then dispatch a Event.Change.Number event.
If integral is true, it will only accept integers.
- Since:
1.5.0
-
dontScroll
final static <S extends Scrollable> S dontScroll(S $self)
Instruct this component to refuse scrolling even if it is deemed necessary.
-
disable
final static <S extends Inputtable> S disable(S $self, Boolean state)
-
ignoreLayout
final static <S extends Component> S ignoreLayout(S $self, Boolean state)
Specify that this component should be ignored during the layout stage.
This means that it will not be placed automatically by the positioner.
Additionally, this will ignore if there is no size set on this component and no way to infer it.** This means that, if you use this incorrectly it will not be visible and may break things if your renderer doesn't like zero sizes.
- Since:
1.4.4
-
padded
final static <S extends Component> S padded(S $self, Float left, Float top, Float right, Float bottom)
-
ensureLargerThan
final static <S extends Component> Unit ensureLargerThan(S $self, Vec2 vec)
-
minimumSize
final static <S extends Scrollable> S minimumSize(S $self, Vec2 size)
Specify a minimum size for this component. Note that this will also disable scrolling due to optimizations.
- Since:
1.4.4
-
-
-
-