10 #ifndef SL_UIINTERFACE_H
11 #define SL_UIINTERFACE_H
29 virtual void init(
const string& configPath) {}
static SLint mouseX
Last mouse position x in pixels.
static SLint mouseY
Last mouse position y in pixels.
SLMouseButton
Mouse button codes.
SLKey
Keyboard key codes enumeration.
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
Interface for ui integration in SLSceneView.
virtual void onMouseDown(SLMouseButton button, SLint x, SLint y)
forward user input to ui
virtual void onPaint(const SLRecti &viewport)
ui render call (called by SLSceneView draw2DGL)
virtual void onMouseMove(SLint xPos, SLint yPos)
forward user input to ui
virtual void init(const string &configPath)
initialization (called by SLSceneView init)
virtual void onKeyPress(SLKey key, SLKey mod)
forward user input to ui
virtual void renderExtraFrame(SLScene *s, SLSceneView *sv, SLint mouseX, SLint mouseY)
virtual bool doNotDispatchKeyboard()
inform if user keyboard input was consumed by the ui
virtual void onResize(const SLRecti &viewportRect)
inform the ui about scene view size change
virtual void onMouseWheel(SLfloat yoffset)
forward user input to ui
virtual void onClose()
shutdown ui
virtual void onKeyRelease(SLKey key, SLKey mod)
forward user input to ui
virtual bool doNotDispatchMouse()
inform if user mouse input was consumed by the ui
virtual void onMouseUp(SLMouseButton button, SLint x, SLint y)
forward user input to ui
virtual void onInitNewFrame(SLScene *s, SLSceneView *sv)
prepare the ui for a new rendering, e.g. update visual ui representation (called by SLSceneView onPai...
virtual void onCharInput(SLuint c)
forward user input to ui
virtual void drawMouseCursor(bool doDraw)
Turns on or off the mouse cursor drawing.