Fix issue #4909.
This commit is contained in:
parent
fb0f7b9011
commit
2e6a043c1a
3 changed files with 20 additions and 8 deletions
|
@ -234,7 +234,7 @@
|
|||
[change]
|
||||
id=minimap-panel
|
||||
image=themes/classic/minimap-800.png
|
||||
rect="842,=+6,+181,+177"
|
||||
rect="=,=+6,+181,+177"
|
||||
[/change]
|
||||
|
||||
# reduce size of minimap
|
||||
|
@ -255,7 +255,7 @@
|
|||
[/change]
|
||||
[change]
|
||||
id=minimap-button-2
|
||||
rect="=,+3,25,+25"
|
||||
rect="=,+3,+25,+25"
|
||||
[/change]
|
||||
[change]
|
||||
id=minimap-button-3
|
||||
|
|
|
@ -588,6 +588,11 @@
|
|||
width=800
|
||||
height=600
|
||||
|
||||
[change]
|
||||
id=main-map
|
||||
rect="=,+0,+618,600"
|
||||
[/change]
|
||||
|
||||
# fix top pane at 800x600
|
||||
{CHANGE_STATUS_BOX +3 =+0 +85 +15 turn actions-menu}
|
||||
{CHANGE_STATUS_BOX +1 =+0 +56 +15 gold turn-box-topright}
|
||||
|
|
|
@ -330,10 +330,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 - std::min<std::size_t>(spec_width_ - loc_.w, screen.w);
|
||||
relative_loc_.w = loc_.w + screen.w - std::min<std::size_t>(spec_width_, loc_.w + screen.w);
|
||||
break;
|
||||
case BOTTOM_ANCHORED:
|
||||
relative_loc_.x = screen.w - std::min<std::size_t>(spec_width_ - loc_.x, screen.w);
|
||||
relative_loc_.x = loc_.x + screen.w - std::min<std::size_t>(spec_width_, loc_.x + screen.w);
|
||||
relative_loc_.w = loc_.w;
|
||||
break;
|
||||
case PROPORTIONAL:
|
||||
|
@ -351,10 +351,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 - std::min<std::size_t>(spec_height_ - loc_.h, screen.h);
|
||||
relative_loc_.h = loc_.h + screen.h - std::min<std::size_t>(spec_height_, loc_.h + screen.h);
|
||||
break;
|
||||
case BOTTOM_ANCHORED:
|
||||
relative_loc_.y = screen.h - std::min<std::size_t>(spec_width_ - loc_.y, screen.h);
|
||||
relative_loc_.y = loc_.y + screen.h - std::min<std::size_t>(spec_height_, loc_.y + screen.h);
|
||||
relative_loc_.h = loc_.h;
|
||||
break;
|
||||
case PROPORTIONAL:
|
||||
|
@ -365,9 +365,16 @@ SDL_Rect& theme::object::location(const SDL_Rect& screen) const
|
|||
assert(false);
|
||||
}
|
||||
|
||||
relative_loc_.x = std::min<int>(relative_loc_.x, screen.w);
|
||||
relative_loc_.w = std::min<int>(relative_loc_.w, screen.w);
|
||||
if(relative_loc_.x > screen.w) {
|
||||
relative_loc_.x = std::min<int>(relative_loc_.x, screen.w - relative_loc_.w);
|
||||
}
|
||||
relative_loc_.w = std::min<int>(relative_loc_.w, screen.w - relative_loc_.x);
|
||||
relative_loc_.y = std::min<int>(relative_loc_.y, screen.h);
|
||||
|
||||
relative_loc_.h = std::min<int>(relative_loc_.h, screen.h);
|
||||
if(relative_loc_.y > screen.h) {
|
||||
relative_loc_.y = std::min<int>(relative_loc_.y, screen.h - relative_loc_.h);
|
||||
}
|
||||
relative_loc_.h = std::min<int>(relative_loc_.h, screen.h - relative_loc_.y);
|
||||
|
||||
return relative_loc_;
|
||||
|
|
Loading…
Add table
Reference in a new issue