added more spell effects, fixed bomb effects, allow to pickup bomb...
This commit is contained in:
@@ -514,8 +514,9 @@ func _update_ui():
|
||||
sprite.scale = Vector2(2.0, 2.0) # 2x size as requested
|
||||
button.add_child(sprite)
|
||||
|
||||
# Add quantity label if item can have multiple (like arrows)
|
||||
if equipped_item.can_have_multiple_of and equipped_item.quantity > 1:
|
||||
# Add quantity label if item can have multiple (like arrows, bombs)
|
||||
var show_qty = equipped_item.can_have_multiple_of and (equipped_item.quantity > 1 or equipped_item.weapon_type == Item.WeaponType.BOMB)
|
||||
if show_qty:
|
||||
var quantity_label = Label.new()
|
||||
quantity_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
|
||||
quantity_label.vertical_alignment = VERTICAL_ALIGNMENT_TOP
|
||||
@@ -530,6 +531,7 @@ func _update_ui():
|
||||
font_file.font_data = dmg_font_resource
|
||||
quantity_label.add_theme_font_override("font", font_file)
|
||||
quantity_label.add_theme_font_size_override("font_size", 16)
|
||||
quantity_label.add_theme_color_override("font_color", Color.GREEN)
|
||||
quantity_label.z_index = 100 # High z-index to show above item sprite
|
||||
quantity_label.z_as_relative = false # Absolute z-index
|
||||
button.add_child(quantity_label)
|
||||
@@ -610,6 +612,7 @@ func _update_ui():
|
||||
font_file.font_data = dmg_font_resource
|
||||
quantity_label.add_theme_font_override("font", font_file)
|
||||
quantity_label.add_theme_font_size_override("font_size", 16)
|
||||
quantity_label.add_theme_color_override("font_color", Color.GREEN)
|
||||
quantity_label.z_index = 100 # High z-index to show above item sprite
|
||||
button.add_child(quantity_label)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user