ani
This commit is contained in:
@@ -221,7 +221,6 @@ func _build_home() -> Control:
|
||||
var spacer := Control.new()
|
||||
spacer.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
col.add_child(spacer)
|
||||
_build_skin_row(col)
|
||||
return screen
|
||||
|
||||
|
||||
@@ -620,29 +619,6 @@ func _add_button(parent: Container, text: String, callback: Callable) -> void:
|
||||
parent.add_child(btn)
|
||||
|
||||
|
||||
func _build_skin_row(parent: Container) -> void:
|
||||
var skin_mgr := get_node_or_null("/root/SkinManager")
|
||||
if skin_mgr == null:
|
||||
return
|
||||
var row := HBoxContainer.new()
|
||||
row.add_theme_constant_override("separation", 12)
|
||||
parent.add_child(row)
|
||||
row.add_child(UITheme.caption("Character", 22))
|
||||
|
||||
var opt := OptionButton.new()
|
||||
opt.custom_minimum_size = Vector2(250, 46)
|
||||
var ids: Array = skin_mgr.get_skin_ids()
|
||||
ids.sort()
|
||||
for i in ids.size():
|
||||
opt.add_item(skin_mgr.get_skin(ids[i]).skin_name, i)
|
||||
opt.set_item_metadata(i, ids[i])
|
||||
if ids[i] == skin_mgr.active_skin_id:
|
||||
opt.select(i)
|
||||
opt.item_selected.connect(func(idx: int):
|
||||
skin_mgr.set_active_skin(opt.get_item_metadata(idx)))
|
||||
row.add_child(opt)
|
||||
|
||||
|
||||
func _play_music() -> void:
|
||||
# Menu music is scene-owned, so it stops the moment a level loads.
|
||||
var path := "res://assets/sounds/music_menu_premium.ogg"
|
||||
@@ -714,6 +690,7 @@ func _build_diorama() -> void:
|
||||
if skin and skin.model_path != "":
|
||||
var model := SkinnedPlayerModel.new()
|
||||
model.skin_id = skin_mgr.active_skin_id
|
||||
model.mecha_theme = str(skin.get("mecha_theme"))
|
||||
model.position = Vector3(0.35, 0, 0)
|
||||
model.rotation_degrees.y = 205.0
|
||||
world.add_child(model)
|
||||
|
||||
Reference in New Issue
Block a user