new font and menu tweaks, created bishop and knight character
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
extends Area2D
|
||||
class_name List
|
||||
|
||||
var current_item = 0
|
||||
|
||||
@onready var label: Label = $Label
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
@@ -12,5 +15,33 @@ func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func set_list(items: Array[Resource]):
|
||||
func set_mask_list(items: Array[MaskResource]):
|
||||
print(items)
|
||||
current_item = 0
|
||||
if items.size() == 0:
|
||||
label.text = "..."
|
||||
|
||||
func set_chara_list(items: Array[CharacterResource]):
|
||||
print(items)
|
||||
current_item = 0
|
||||
if items.size() == 0:
|
||||
label.text = "..."
|
||||
|
||||
|
||||
func cycle_through_items() -> void:
|
||||
current_item += 1
|
||||
print(current_item)
|
||||
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_POINTING_HAND)
|
||||
|
||||
|
||||
func _on_mouse_exited() -> void:
|
||||
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
|
||||
|
||||
|
||||
func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
|
||||
if event is InputEventMouseButton and event.is_pressed():
|
||||
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
|
||||
cycle_through_items()
|
||||
|
||||
@@ -11,3 +11,19 @@ script = ExtResource("1_khygj")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=579673425]
|
||||
shape = SubResource("CapsuleShape2D_trceg")
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1624172949]
|
||||
z_index = 10
|
||||
custom_minimum_size = Vector2(360, 0)
|
||||
offset_left = -179.0
|
||||
offset_top = -257.0
|
||||
offset_right = 121.0
|
||||
offset_bottom = -209.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "..."
|
||||
autowrap_mode = 3
|
||||
|
||||
[connection signal="input_event" from="." to="." method="_on_input_event"]
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
||||
|
||||
Reference in New Issue
Block a user