#include <events.h>
Public Member Functions | |
virtual bool | isDemo () const =0 |
void | runGame () |
void | replaceView (UIElement *ui, bool replaceAllViews=false, bool fadeOutIn=false) override |
void | replaceView (const Common::String &name, bool replaceAllViews=false, bool fadeOutIn=false) override |
void | addView (UIElement *ui) override |
void | addView (const Common::String &name) override |
void | clearViews () |
void | popView () |
UIElement * | focusedView () const |
UIElement * | priorView () const |
UIElement * | firstView () const |
bool | isPresent (const Common::String &name) const |
bool | isInCombat () const |
Graphics::Screen * | getScreen () const |
void | drawElements () override |
void | draw () override |
bool | tick () override |
void | close () override |
![]() | |
UIElement (const Common::String &name, UIElement *uiParent) | |
UIElement (const Common::String &name) | |
bool | needsRedraw () const |
void | redraw () |
void | addView () |
void | open () |
int | getRandomNumber (int minNumber, int maxNumber) |
int | getRandomNumber (int maxNumber) |
virtual void | setBounds (const Common::Rect &r) |
Common::Rect | getBounds () const |
const Common::String & | getName () const |
Gfx::GfxSurface | getSurface (bool innerBounds=false) const |
virtual UIElement * | findView (const Common::String &name) |
bool | send (const MouseMoveMessage &msg) |
bool | send (const Common::String &viewName, const FocusMessage &msg) |
bool | send (const FocusMessage &msg) |
bool | send (const Common::String &viewName, const UnfocusMessage &msg) |
bool | send (const UnfocusMessage &msg) |
bool | send (const Common::String &viewName, const MouseEnterMessage &msg) |
bool | send (const MouseEnterMessage &msg) |
bool | send (const Common::String &viewName, const MouseLeaveMessage &msg) |
bool | send (const MouseLeaveMessage &msg) |
bool | send (const Common::String &viewName, const KeypressMessage &msg) |
bool | send (const KeypressMessage &msg) |
bool | send (const Common::String &viewName, const MouseDownMessage &msg) |
bool | send (const MouseDownMessage &msg) |
bool | send (const Common::String &viewName, const MouseUpMessage &msg) |
bool | send (const MouseUpMessage &msg) |
bool | send (const Common::String &viewName, const ActionMessage &msg) |
bool | send (const ActionMessage &msg) |
bool | send (const Common::String &viewName, const GameMessage &msg) |
bool | send (const GameMessage &msg) |
bool | send (const Common::String &viewName, const ValueMessage &msg) |
bool | send (const ValueMessage &msg) |
Protected Member Functions | |
virtual bool | shouldQuit () const =0 |
bool | msgAction (const ActionMessage &e) override |
bool | msgFocus (const FocusMessage &e) override |
bool | msgUnfocus (const UnfocusMessage &e) override |
bool | msgMouseEnter (const MouseEnterMessage &e) override |
bool | msgMouseLeave (const MouseLeaveMessage &e) override |
bool | msgKeypress (const KeypressMessage &e) override |
bool | msgMouseDown (const MouseDownMessage &e) override |
bool | msgMouseUp (const MouseUpMessage &e) override |
bool | msgMouseMove (const MouseMoveMessage &e) override |
![]() | |
bool | isDelayActive () const |
void | cancelDelay () |
virtual void | timeout () |
virtual bool | msgGame (const GameMessage &e) |
virtual bool | msgValue (const ValueMessage &e) |
Additional Inherited Members | |
![]() | |
UIElement * | _parent |
Common::Array< UIElement * > | _children |
Common::Rect | _innerBounds |
Bounds | _bounds |
bool | _needsRedraw = true |
Common::String | _name |
Main events and view manager. This is kept separate from the engine class because the engine may add a lot of globals and bring in other classes. So to save on compilation time, classes that only need to access basic view management methods like addView or replaceView only need to include events.h rather than the whole engine.
|
protectedpure virtual |
Returns true if the game should quit
Implemented in Got::GotEngine.
|
inlineoverrideprotectedvirtual |
Handles events
Reimplemented from Got::UIElement.
void Got::Events::runGame | ( | ) |
Main game loop
|
overridevirtual |
Sets the focus to a new view
Reimplemented from Got::UIElement.
|
overridevirtual |
Adds a focused view to the view stack without replacing current one
Reimplemented from Got::UIElement.
void Got::Events::clearViews | ( | ) |
Clears the view list
void Got::Events::popView | ( | ) |
Pops a view from the view stack
|
inline |
Returns the currently focused view, if any
|
inline |
Returns the view prior to the current view, if any
|
inline |
Returns the first view in the stack
bool Got::Events::isPresent | ( | const Common::String & | name | ) | const |
Returns true if a view of a given name is present at all in the visible view stack
|
inline |
Returns true if combat is active
|
inline |
Returns the underlying screen
|
overridevirtual |
Draws the focused view
Reimplemented from Got::UIElement.
|
inlineoverridevirtual |
Events manager doesn't have any intrinsic drawing
Reimplemented from Got::UIElement.
|
inlineoverridevirtual |
Called once every game frame
Reimplemented from Got::UIElement.
|
inlineoverridevirtual |
Calling the close method for g_events closes the active view
Reimplemented from Got::UIElement.