public class UI extends java.lang.Object implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener
| Modifier and Type | Field and Description |
|---|---|
boolean |
bestUpdateConvergence
Deprecated.
|
int |
flag
Internal flag
|
static float |
SCALE
UI theme scaling factor, must be set prior theme loading and ui updating
|
| Constructor and Description |
|---|
UI(Theme theme,
AssetManager assets) |
public static float SCALE
@Deprecated public boolean bestUpdateConvergence
public int flag
public UI(Theme theme, AssetManager assets)
public static final int scale(int i)
@Deprecated public static final UI current()
public static AssetManager createAssets()
public final SpriteRenderer getSpriteRenderer()
SpriteRenderer of this UI. It is used by Widget for rendering.public final void setUiListener(UiListener uiListener)
public final UiListener getUiListener()
public final void registerListeners(IComponent component)
component - component to register the events to, usually from ISceneTargetpublic final void setContents(Widget contents)
contents - widget containing the contents of this UIpublic final void setPopup(Widget popup)
popup - used by widgets to show a popuppublic final Widget getPopup()
public final void setTooltip(Widget tooltip)
tooltip - used by widgets to show a tooltippublic final Widget getTooltip()
public final void addDialog(Widget dialog)
dialog - add a blocking dialog, will be automatically removed when not visiblepublic final int getNumDialogs()
public final void setFocus(Widget widget)
public final Widget getFocus()
public final boolean hasFocus(Widget widget)
public final boolean isUnderPopupOrDialog(Widget widget)
public final void update(ISceneTarget sceneTarget, Viewport viewport, long timePassedMS)
glApi - viewport - timePassedMS - time passed for time based animationpublic final Viewport getCurrentViewport()
Viewport passed to UI#update(IGLApi, Viewport, long),
returns null if not called from inside UI#update(IGLApi, Viewport, long)public final BatchProfile render(IGLApi glApi, Viewport viewport)
UI renderingglApi - viewport - public final AssetManager getAssets()
public final boolean keyPressed(KeyEvent e)
keyPressed in interface KeyListenere - the KeyEventpublic final boolean keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - the KeyEventpublic final boolean keyTyped(KeyEvent e)
KeyListenerkeyTyped in interface KeyListenere - the KeyEventpublic final void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - the MouseEventpublic final void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - the MouseEventpublic final boolean mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEventpublic final boolean mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the MouseEventpublic final boolean mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - the MouseEventpublic final boolean mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - the MouseEventpublic final boolean mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - the MouseEventpublic final boolean mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenere - the MouseWheelEventpublic final void performAction(Widget widget, InputEvent event)
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com