34 std::weak_ptr<wb::manager>
wb,
36 const std::string& theme_id,
56 virtual const std::set<std::string>&
observers()
const override {
return chat_man_->observers(); }
146 virtual void update()
override;
155 virtual void layout()
override;
163 virtual void render()
override;
A config object defines a single node in a WML file, with access to child nodes.
Sort-of-Singleton that many classes, both GUI and non-GUI, use to access the game data.
std::map< map_location, std::vector< overlay > > overlay_map
static display * singleton_
bool invalidateGameStatus_
virtual void draw_invalidated() override
Only called when there's actual redrawing to do.
void draw_movement_info(const map_location &loc)
Draws the movement info (turns available) for a given location.
game_display(const game_display &)=delete
void display_unit_hex(map_location hex)
Change the unit to be displayed in the sidebar.
virtual bool in_game() const override
void invalidate_unit_after_move(const map_location &src, const map_location &dst)
Same as invalidate_unit() if moving the displayed unit.
std::string attack_indicator_direction() const
Function to get attack direction suffix.
const map_location & get_attack_indicator_src()
const pathfind::marked_route & get_route()
Gets the route along which footsteps are drawn to show movement of a unit.
virtual void highlight_hex(map_location hex) override
Function to highlight a location.
virtual const map_location & displayed_unit_hex() const override
Virtual functions shadowed in game_display.
map_location displayedUnitHex_
std::vector< texture > get_reachmap_images(const map_location &loc) const
void scroll_to_leader(int side, SCROLL_TYPE scroll_type=ONSCREEN, bool force=true)
Scrolls to the leader of a certain side.
void set_game_mode(const game_mode mode)
virtual void draw_hex(const map_location &loc) override
Redraws a single gamemap location.
const std::set< map_location > & units_that_can_reach_goal() const
Return the locations of units that can reach goal (.
void set_attack_indicator(const map_location &src, const map_location &dst)
Set the attack direction indicator.
const std::unique_ptr< display_chat_manager > chat_man_
pathfind::marked_route route_
virtual void render() override
TLD render() override.
void set_route(const pathfind::marked_route *route)
Sets the route along which footsteps are drawn to show movement of a unit.
virtual overlay_map & get_overlays() override
Inherited from display.
std::set< map_location > units_that_can_reach_goal_
void invalidate_unit()
Function to invalidate that unit status displayed on the sidebar.
virtual const std::set< std::string > & observers() const override
virtual void select_hex(map_location hex) override
Function to display a location as selected.
static game_display * get_singleton()
void highlight_reach(const pathfind::paths &paths_list)
Sets the paths that are currently displayed as available for the unit to move along.
void new_turn()
Update lighting settings.
void clear_attack_indicator()
virtual const time_of_day & get_time_of_day(const map_location &loc) const override
void highlight_another_reach(const pathfind::paths &paths_list, const map_location &goal=map_location::null_location())
Add more paths to highlight.
map_location attack_indicator_dst_
game_mode
Sets the linger mode for the display.
@ RUNNING
no linger overlay, show fog and shroud.
bool unhighlight_reach()
Reset highlighting of paths.
void needs_rebuild(bool b)
Sets whether the screen (map visuals) needs to be rebuilt.
bool maybe_rebuild()
Rebuilds the screen if needs_rebuild(true) was previously called, and resets the flag.
virtual void layout() override
TLD layout() override.
virtual bool has_time_area() const override
display_chat_manager & get_chat_manager()
game_display(game_board &board, std::weak_ptr< wb::manager > wb, reports &reports_object, const std::string &theme_id, const config &level)
virtual void update() override
TLD update() override.
map_location attack_indicator_src_
game_display & operator=(const game_display &)=delete
void float_label(const map_location &loc, const std::string &text, const color_t &color)
Function to float a label above a tile.
map_display and display: classes which take care of displaying the map and game-data on the screen.
Unit and team statistics.
This module contains various pathfinding functions and utilities.
rect dst
Location on the final composed sheet.
rect src
Non-transparent portion of the surface to compose.
The basic class for representing 8-bit RGB or RGBA colour values.
Encapsulates the map of the game.
static std::string write_direction(direction dir)
direction get_relative_dir(const map_location &loc, map_location::RELATIVE_DIR_MODE mode) const
static const map_location & null_location()
Structure which holds a single route and marks for special events.
Object which contains all the possible locations a unit can move to, with associated best routes to t...
Object which defines a time of day with associated bonuses, image, sounds etc.