Interfaces, Bug fixes

This commit is contained in:
LoafyLemon 2024-11-09 13:12:27 +00:00
parent cd23aa6914
commit ff6fcc1ba0
2 changed files with 31 additions and 12 deletions

View File

@ -116,11 +116,11 @@ screen achievement_window(msg="", title="", icon=None, xpos=0, ypos=60):
timer 6.0 action Hide("achievement_window")
transform rotate_circular(t=7):
on show, appear, start:
subpixel True
rotate 0
linear t rotate 360
repeat
animation
subpixel True
rotate 0
linear t rotate 360
repeat
init python in achievements:
def validate():
@ -245,7 +245,9 @@ screen achievements():
fit_first True
button:
hbox:
add crop_image_zoom(item_data.icon, 48, 48, not item_unlocked) xysize (48, 48)
fixed:
xysize (48, 48)
add crop_image_zoom(item_data.icon, 48, 48, not item_unlocked) xysize (48, 48) fit "contain" align (0.5, 0.5)
null width 5
vbox:
text "[item_data.title]" color item_color

View File

@ -73,19 +73,20 @@ screen inventory():
grid 10 8:
ypos 32
xalign 0.5
spacing 2
for item in menu_items:
if item.owned > 0 or config.developer:
$ givable = (item.givable and states.active_girl in item.usable_on)
button:
xysize (48, 48)
if selected_item == item:
add "interface/achievements/glow.webp" align (0.5, 0.5) xysize (48, 48) alpha 0.7 at rotate_circular
style "inventory_item_button"
selected (selected_item == item)
add crop_image_zoom(item.get_image(), 48, 48, item.owned <= 0 or (inventory_mode==1 and not givable)) align (0.5, 0.5)
if item.used or (item.type=="decoration" and item.in_use):
add "interface/topbar/icon_check.webp" xysize (16, 16) offset (8, -8)
add "interface/topbar/icon_check.webp" xysize (16, 16) align (1.0, 1.0)
if item.owned > 1:
text "x[item.owned]" offset (-8, 34) size 12
text "{size=-4}x{/size}[item.owned]" size 12 align (0.0, 1.0) yoffset 3
if not (inventory_mode==1 and not givable):
action [SetScreenVariable("selected_item", item)]
@ -100,7 +101,11 @@ screen inventory():
hbox:
spacing 5
add selected_item.get_image() xysize(96, 96) align (0.05, 0.95)
fixed:
align (0.05, 0.95)
xysize (96, 96)
add Transform("wheelmenu_button", xysize=(96, 96))
add selected_item.get_image() xysize(96, 96)
vbox:
spacing 5
yalign 1.0
@ -125,4 +130,16 @@ screen inventory():
for i in item.usable_on:
add "wheelmenu_[i]" xysize (24, 24) yalign 0.5
if selected_item.owned > 1:
text "x[selected_item.owned]" align (0.0, 1.0)
text "{size=-4}x{/size}[selected_item.owned]" align (0.0, 1.0)
style inventory_item_button is empty:
background Transform("wheelmenu_button", xysize=(48,48))
hover_background At(Transform("wheelmenu_button_opaque", xysize=(48,48)), wheelmenu_hover_anim)
selected_background Fixed(Transform("wheelmenu_button", xysize=(48,48)), At(Transform("interface/achievements/glow.webp", align=(0.5, 0.5), size=(48, 48), alpha=0.5), rotate_circular))
selected_hover_background Fixed(At(Transform("wheelmenu_button_opaque", xysize=(48,48)), wheelmenu_hover_anim), At(Transform("interface/achievements/glow.webp", align=(0.5, 0.5), size=(48, 48), alpha=0.5), rotate_circular))
style inventory_item_big_button is empty:
background Transform("wheelmenu_button", xysize=(48,48))
hover_background At(Transform("wheelmenu_button_opaque", xysize=(48,48)), wheelmenu_hover_anim)
selected_background Fixed(Transform("wheelmenu_button", xysize=(48,48)), At(Transform("interface/achievements/glow.webp", align=(0.5, 0.5), size=(48, 48), alpha=0.5), rotate_circular))
selected_hover_background Fixed(At(Transform("wheelmenu_button_opaque", xysize=(48,48)), wheelmenu_hover_anim), At(Transform("interface/achievements/glow.webp", align=(0.5, 0.5), size=(48, 48), alpha=0.5), rotate_circular))