Class SelectBox
- java.lang.Object
-
- nl.colorize.multimedialib.scene.ui.Widget
-
- nl.colorize.multimedialib.scene.ui.SelectBox
-
- All Implemented Interfaces:
Renderable,Updatable,Scene
public class SelectBox extends Widget
Simple select box widget with graphics and interaction entirely managed by the renderer, not using the native widget.
-
-
Constructor Summary
Constructors Constructor Description SelectBox(WidgetStyle style, java.util.List<java.lang.String> items)SelectBox(WidgetStyle style, java.util.List<java.lang.String> items, java.lang.String selected)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetSelected()voidrender(GraphicsContext graphics)voidsetClickHandler(InputDevice input, java.util.function.Consumer<java.lang.String> onChange)voidupdate(float deltaTime)Updates this object for the current frame.-
Methods inherited from class nl.colorize.multimedialib.scene.ui.Widget
getLocation, getStyle, getX, getY, setLocation, start
-
-
-
-
Constructor Detail
-
SelectBox
public SelectBox(WidgetStyle style, java.util.List<java.lang.String> items, java.lang.String selected)
-
SelectBox
public SelectBox(WidgetStyle style, java.util.List<java.lang.String> items)
-
-
Method Detail
-
setClickHandler
public void setClickHandler(InputDevice input, java.util.function.Consumer<java.lang.String> onChange)
-
update
public void update(float deltaTime)
Description copied from interface:UpdatableUpdates this object for the current frame.- Parameters:
deltaTime- Elapsed time since the last frame, in seconds.
-
render
public void render(GraphicsContext graphics)
-
getSelected
public java.lang.String getSelected()
-
-