Better text interpolation in screens

This commit is contained in:
Gouvernathor 2023-11-16 17:42:55 +01:00
parent def10a09ac
commit 14607f2eb1
2 changed files with 5 additions and 5 deletions

View File

@ -132,7 +132,7 @@ screen brewing_menu(xx, yy):
add image_zoom align (0.5, 0.5)
if i.owned > 0:
text str(i.owned) size 10 align (0.02, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
text "[i.owned]" size 10 align (0.02, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
vbox:
style_prefix gui.theme('achievements_filters')
pos (6, 384)
@ -198,9 +198,9 @@ screen brewing_menuitem(xx, yy):
if ingredient.infinite:
text "{unicode}∞{/unicode}" size 20 align (0.1, 0.1) offset(-1, -9) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
text str(ingredient.owned) size 10 align (0.1, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
text "[ingredient.owned]" size 10 align (0.1, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
else:
text str(ingredient.owned) size 10 align (0.1, 0.1) color "#ff0000" outlines [ (1, "#000", 0, 0) ]
text "[ingredient.owned]" size 10 align (0.1, 0.1) color "#ff0000" outlines [ (1, "#000", 0, 0) ]
frame:
style "empty"
@ -219,7 +219,7 @@ screen brewing_menuitem(xx, yy):
tooltip current_item.name
if current_item.owned > 0:
text str(current_item.owned) size 14 align (0.1, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
text "[current_item.owned]" size 14 align (0.1, 0.1) color "#ffffff" outlines [ (1, "#000", 0, 0) ]
imagebutton:
if current_item.has_ingredients():

View File

@ -382,7 +382,7 @@ screen inventory_menuitem(xx, yy):
if current_item.infinite:
text "{unicode}∞{/unicode}" size 30 align (0.1, 0.1) offset(-2, -10) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
text str(current_item.owned) size 14 align (0.1, 0.1) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "[current_item.owned]" size 14 align (0.1, 0.1) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
elif current_category == "Decorations":
if current_item.in_use:
add "interface/topbar/icon_check.webp" anchor (1.0, 1.0) align (1.0, 1.0) offset (-6, -6)