15 #define GETTEXT_DOMAIN "wesnoth-lib"
41 const std::string& tod_id = disp.get_time_of_day(loc).id;
42 tile_->rebuild_cache(tod_id, &tile_logs_);
52 for(
auto&
flag : flags) {
56 find_widget<label>(
"flags").set_label(
utils::join(flags,
"\n"));
61 listbox& list = find_widget<listbox>(
"layer_list");
81 std::ostringstream image_steam;
84 SDL_Rect r {0,0,tz,tz};
92 ((tz * 3) / 4) * loc_cut.
x
93 , tz * loc_cut.
y + (tz / 2) * (loc_cut.
x % 2)
104 image_steam <<
"terrain/foreground.png";
109 rect r2{0, 0, img_size.x, img_size.y};
115 << r2.x <<
"," << r2.y <<
","
116 << r2.w <<
"," << r2.h <<
")"
117 <<
"," << r2.x - r.x <<
"," << r2.y - r.y
119 <<
"~MASK(" <<
"terrain/alphamask.png" <<
")";
122 item[
"label"] = image_steam.str();
125 item[
"label"] = name +
"~SCALE(72,72)";
128 item[
"label"] = name;
134 item[
"label"] = std::to_string(ri->
layer);
137 item[
"label"] = std::to_string(ri->
basex);
140 item[
"label"] = std::to_string(ri->
basey);
Sort-of-Singleton that many classes, both GUI and non-GUI, use to access the game data.
Abstract base class for all modal dialogs.
virtual void pre_show() override
Actions to be taken before showing the window.
terrain_builder::tile::logs tile_logs_
terrain_builder::tile * tile_
grid & add_row(const widget_item &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
Generic locator abstracting the location of an image.
const std::string & get_filename() const
const map_location & get_loc() const
The class terrain_builder is constructed from a config object, and a gamemap object.
tile * get_tile(const map_location &loc)
map_display and display: classes which take care of displaying the map and game-data on the screen.
const std::string unicode_bullet
REGISTER_DIALOG(editor_edit_unit)
std::map< std::string, widget_item > widget_data
std::map< std::string, t_string > widget_item
std::pair< std::string, unsigned > item
std::string join(const T &v, const std::string &s=",")
Generates a new string joining container items in a list.
Encapsulates the map of the game.
An abstract description of a rectangle with integer coordinates.
std::vector< animated< image::locator > > images
An animated image locator built according to the image string.
int basex
The position of the image base (that is, the point where the image reaches the floor) for vertical la...
bool is_background() const
int layer
The layer of the image for horizontal layering.
int center_x
The position where the center of the image base should be.
Represent a rule_image applied with a random seed.
std::set< std::string > flags
The list of flags present in this tile.
std::pair< const rule_image_rand *, const rule_image_variant * > log_details