ScummVM API documentation
Ultima::Shared::Events Class Reference
Inheritance diagram for Ultima::Shared::Events:
Graphics::Views::Events Graphics::Views::UIElement Ultima::Ultima1::Ultima1Engine Ultima::Ultima2::Ultima2Engine Ultima::Ultima3::Ultima3Engine

Public Member Functions

 Events (const Common::String &engineName)
 
- Public Member Functions inherited from Graphics::Views::Events
 Events (const Common::String &engineName, uint frameRate=20)
 
uint getFrameRate () const
 
void runGame ()
 
bool pumpEvents ()
 
int getRandomNumber (int minNumber, int maxNumber)
 
int getRandomNumber (int maxNumber)
 
void replaceView (UIElement *ui, bool replaceAllViews=false) override
 
void replaceView (const Common::String &name, bool replaceAllViews=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 * baseView () const
 
bool isPresent (const Common::String &name) const
 
Graphics::Screen * getScreen () const
 
void drawElements () override
 
void draw () override
 
bool tick () override
 
void close () override
 
void updateScreen ()
 
virtual Graphics::Font * createFont () const
 
- Public Member Functions inherited from Graphics::Views::UIElement
 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

bool msgAction (const Graphics::Views::ActionMessage &msg) override
 
virtual void returnToMainMenu ()
 
- Protected Member Functions inherited from Graphics::Views::Events
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 msgCustom (const Message &msg) override
 
- Protected Member Functions inherited from Graphics::Views::UIElement
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)
 

Additional Inherited Members

- Protected Attributes inherited from Graphics::Views::UIElement
UIElement * _parent
 
Common::Array< UIElement * > _children
 
Common::Rect _innerBounds
 
Bounds _bounds
 
bool _needsRedraw = true
 
Common::String _name
 
Common::String _previousSaid
 

Constructor & Destructor Documentation

◆ ~Events()

Ultima::Shared::Events::~Events ( )
inlineoverridevirtual

Reimplemented from Graphics::Views::Events.

Member Function Documentation

◆ msgAction()

bool Ultima::Shared::Events::msgAction ( const Graphics::Views::ActionMessage &  msg)
overrideprotectedvirtual

Handles the actions common to the Ultima engines (see HotkeyAction) before passing others to the focused view

Reimplemented from Graphics::Views::UIElement.

◆ returnToMainMenu()

virtual void Ultima::Shared::Events::returnToMainMenu ( )
inlineprotectedvirtual

Goes back to the start of the game, such as its title screen

Reimplemented in Ultima::Ultima1::Ultima1Engine, Ultima::Ultima2::Ultima2Engine, and Ultima::Ultima3::Ultima3Engine.


The documentation for this class was generated from the following file: