16 #define GETTEXT_DOMAIN "wesnoth-lib" 29 #include "../../minimap.hpp" 36 #define ERR_CF LOG_STREAM_INDENT(err, log_config) 38 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ 39 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 108 load_resolutions<resolution>(cfg);
115 state.emplace_back(cfg.
child(
"state_enabled"));
129 auto widget = std::make_unique<minimap>(*this);
131 DBG_GUI_G <<
"Window builder: placed minimap '" <<
id 132 <<
"' with definition '" <<
definition <<
"'.";
Define the common log macros for the gui toolkit.
Drawing functions, for drawing things on the screen.
Base class of a resolution, contains the common keys for a resolution.
std::unique_ptr< gamemap > map_
Game map generated from the provided data.
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
void set_map_data(const std::string &map_data)
std::vector< state_definition > state
std::string map_data_
The map data to be used to generate the map.
const std::string & map_data() const
void render_minimap(unsigned dst_w, unsigned dst_h, const gamemap &map, const team *vw, const unit_map *units, const std::map< map_location, unsigned int > *reach_map, bool ignore_terrain_disabled)
Renders the minimap to the screen.
virtual void impl_draw_background() override
See widget::impl_draw_background.
virtual bool get_active() const override
See styled_widget::get_active.
This file contains the settings handling of the widget library.
virtual std::unique_ptr< widget > build() const override
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
minimap_definition(const config &cfg)
Contains the SDL_Rect helper code.
resolution(const config &cfg)
virtual void set_active(const bool active) override
See styled_widget::set_active.
virtual unsigned get_state() const override
See styled_widget::get_state.
A config object defines a single node in a WML file, with access to child nodes.
Contains the implementation details for lexical_cast and shouldn't be used directly.