#include <events.h>
Public Member Functions | |
| UIElement (const Common::String &name, UIElement *uiParent) | |
| UIElement (const Common::String &name) | |
| bool | needsRedraw () const |
| void | redraw () |
| virtual void | close () |
| virtual void | replaceView (UIElement *ui, bool replaceAllViews=false) |
| virtual void | replaceView (const Common::String &name, bool replaceAllViews=false) |
| virtual void | addView (UIElement *ui) |
| virtual 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 |
| const Common::String & | getName () const |
| GfxSurface | getSurface (bool innerBounds=false) const |
| 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) |
| template<class T > | |
| bool | send (const T &msg) |
| template<class T > | |
| bool | send (const Common::String &viewName, const T &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) |
| void | stopTextToSpeech () |
| 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) |
| virtual bool | msgCustom (const Message &msg) |
Protected Attributes | |
| UIElement * | _parent |
| Common::Array< UIElement * > | _children |
| Common::Rect | _innerBounds |
| Bounds | _bounds |
| bool | _needsRedraw = true |
| Common::String | _name |
| Common::String | _previousSaid |
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::Ultima1::Gfx::TextCursor, Ultima::Ultima1::Views::Interactions::SpaceDead, Ultima::Ultima1::Views::Interactions::LiftOff, Ultima::Ultima1::Views::Interactions::Pillar, Ultima::Ultima1::Views::LocationMap, Ultima::Ultima1::Views::OverworldMap, Ultima::Ultima1::Views::Startup, Ultima::Ultima1::Views::Title, Ultima::Ultima2::Gfx::TextCursor, Ultima::Ultima2::Views::Title, Ultima::Ultima3::Views::Game, Ultima::Ultima3::Views::LogoScreen, and Ultima::Ultima3::Views::Title.
|
inline |
Returns true if the elements needs to be redrawn
| void Graphics::Views::UIElement::redraw | ( | ) |
Sets that the element needs to be redrawn
|
virtual |
Closes the current view. The view must have been added via addView, so there's a remaining view afterwards
Reimplemented in Graphics::Views::Events.
|
virtual |
Sets the focus to a new view
Reimplemented in Graphics::Views::Events.
|
virtual |
Adds a focused view to the view stack without replacing current one
Reimplemented in Graphics::Views::Events.
| int Graphics::Views::UIElement::getRandomNumber | ( | int | minNumber, |
| int | maxNumber | ||
| ) |
Returns a random number
|
inlinevirtual |
Sets the element's bounds
|
inline |
Gets the element's bounds
|
inline |
Gets a view's name
| GfxSurface Graphics::Views::UIElement::getSurface | ( | bool | innerBounds = false | ) | const |
Returns a surface for drawing the element
|
virtual |
Draws the element
Reimplemented in Ultima::Ultima1::Gfx::TextCursor, Ultima::Ultima1::Gfx::TextInput, Ultima::Ultima1::Views::Commands, Ultima::Ultima1::Views::CreateCharacter, Ultima::Ultima1::Views::Dialog, Ultima::Ultima1::Views::DungeonMap, Ultima::Ultima1::Views::FullScreenDialog, Ultima::Ultima1::Views::Game, Ultima::Ultima1::Views::Interactions::Dead, Ultima::Ultima1::Views::Interactions::SpaceDead, Ultima::Ultima1::Views::Interactions::Drop, Ultima::Ultima1::Views::Interactions::EnteringCraft, Ultima::Ultima1::Views::Interactions::King, Ultima::Ultima1::Views::Interactions::Lose, Ultima::Ultima1::Views::Interactions::Merchant, Ultima::Ultima1::Views::Interactions::OperateCraft, Ultima::Ultima1::Views::Interactions::Pillar, Ultima::Ultima1::Views::Interactions::PrincessSaved, Ultima::Ultima1::Views::Interactions::Ready, Ultima::Ultima1::Views::Interactions::SectorScan, Ultima::Ultima1::Views::Interactions::Win, Ultima::Ultima1::Views::LocationMap, Ultima::Ultima1::Views::MainMenu, Ultima::Ultima1::Views::MondainMap, Ultima::Ultima1::Views::OverworldMap, Ultima::Ultima1::Views::SpaceCockpit, Ultima::Ultima1::Views::SpaceGame, Ultima::Ultima1::Views::SpaceMap, Ultima::Ultima1::Views::SpaceStats, Ultima::Ultima1::Views::Startup, Ultima::Ultima1::Views::Stats, Ultima::Ultima1::Views::Title, Ultima::Ultima1::Views::ZStats, Ultima::Ultima2::Gfx::TextCursor, Ultima::Ultima2::Views::Commands, Ultima::Ultima2::Views::CreateCharacter, Ultima::Ultima2::Views::DungeonMap, Ultima::Ultima2::Views::Ending, Ultima::Ultima2::Views::HelmMap, Ultima::Ultima2::Views::LocationMap, Ultima::Ultima2::Views::OverworldMap, Ultima::Ultima2::Views::SpaceMap, Ultima::Ultima2::Views::SpaceStats, Ultima::Ultima2::Views::Stats, Ultima::Ultima2::Views::Title, Ultima::Ultima2::Views::ZStats, Ultima::Ultima3::Views::CharacterDetails, Ultima::Ultima3::Views::CreateCharacter, Ultima::Ultima3::Views::DisperseParty, Ultima::Ultima3::Views::FormParty, Ultima::Ultima3::Views::Game, Ultima::Ultima3::Views::JourneyOnward, Ultima::Ultima3::Views::LogoScreen, Ultima::Ultima3::Views::MainMenu, Ultima::Ultima3::Views::PartyMenu, Ultima::Ultima3::Views::Register, Ultima::Ultima3::Views::TerminateCharacter, Ultima::Ultima3::Views::Title, and Graphics::Views::Events.
|
virtual |
Called for game frame ticks
Reimplemented in Ultima::Ultima1::Views::Dialog, Ultima::Ultima1::Views::Interactions::Dead, Ultima::Ultima1::Views::Interactions::Interaction, Ultima::Ultima1::Views::Interactions::SectorScan, Ultima::Ultima1::Views::Interactions::Win, Ultima::Ultima1::Views::Map, Ultima::Ultima1::Views::MondainMap, Ultima::Ultima1::Views::SpaceCockpit, Ultima::Ultima2::Views::DungeonMap, Ultima::Ultima2::Views::Ending, Ultima::Ultima2::Views::Interactions::Direction, Ultima::Ultima2::Views::Interactions::HyperwarpTarget, Ultima::Ultima2::Views::Interactions::Interaction, Ultima::Ultima2::Views::Interactions::PlaneFlight, Ultima::Ultima2::Views::Interactions::RocketLanding, Ultima::Ultima2::Views::Map, Ultima::Ultima2::Views::SpaceMap, and Graphics::Views::Events.
|
virtual |
Find a view by name
|
inlineprotectedvirtual |
Handles events
Reimplemented in Graphics::Views::Events, Ultima::Ultima1::Views::SpaceCockpit, and Graphics::Views::View.
|
protected |
Stops TTS voicing and clears the previously spoken text
|
inlineprotectedvirtual |
Reimplemented in Ultima::Ultima1::Views::SpaceCockpit, and Ultima::Shared::Events.
|
inlineprotectedvirtual |
Handles messages of types that the library has no dedicated msgXXX method for - i.e. message structs an engine defines for itself, derived from Message. Overrides should identify the types they care about (typically with dynamic_cast) and return the base class's result for everything else. The default passes the message to each child in turn
Reimplemented in Ultima::Shared::UIElement, and Graphics::Views::Events.
|
inline |
Sends an engine-defined message, either to this element or the named view. Only used for types without one of the dedicated overloads above, which are preferred when they match exactly. Note that a type derived from one of the built-in messages will therefore come through here rather than being converted to its base