#include <map_widget.h>
Public Types | |
enum | CanMove { UNSET = 0, YES = 1, NO = 2 } |
Public Member Functions | |
MapWidget (Game *game, MapBase *map) | |
MapWidget (Game *game, MapBase *map, const Point &pt, Direction dir=DIR_NONE) | |
MapWidget (Game *game, MapBase *map, const Common::String &name, const Point &pt, Direction dir=DIR_NONE) | |
~MapWidget () override | |
virtual const char * | getClassName () const |
virtual void | synchronize (Common::Serializer &s) |
void | addInfoMsg (const Common::String &text, bool newLine=true, bool replaceLine=false) |
virtual uint | getTileNum () const |
virtual bool | isBlocking () const |
virtual void | update (bool isPreUpdate) |
virtual CanMove | canMoveTo (const Point &destPos) |
virtual void | moveTo (const Point &destPos, Direction dir=DIR_NONE) |
Public Member Functions inherited from Ultima::Shared::BaseObject | |
virtual ::Ultima::Shared::ClassDef | getType () const |
bool | isInstanceOf (const ClassDef &classDef) const |
Static Public Member Functions | |
static Direction | directionFromKey (Common::KeyCode keycode) |
Static Public Member Functions inherited from Ultima::Shared::BaseObject | |
::Ultima::Shared::ClassDef | type () |
Public Attributes | |
Point | _position |
Direction | _direction |
Common::String | _name |
CLASSDEF | |
Protected Attributes | |
Game * | _game |
MapBase * | _map |
Additional Inherited Members |
Base class for things that appear within a map, such as monsters, transports, or people
|
inlineoverride |
Destructor
|
static |
Support method to get a direction from a keycode
|
inlinevirtual |
Return a name for a widget class if it can be synchronized to savegames
|
virtual |
Handles loading and saving game data
Reimplemented in Ultima::Ultima1::Widgets::Shuttle, Ultima::Ultima1::Widgets::DungeonMonster, Ultima::Ultima1::Widgets::OverworldMonster, Ultima::Ultima1::Widgets::OverworldWidget, Ultima::Ultima1::Widgets::Person, Ultima::Ultima1::Widgets::UrbanWidget, and Ultima::Ultima1::Widgets::AttackEffect.
void Ultima::Shared::Maps::MapWidget::addInfoMsg | ( | const Common::String & | text, |
bool | newLine = true , |
||
bool | replaceLine = false |
||
) |
Adds a text string to the info area
text | Text to add |
newLine | Whether to apply a newline at the end |
replaceLine | If true, replaces the current last line |
|
inlinevirtual |
Get the tile for the widget
Reimplemented in Ultima::Ultima1::Widgets::TimeMachine, Ultima::Ultima1::Widgets::Shuttle, Ultima::Ultima1::Widgets::Aircar, Ultima::Ultima1::Widgets::Frigate, Ultima::Ultima1::Widgets::Raft, Ultima::Ultima1::Widgets::Cart, Ultima::Ultima1::Widgets::Horse, Ultima::Ultima1::Widgets::OverworldWidget, Ultima::Ultima1::Widgets::UrbanWidget, Ultima::Ultima1::Widgets::AttackEffect, and Ultima::Ultima1::Widgets::TransportOnFoot.
|
inlinevirtual |
Returns true if the player can move onto a tile the widget occupies
Reimplemented in Ultima::Ultima1::Widgets::Transport.
|
inlinevirtual |
Called to update the widget at the end of a turn
isPreUpdate | Update is called twice in succession during the end of turn update. Once with true for all widgets, then with it false |
Reimplemented in Ultima::Ultima1::Widgets::DungeonMonster.
|
virtual |
Returns true if the given widget can move to a given position on the map
Reimplemented in Ultima::Ultima1::Widgets::DungeonMonster, Ultima::Ultima1::Widgets::OverworldWidget, Ultima::Ultima1::Widgets::UrbanWidget, and Ultima::Ultima1::Widgets::DungeonPlayer.
|
virtual |
Moves the widget to a given position
destPos | Specified new position |
dir | Optional explicit direction to set. If not specified, the direction will be set relative to the position moved from |
Reimplemented in Ultima::Ultima1::Widgets::UrbanPlayer.