15 #define GETTEXT_DOMAIN "wesnoth-lib" 42 const std::string& tod_id = disp.get_time_of_day(loc).id;
43 tile_->rebuild_cache(tod_id, &tile_logs_);
53 for(
auto&
flag : flags) {
57 find_widget<label>(&window,
"flags",
false).set_label(
utils::join(flags,
"\n"));
62 listbox& list = find_widget<listbox>(&window,
"layer_list",
false);
76 std::map<std::string, string_map> data;
80 data.emplace(
"index", item);
82 std::ostringstream image_steam;
85 SDL_Rect r {0,0,tz,tz};
93 ((tz * 3) / 4) * loc_cut.
x 94 , tz * loc_cut.
y + (tz / 2) * (loc_cut.
x % 2)
105 image_steam <<
"terrain/foreground.png";
111 if(r2.w > 0 && r2.h > 0) {
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();
123 data.emplace(
"image_used", item);
125 item[
"label"] = name +
"~SCALE(72,72)";
126 data.emplace(
"image_full", item);
128 item[
"label"] = name;
129 data.emplace(
"name", item);
132 data.emplace(
"loc", item);
134 item[
"label"] = std::to_string(ri->
layer);
135 data.emplace(
"layer", item);
137 item[
"label"] = std::to_string(ri->
basex);
138 data.emplace(
"base_x", item);
140 item[
"label"] = std::to_string(ri->
basey);
141 data.emplace(
"base_y", item);
144 data.emplace(
"center", item);
std::pair< const rule_image_rand *, const rule_image_variant * > log_details
int layer
The layer of the image for horizontal layering.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
tile * get_tile(const map_location &loc)
std::string join(const T &v, const std::string &s=",")
Generates a new string joining container items in a list.
Represent a rule_image applied with a random seed.
t_string get_image() const
Wrapper for label.
The class terrain_builder is constructed from a config object, and a gamemap object.
bool is_background() const
int basex
The position of the image base (that is, the point where the image reaches the floor) for vertical la...
SDL_Rect intersect_rects(const SDL_Rect &rect1, const SDL_Rect &rect2)
Calculates the intersection of two rectangles.
This file contains the settings handling of the widget library.
map_display and display: classes which take care of displaying the map and game-data on the screen...
Generic locator abstracting the location of an image.
Encapsulates the map of the game.
std::set< std::string > flags
The list of flags present in this tile.
const std::string & get_filename() const
int center_x
The position where the center of the image base should be.
const std::string unicode_bullet
terrain_builder::tile * tile_
terrain_builder::tile::logs tile_logs_
const map_location & get_loc() const
std::vector< animated< image::locator > > images
An animated image locator built according to the image string.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
base class of top level items, the only item which needs to store the final canvases to draw on...
std::pair< std::string, unsigned > item