Factorize pos

(cherry picked from commit d7c8e39b08)
This commit is contained in:
Gouvernathor 2023-11-17 03:07:16 +01:00 committed by LoafyLemon
parent 7e3a078dce
commit f99c81b14a
1 changed files with 6 additions and 6 deletions

View File

@ -118,12 +118,13 @@ screen stats(xx, yy):
use close_button(key=["stats", "game_menu"]) use close_button(key=["stats", "game_menu"])
fixed: fixed:
pos (xx, yy)
if settings.get("animations"): if settings.get("animations"):
at gui_animation at gui_animation
use stats_menu(current_category, stats_flags, xx, yy) use stats_menu(current_category, stats_flags)
use stats_menuitem(current_category, current_item, stats_flags, xx, yy) 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 tag stats_menu
zorder 30 zorder 30
modal True modal True
@ -131,7 +132,6 @@ screen stats_menu(current_category, stats_flags, xx, yy):
window: window:
style "empty" style "empty"
style_prefix gui.theme('achievements') style_prefix gui.theme('achievements')
pos (xx, yy)
xysize (207, 454) xysize (207, 454)
use invisible_button() use invisible_button()
@ -180,7 +180,7 @@ screen stats_menu(current_category, stats_flags, xx, yy):
xysize (48, 48) 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) 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 tag stats_menuitem
zorder 30 zorder 30
@ -189,7 +189,7 @@ screen stats_menuitem(current_category, current_item, stats_flags, xx, yy):
window: window:
style "empty" style "empty"
style_prefix gui.theme() style_prefix gui.theme()
pos (xx+217, yy-53) pos (217, -53)
xysize (560, 507) xysize (560, 507)
use invisible_button() use invisible_button()