mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-17 19:06:44 +00:00
Fix text positioning when clipped to a viewport.
Should fix the lua console, and the credits screen.
This commit is contained in:
parent
0093d64296
commit
0d30c9d7c3
|
@ -566,7 +566,9 @@ void text_shape::draw(
|
|||
// TODO: highdpi - don't use preclipped texture, rather set clip area.
|
||||
SDL_Rect text_draw_location = draw_location;
|
||||
text_draw_location.x += rects.dst_in_viewport.x;
|
||||
text_draw_location.x += rects.clip_in_shape.x;
|
||||
text_draw_location.y += rects.dst_in_viewport.y;
|
||||
text_draw_location.y += rects.clip_in_shape.y;
|
||||
text_draw_location.w = rects.dst_in_viewport.w;
|
||||
text_draw_location.h = rects.dst_in_viewport.h;
|
||||
draw::blit(tex, text_draw_location);
|
||||
|
|
Loading…
Reference in New Issue
Block a user