16 #define GETTEXT_DOMAIN "wesnoth-lib"
27 #include "../../minimap.hpp"
34 #define ERR_CF LOG_STREAM_INDENT(err, log_config)
36 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
37 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
79 map_ = std::make_unique<gamemap>(map_data);
82 ERR_CF <<
"Error while loading the map: " <<
e.message;
91 drawer({ 0, 0,
w,
h });
104 load_resolutions<resolution>(cfg);
125 auto widget = std::make_unique<minimap>(*
this);
127 DBG_GUI_G <<
"Window builder: placed minimap '" <<
id
128 <<
"' with definition '" <<
definition <<
"'.";
A config object defines a single node in a WML file, with access to child nodes.
virtual bool impl_draw_background() override
See widget::impl_draw_background.
void set_map_data(const std::string &map_data)
std::unique_ptr< gamemap > map_
Game map generated from the provided data.
virtual bool get_active() const override
See styled_widget::get_active.
virtual unsigned get_state() const override
See styled_widget::get_state.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
virtual void set_active(const bool active) override
See styled_widget::set_active.
Define the common log macros for the gui toolkit.
std::function< rect(rect)> prep_minimap_for_rendering(const gamemap &map, const team *vw, const unit_map *units, const std::map< map_location, unsigned int > *reach_map, bool ignore_terrain_disabled)
Prepares the minimap texture and returns a function which will render it to the current rendering tar...
Contains the implementation details for lexical_cast and shouldn't be used directly.
Contains the SDL_Rect helper code.
virtual std::unique_ptr< widget > build() const override
resolution(const config &cfg)
minimap_definition(const config &cfg)
std::vector< state_definition > state
std::string missing_mandatory_wml_tag(const std::string §ion, const std::string &tag)
Returns a standard message for a missing wml child (tag).
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
#define VALIDATE_WML_CHILD(cfg, key, message)