[print]: Center the message within the map area
In master, this just moves the message down by the height of the top bar. In themes where the left end of the map isn't at x=0, this makes [print] centered within the main map, rather than centered within the rectangle with corners (0,0) and (bottom right corner of the main map), regardless of where the top and left ends of the map are with respect to the screen. Currently, the [print] messages are vertically centered, whereas the "Planning mode activated" message is vertically at one-third of the height. We should perhaps make these consistent, but this commit doesn't change that.
This commit is contained in:
parent
b408a155b3
commit
7c6fbf343c
1 changed files with 1 additions and 1 deletions
|
@ -2135,7 +2135,7 @@ int game_lua_kernel::intf_print(lua_State *L) {
|
|||
font::floating_label flabel(text);
|
||||
flabel.set_font_size(size);
|
||||
flabel.set_color(color);
|
||||
flabel.set_position(rect.w/2,rect.h/2);
|
||||
flabel.set_position(rect.x + rect.w/2, rect.y + rect.h/2);
|
||||
flabel.set_lifetime(lifetime);
|
||||
flabel.set_clip_rect(rect);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue