This commit is contained in:
Gouvernathor 2023-11-17 04:35:53 +01:00
parent d40af370a8
commit 8d3eede436

View File

@ -85,37 +85,35 @@ screen brewing_menu():
vbox: vbox:
style_prefix gui.theme('achievements_categories') style_prefix gui.theme('achievements_categories')
pos (6, 6) pos (6, 6)
for i in menu_items: for i_item in menu_items:
frame: frame:
style "empty" style "empty"
xysize (195, 50) xysize (195, 50)
vbox: vbox:
textbutton i.name: textbutton i_item.name:
xysize (195, 46) xysize (195, 46)
text_align (0.6, 0.5) text_align (0.6, 0.5)
text_xanchor 0.5 text_xanchor 0.5
text_size 12 text_size 12
if current_item == i: if current_item == i_item:
background gui.format("interface/achievements/{}/highlight_left_b.webp") background gui.format("interface/achievements/{}/highlight_left_b.webp")
else: else:
hover_background gui.format("interface/achievements/{}/highlight_left_b.webp") hover_background gui.format("interface/achievements/{}/highlight_left_b.webp")
selected (current_item == i) selected (current_item == i_item)
action SetVariable("current_item", i) action SetVariable("current_item", i_item)
add gui.format("interface/achievements/{}/spacer_left.webp") add gui.format("interface/achievements/{}/spacer_left.webp")
$ image_zoom = crop_image_zoom(i.get_image(), 42, 42)
button: button:
style gui.theme("overlay_button") style gui.theme("overlay_button")
background gui.format("interface/achievements/{}/iconbox.webp") background gui.format("interface/achievements/{}/iconbox.webp")
foreground "interface/achievements/glass_iconbox.webp" foreground "interface/achievements/glass_iconbox.webp"
xysize (48, 48) xysize (48, 48)
add image_zoom align (0.5, 0.5) add crop_image_zoom(i_item.get_image(), 42, 42) align (0.5, 0.5)
if i.owned > 0: if i_item.owned > 0:
text "[i.owned]" size 10 align (0.02, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ] text "[i_item.owned]" size 10 align (0.02, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
vbox: vbox:
style_prefix gui.theme('achievements_filters') style_prefix gui.theme('achievements_filters')
pos (6, 384) pos (6, 384)