mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 01:56:06 +00:00
GUI2: simplify GUI_WINDOW_FIXED_SIZE_CENTERED x,y calc
This commit is contained in:
parent
a0ff2a5e96
commit
0a2ba65046
@ -252,8 +252,8 @@
|
|||||||
width = "(min(screen_width, {WIDTH}))"
|
width = "(min(screen_width, {WIDTH}))"
|
||||||
height = "(min(screen_height, {HEIGHT}))"
|
height = "(min(screen_height, {HEIGHT}))"
|
||||||
|
|
||||||
x = "(screen_width / 2 - window_width / 2)"
|
x = "(floor((screen_width - window_width) / 2))"
|
||||||
y = "(screen_height / 2 - window_height / 2)"
|
y = "(floor((screen_height - window_height) / 2))"
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define GUI_CENTERED_IMAGE
|
#define GUI_CENTERED_IMAGE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user