15 #define GETTEXT_DOMAIN "wesnoth-lib"
43 const std::string& tod_id = disp.get_time_of_day(loc).id;
44 tile_->rebuild_cache(tod_id, &tile_logs_);
54 for(
auto&
flag : flags) {
63 listbox& list = find_widget<listbox>(&
window,
"layer_list",
false);
83 std::ostringstream image_steam;
86 SDL_Rect r {0,0,tz,tz};
94 ((tz * 3) / 4) * loc_cut.
x
95 , tz * loc_cut.
y + (tz / 2) * (loc_cut.
x % 2)
106 image_steam <<
"terrain/foreground.png";
111 rect r2{0, 0, img_size.x, img_size.y};
117 << r2.x <<
"," << r2.y <<
","
118 << r2.w <<
"," << r2.h <<
")"
119 <<
"," << r2.x - r.x <<
"," << r2.y - r.y
121 <<
"~MASK(" <<
"terrain/alphamask.png" <<
")";
124 item[
"label"] = image_steam.str();
127 item[
"label"] = name +
"~SCALE(72,72)";
130 item[
"label"] = name;
136 item[
"label"] = std::to_string(ri->
layer);
139 item[
"label"] = std::to_string(ri->
basex);
142 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(window &window) 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.
base class of top level items, the only item which needs to store the final canvases to draw on.
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)
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
const std::string unicode_bullet
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.
This file contains the settings handling of the widget library.
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