#include <events.h>
Public Member Functions | |
| UIElement (const Common::String &name, UIElement *uiParent) | |
| UIElement (const Common::String &name) | |
| bool | needsRedraw () const |
| void | redraw () |
| void | focus () |
| virtual void | close () |
| bool | isFocused () const |
| Common::String | getName () const |
| void | replaceView (UIElement *ui, bool replaceAllViews=false) |
| void | replaceView (const Common::String &name, bool replaceAllViews=false) |
| void | addView (UIElement *ui) |
| void | addView (const Common::String &name) |
| 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 |
| Gfx::GfxSurface | getSurface () const |
| virtual void | clearSurface () |
| virtual void | draw () |
| virtual bool | tick () |
| 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 | |
| void | delaySeconds (uint seconds) |
| void | delayFrames (uint frames) |
| bool | isDelayActive () const |
| void | cancelDelay () |
| virtual void | timeout () |
| virtual bool | msgMouseMove (const MouseMoveMessage &msg) |
| virtual bool | msgFocus (const FocusMessage &e) |
| virtual bool | msgUnfocus (const UnfocusMessage &e) |
| virtual bool | msgMouseEnter (const MouseEnterMessage &e) |
| virtual bool | msgMouseLeave (const MouseLeaveMessage &e) |
| virtual bool | msgKeypress (const KeypressMessage &e) |
| virtual bool | msgMouseDown (const MouseDownMessage &e) |
| virtual bool | msgMouseUp (const MouseUpMessage &e) |
| virtual bool | msgAction (const ActionMessage &e) |
| virtual bool | msgGame (const GameMessage &e) |
| virtual bool | msgValue (const ValueMessage &e) |
Protected Attributes | |
| UIElement * | _parent |
| Common::Array< UIElement * > | _children |
| Common::Rect | _innerBounds |
| Bounds | _bounds |
| bool | _needsRedraw = true |
| Common::String | _name |
User interface element
|
protected |
Set a delay countdown in seconds, after which timeout() is called
|
protected |
Set a delay countdown in frames, after which timeout() is called
|
inlineprotected |
Returns true if a delay is active
|
inlineprotected |
Cancels any active delay
|
protectedvirtual |
Called when an active timeout countdown expired
Reimplemented in Ultima::Ultima0::Views::Attack, Ultima::Ultima0::Views::Dungeon, Ultima::Ultima0::Views::WorldMap, and Ultima::Ultima0::Views::Town.
|
inline |
Returns true if the elements needs to be redrawn
| void Ultima::Ultima0::UIElement::redraw | ( | ) |
Sets that the element needs to be redrawn
| void Ultima::Ultima0::UIElement::focus | ( | ) |
Focuses the element as the current view
|
virtual |
Closes the current view. The view must have been added via addView, so there's a remaining view afterwards
Reimplemented in Ultima::Ultima0::Events.
|
inline |
Returns the view name
| void Ultima::Ultima0::UIElement::replaceView | ( | UIElement * | ui, |
| bool | replaceAllViews = false |
||
| ) |
Sets the focus to a new view
| void Ultima::Ultima0::UIElement::addView | ( | UIElement * | ui | ) |
Adds a focused view to the view stack without replacing current one
| int Ultima::Ultima0::UIElement::getRandomNumber | ( | int | minNumber, |
| int | maxNumber | ||
| ) |
Returns a random number
|
inlinevirtual |
Sets the element's bounds
|
inline |
Gets the element's bounds
| Gfx::GfxSurface Ultima::Ultima0::UIElement::getSurface | ( | ) | const |
Returns a surface for drawing the element
|
virtual |
Clear the surface
|
virtual |
Draws the element
Reimplemented in Ultima::Ultima0::Events, Ultima::Ultima0::Views::Info, Ultima::Ultima0::Views::Title, Ultima::Ultima0::Views::DungeonStatus, Ultima::Ultima0::Views::Attack, Ultima::Ultima0::Views::Dungeon, Ultima::Ultima0::Views::Castle, Ultima::Ultima0::Views::WorldMap, Ultima::Ultima0::Views::Acknowledgements, Ultima::Ultima0::Views::Town, Ultima::Ultima0::Views::CreateCharacter, Ultima::Ultima0::Views::Intro, Ultima::Ultima0::Views::Status, Ultima::Ultima0::Views::Dead, and Ultima::Ultima0::Views::Startup.
|
virtual |
Called for game frame ticks
Reimplemented in Ultima::Ultima0::Events, and Ultima::Ultima0::Views::Acknowledgements.
|
virtual |
Find a view by name
|
inlineprotectedvirtual |
Handles events
Reimplemented in Ultima::Ultima0::Events, and Ultima::Ultima0::Views::View.