got rid of display::map_w() and now uses the value from the theme code

This commit is contained in:
Mark de Wever 2007-05-27 10:13:28 +00:00
parent 557b2aea3d
commit fbabe2290b
3 changed files with 3 additions and 4 deletions

View file

@ -2488,7 +2488,7 @@ void display::add_chat_message(const std::string& speaker, int side, const std::
msg = message;
action = false;
}
msg = font::word_wrap_text(msg,font::SIZE_SMALL,map_w()*3/4);
msg = font::word_wrap_text(msg,font::SIZE_SMALL,map_area().w*3/4);
int ypos = chat_message_x;
for(std::vector<chat_message>::const_iterator m = chat_messages_.begin(); m != chat_messages_.end(); ++m) {

View file

@ -126,7 +126,6 @@ public:
//width of the portion of the display which shows the game area. Between
//mapx and x is the sidebar region.
int w() const { return screen_.getx(); }
int map_w() const { return w() - 140; }
int h() const { return screen_.gety(); }
const SDL_Rect& map_area() const

View file

@ -35,9 +35,9 @@ size_specs::size_specs() {
}
void adjust_sizes(const display &disp, size_specs &sizes) {
sizes.brush_x = disp.map_w() + 23;
sizes.brush_x = disp.map_area().w + 23;
sizes.brush_y = 190;
sizes.palette_x = disp.map_w() + 13;
sizes.palette_x = disp.map_area().w + 13;
sizes.palette_y = sizes.brush_y + 160 + 10;
sizes.palette_w = sizes.terrain_space * default_palette_width;
sizes.palette_h = disp.h() - sizes.palette_y - 60;