Remove unnecessary y scrolling offset from [message] implementation
The problem this tried to solve was solved long ago, when the new GUI2
[message] dialog was introduced in 1.5.x. Formerly, [message] was
displayed at the top of the screen, so with sufficiently long messages
and a small screen resolution, the viewport could be scrolled in such a
way that the target unit was covered by the dialog.
Nowadays [message] is displayed at the bottom and the scrolling
algorithm is more or less sane, so this hack is completely unneeded.
(For reference, this was originally introduced in commit
83a332a869
. For a reference screenshot of
what it would do back in the day, see
<http://www.wesnoth.org/images/sshots/wesnoth-1.1.9-shot3.jpg>.)
Thanks to celticminstrel and vultraz for bringing this up on IRC.
This commit is contained in:
parent
928b6e8008
commit
e8caf1fac4
2 changed files with 2 additions and 2 deletions
|
@ -82,6 +82,7 @@ Version 1.13.1+dev:
|
|||
* apply_to=attack - add increase_movement_used and set_movement_used to change the
|
||||
number of movement points the attack consumes
|
||||
* Ability to patch movetypes to account for custom terrains or damage types
|
||||
* Removed y offset by -1 from [message]'s scroll-to-unit logic.
|
||||
* Editor:
|
||||
* Added Category field and color sliders to the Edit Label panel.
|
||||
* Miscellaneous and bug fixes:
|
||||
|
|
|
@ -359,8 +359,7 @@ namespace { // Support functions
|
|||
screen.highlight_hex(spl);
|
||||
if(scroll) {
|
||||
LOG_DP << "scrolling to speaker..\n";
|
||||
const int offset_from_center = std::max<int>(0, spl.y - 1);
|
||||
screen.scroll_to_tile(map_location(spl.x, offset_from_center));
|
||||
screen.scroll_to_tile(map_location(spl.x, spl.y));
|
||||
}
|
||||
screen.highlight_hex(spl);
|
||||
} else if(speaker_str == "narrator") {
|
||||
|
|
Loading…
Add table
Reference in a new issue