From 724a8a27084944bf0d70c247dd16f3f978ec7019 Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Wed, 13 Mar 2013 07:26:30 +0000 Subject: [PATCH] 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. --- changelog | 2 ++ src/storyscreen/render.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog b/changelog index 5181bd89c39..c13e723630e 100644 --- a/changelog +++ b/changelog @@ -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 diff --git a/src/storyscreen/render.cpp b/src/storyscreen/render.cpp index 07addda43c4..c0b8784ba8e 100644 --- a/src/storyscreen/render.cpp +++ b/src/storyscreen/render.cpp @@ -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;