storyscreen: Increase bottom padding when reaching the bottom of the screen

This seems to have been an oversight on my part ages ago that only
became evident as I started to stuff text walls into storyscreens in my
campaign.
This commit is contained in:
Ignacio R. Morelle 2013-03-13 07:26:30 +00:00
parent a483c47089
commit 724a8a2708
2 changed files with 4 additions and 2 deletions

View file

@ -63,6 +63,8 @@ Version 1.11.1+svn:
* Updating the shroud after delaying shroud updates is done gradually instead
of instantly.
* Fixed (bug #18970): Moving a unit after closing a click dismiss dialogue.
* Increased bottom padding for story screen text when it reaches the bottom
of the screen.
* WML engine:
* [unit_overlay] and [remove_unit_overlay] now return a more meaningful
error message if the image= key is missing

View file

@ -429,10 +429,10 @@ void part_ui::render_story_box()
}
int fix_text_y = text_y_;
if(fix_text_y + storybox_padding + txtsurf->h > screen_area().h && tbl != part::BLOCK_TOP) {
if(fix_text_y + 2*(storybox_padding+1) + txtsurf->h > screen_area().h && tbl != part::BLOCK_TOP) {
fix_text_y =
(screen_area().h > txtsurf->h + 1) ?
(std::max(0, screen_area().h - txtsurf->h - (storybox_padding+1))) :
(std::max(0, screen_area().h - txtsurf->h - 2*(storybox_padding+1))) :
(0);
}
int fix_text_h;