Factorize pos

This commit is contained in:
Gouvernathor 2023-11-17 03:07:16 +01:00
parent 313849696c
commit d7c8e39b08

View File

@ -118,12 +118,13 @@ screen stats(xx, yy):
use close_button(key=["stats", "game_menu"])
fixed:
pos (xx, yy)
if settings.get("animations"):
at gui_animation
use stats_menu(current_category, stats_flags, xx, yy)
use stats_menuitem(current_category, current_item, stats_flags, xx, yy)
use stats_menu(current_category, stats_flags)
use stats_menuitem(current_category, current_item, stats_flags)
screen stats_menu(current_category, stats_flags, xx, yy):
screen stats_menu(current_category, stats_flags):
tag stats_menu
zorder 30
modal True
@ -131,7 +132,6 @@ screen stats_menu(current_category, stats_flags, xx, yy):
window:
style "empty"
style_prefix gui.theme('achievements')
pos (xx, yy)
xysize (207, 454)
use invisible_button()
@ -180,7 +180,7 @@ screen stats_menu(current_category, stats_flags, xx, yy):
xysize (48, 48)
add crop_image_zoom("interface/icons/head/"+stats_dict.get(category).get("ico")+("" if stats_flags[category] else "_locked")+".webp", 42, 42) align (0.5, 0.5)
screen stats_menuitem(current_category, current_item, stats_flags, xx, yy):
screen stats_menuitem(current_category, current_item, stats_flags):
tag stats_menuitem
zorder 30
@ -189,7 +189,7 @@ screen stats_menuitem(current_category, current_item, stats_flags, xx, yy):
window:
style "empty"
style_prefix gui.theme()
pos (xx+217, yy-53)
pos (217, -53)
xysize (560, 507)
use invisible_button()