attempt to fix theming problems in 800x600

This commit is contained in:
uid68803 2004-01-02 21:37:09 +00:00
parent 56491034f8
commit 3e92c0ae6a
5 changed files with 22 additions and 13 deletions

View file

@ -75,7 +75,7 @@ height=600
[turn]
font_size=12
rect=5,4,100,20
xanchor=left
xanchor=proportional
yanchor=fixed
prefix=turn
prefix_literal=" "
@ -83,7 +83,7 @@ height=600
[gold]
font_size=12
rect=100,4,220,20
xanchor=left
xanchor=proportional
yanchor=fixed
prefix=gold
prefix_literal=": "
@ -91,7 +91,7 @@ height=600
[villages]
font_size=12
rect=220,4,340,20
xanchor=left
xanchor=proportional
yanchor=fixed
prefix=villages
prefix_literal=": "
@ -99,7 +99,7 @@ height=600
[num_units]
font_size=12
rect=340,4,460,20
xanchor=left
xanchor=proportional
yanchor=fixed
prefix=units
prefix_literal=": "
@ -107,7 +107,7 @@ height=600
[upkeep]
font_size=12
rect=460,4,580,20
xanchor=left
xanchor=proportional
yanchor=fixed
prefix=upkeep
prefix_literal=": "
@ -115,7 +115,7 @@ height=600
[income]
font_size=12
rect=580,4,700,20
xanchor=left
xanchor=proportional
yanchor=fixed
prefix=income
prefix_literal=": "
@ -129,7 +129,7 @@ height=600
[position]
font_size=12
rect=900,4,1020,20
xanchor=right
xanchor=proportional
yanchor=fixed
[/position]

View file

@ -728,7 +728,7 @@ void display::draw_report(reports::TYPE report_num)
//report and its location is unchanged since last time. Do nothing.
if(rect == new_rect && reports_[report_num] == report) {
std::cerr << "report unchanged\n";
std::cerr << "report unchanged: '" << report.text << "'\n";
return;
}

View file

@ -211,6 +211,8 @@ SDL_Rect draw_text_line(display* gui, const SDL_Rect& area, int size,
src.x = 0;
src.y = 0;
log_scope("blit text");
std::cerr << "blitting: " << src.x << "," << src.y << "," << src.w << "," << src.h
<< " -> " << dest.x << "," << dest.y << "," << dest.w << "," << dest.h << "\n";
SDL_BlitSurface(surface,&src,gui->video().getSurface(),&dest);
}

View file

@ -29,6 +29,9 @@ report generate_report(TYPE type, const gamemap& map, const unit_map& units,
const gamemap::location& loc, const gamemap::location& mouseover,
const gamestatus& status, const std::string* format_string)
{
if(type == GOLD)
std::cerr << "getting report for gold...\n";
unit_map::const_iterator u = units.end();
if(int(type) >= int(UNIT_REPORTS_BEGIN) && int(type) < int(UNIT_REPORTS_END) || type == POSITION) {
@ -244,7 +247,11 @@ report generate_report(TYPE type, const gamemap& map, const unit_map& units,
}
return report(str.str());
const std::string res = str.str();
if(type == GOLD)
std::cerr << "gold: " << res << "\n";
return report(res);
}
}

View file

@ -56,10 +56,10 @@ SDL_Rect& theme::object::location(const SDL_Rect& screen) const
break;
case TOP_ANCHORED:
relative_loc_.x = loc_.x;
relative_loc_.w = screen.w - (XDim - loc_.w);
relative_loc_.w = screen.w - minimum<size_t>(XDim - loc_.w,screen.w);
break;
case BOTTOM_ANCHORED:
relative_loc_.x = screen.w - (XDim - loc_.x);
relative_loc_.x = screen.w - minimum<size_t>(XDim - loc_.x,screen.w);
relative_loc_.w = loc_.w;
break;
case PROPORTIONAL:
@ -77,10 +77,10 @@ SDL_Rect& theme::object::location(const SDL_Rect& screen) const
break;
case TOP_ANCHORED:
relative_loc_.y = loc_.y;
relative_loc_.h = screen.h - (YDim - loc_.h);
relative_loc_.h = screen.h - minimum<size_t>(YDim - loc_.h,screen.h);
break;
case BOTTOM_ANCHORED:
relative_loc_.y = screen.h - (YDim - loc_.y);
relative_loc_.y = screen.h - minimum<size_t>(YDim - loc_.y,screen.h);
relative_loc_.h = loc_.h;
break;
case PROPORTIONAL: