feat: update addon
This commit is contained in:
parent
2497befa7c
commit
0b32dc7c3c
10 changed files with 217 additions and 143 deletions
|
|
@ -2,7 +2,7 @@
|
|||
extends LineEdit
|
||||
class_name CustomLineEdit
|
||||
|
||||
signal valueHasChanged(newValue)
|
||||
signal valueHasChanged(newValue : Variant)
|
||||
|
||||
enum TYPE { INT, TEXT, FLOAT }
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ enum TYPE { INT, TEXT, FLOAT }
|
|||
@export var step : float = 1
|
||||
var oldValue : String = ""
|
||||
|
||||
var value:
|
||||
var value : Variant :
|
||||
get:
|
||||
return getTypedValue(text)
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ func valueUpdated(newText : String) -> void:
|
|||
valueHasChanged.emit(value)
|
||||
|
||||
|
||||
func setValue(value) -> void:
|
||||
func setValue(value : Variant) -> void:
|
||||
text = str(getTypedValue(str(value)))
|
||||
|
||||
|
||||
|
|
|
|||
78
addons/LevelEditor/UI/Troop/Troop.tscn
Normal file
78
addons/LevelEditor/UI/Troop/Troop.tscn
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://djrbvm8gmhly3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1kvxw2v3htp3" path="res://addons/LevelEditor/UI/Troop/TroopMaker.gd" id="1_0rptq"]
|
||||
[ext_resource type="Script" uid="uid://bpv75ucqoy446" path="res://addons/LevelEditor/UI/CustomLineEdit.gd" id="2_f48bo"]
|
||||
[ext_resource type="Script" uid="uid://b47p2u458hsn0" path="res://addons/LevelEditor/UI/CustomOptionButton.gd" id="3_dvkum"]
|
||||
|
||||
[node name="Troop" type="VBoxContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_0rptq")
|
||||
|
||||
[node name="HBC" type="HBoxContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DelayEdit" type="LineEdit" parent="HBC"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_f48bo")
|
||||
inputType = 2
|
||||
step = 0.2
|
||||
metadata/_custom_type_script = "uid://bpv75ucqoy446"
|
||||
|
||||
[node name="Label" type="Label" parent="HBC"]
|
||||
layout_mode = 2
|
||||
text = " .sec"
|
||||
|
||||
[node name="HBC2" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TroopLabel" type="Label" parent="HBC2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RemoveButton" type="Button" parent="HBC2"]
|
||||
layout_mode = 2
|
||||
text = "Supprimer"
|
||||
|
||||
[node name="HBC3" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Quantity" type="LineEdit" parent="HBC3"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_f48bo")
|
||||
metadata/_custom_type_script = "uid://bpv75ucqoy446"
|
||||
|
||||
[node name="Label" type="Label" parent="HBC3"]
|
||||
layout_mode = 2
|
||||
text = " x "
|
||||
|
||||
[node name="EnemySelect" type="OptionButton" parent="HBC3"]
|
||||
layout_mode = 2
|
||||
allow_reselect = true
|
||||
script = ExtResource("3_dvkum")
|
||||
metadata/_custom_type_script = "uid://b47p2u458hsn0"
|
||||
|
||||
[node name="HBC4" type="HBoxContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBC4"]
|
||||
layout_mode = 2
|
||||
text = "Voie : "
|
||||
|
||||
[node name="SpawnSelect" type="OptionButton" parent="HBC4"]
|
||||
layout_mode = 2
|
||||
allow_reselect = true
|
||||
script = ExtResource("3_dvkum")
|
||||
metadata/_custom_type_script = "uid://b47p2u458hsn0"
|
||||
|
||||
[node name="HBC5" type="HBoxContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SplitTroopButton" type="Button" parent="HBC5"]
|
||||
layout_mode = 2
|
||||
text = "Séparer"
|
||||
63
addons/LevelEditor/UI/Troop/TroopMaker.gd
Normal file
63
addons/LevelEditor/UI/Troop/TroopMaker.gd
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
@tool
|
||||
extends VBoxContainer
|
||||
class_name TroopMaker
|
||||
|
||||
|
||||
signal troopDeleted
|
||||
signal troopChanged
|
||||
|
||||
|
||||
var troop : Troop
|
||||
var troopNumber : int
|
||||
|
||||
|
||||
@onready var delayEdit : CustomLineEdit = $HBC/DelayEdit
|
||||
@onready var qtyEdit : CustomLineEdit = $HBC3/Quantity
|
||||
@onready var enemySelect : CustomOptionButton = $HBC3/EnemySelect
|
||||
@onready var spawnSelect : CustomOptionButton = $HBC4/SpawnSelect
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$HBC2/RemoveButton.pressed.connect(troopDeleted.emit)
|
||||
$HBC5/SplitTroopButton.pressed.connect(delayHasChanged.bind(1))
|
||||
delayEdit.valueHasChanged.connect(delayHasChanged)
|
||||
qtyEdit.valueHasChanged.connect(func(value): troop.number_to_spawn = value)
|
||||
enemySelect.onValueChanged.connect(func(value): troop.enemy = value)
|
||||
spawnSelect.onValueChanged.connect(func(value): troop.lane_to_spawn = int(value))
|
||||
|
||||
initTrop.call_deferred()
|
||||
|
||||
|
||||
func delayHasChanged(newTime : float) -> void:
|
||||
$HBC5.visible = newTime == 0
|
||||
$HBC.visible = !$HBC5.visible
|
||||
var oldTime : float = troop.spawn_delay
|
||||
troop.spawn_delay = newTime
|
||||
if !newTime || !oldTime:
|
||||
troopChanged.emit()
|
||||
|
||||
|
||||
func setTroop(_troop : Troop, _troopNumber : int) -> void:
|
||||
troop = _troop
|
||||
troopNumber = _troopNumber + 1
|
||||
|
||||
|
||||
func initTrop():
|
||||
delayEdit.setValue(troop.spawn_delay)
|
||||
$HBC2/TroopLabel.text = "Troop N°" + str(troopNumber)
|
||||
qtyEdit.setValue(troop.number_to_spawn)
|
||||
$HBC5.visible = troop.spawn_delay == 0
|
||||
$HBC.visible = !$HBC5.visible
|
||||
|
||||
var mainMenu : WaveMaker = EditorInterface.get_editor_main_screen().get_node("Menu")
|
||||
mainMenu.spawnQtyChanged.connect(createSpawnOptions)
|
||||
createSpawnOptions(mainMenu.level.laneCount)
|
||||
enemySelect.setOptions(mainMenu.enemies)
|
||||
|
||||
|
||||
func createSpawnOptions(laneCount : int) -> void:
|
||||
spawnSelect.clear()
|
||||
$HBC4.visible = laneCount > 1
|
||||
if laneCount - 1:
|
||||
for i in laneCount:
|
||||
spawnSelect.addOption(str(i), str(i + 1))
|
||||
1
addons/LevelEditor/UI/Troop/TroopMaker.gd.uid
Normal file
1
addons/LevelEditor/UI/Troop/TroopMaker.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://1kvxw2v3htp3
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://s1lfc81j20la"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dv7ow5e7jj355" path="res://Assets/Fonts/Grandstander/static/Grandstander-Light.ttf" id="1_r6cgw"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_r6cgw")
|
||||
font_size = 24
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[gd_resource type="Theme" format=3 uid="uid://bvji8e8p2d72y"]
|
||||
|
||||
[resource]
|
||||
default_font_size = 20
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://bee458c1kc0j7"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://ctmfgwv1dwdyg" path="res://Assets/Fonts/Grandstander/static/Grandstander-BoldItalic.ttf" id="1_kyxue"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_kyxue")
|
||||
font_size = 24
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://cafoo04y1t31t"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://byqqml5g6dwil" path="res://Assets/Fonts/Grandstander/static/Grandstander-BlackItalic.ttf" id="1_m52f8"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_m52f8")
|
||||
font_size = 32
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
@tool
|
||||
extends Control
|
||||
class_name WaveMaker
|
||||
|
||||
signal spawnQtyChanged(newQty : int)
|
||||
|
||||
const LEVEL_PATH : String = "res://Levels/"
|
||||
const LEVEL_REGEX_PATERN : String = "(level_.*)\\.tres$"
|
||||
|
|
@ -8,19 +11,18 @@ const LEVEL_PATH_REGEX_PATERN : String = "res://Levels/[^/]*/$"
|
|||
const ENEMY_PATH : String = "res://enemies/"
|
||||
const ENEMY_REGEX_PATERN : String = "(enemy.*)\\.tscn$"
|
||||
|
||||
const BASE_LABEL_SETTINGS = preload("res://addons/LevelEditor/UI/baseLabel.tres")
|
||||
const WAVE_LABEL_SETTINGS = preload("res://addons/LevelEditor/UI/waveLabel.tres")
|
||||
const TROOP_LABEL_SETTINGS = preload("res://addons/LevelEditor/UI/troopLabel.tres")
|
||||
const TROOP_SCENE = preload("res://addons/LevelEditor/UI/Troop/Troop.tscn")
|
||||
|
||||
const space_multiplicator : int = 10
|
||||
enum DIRECTION { UP, DOWN, TOP, LEFT, VERTICAL, HORIZONTAL}
|
||||
|
||||
var enemies : Dictionary
|
||||
|
||||
@onready var autoLaunchLevel : CheckButton = $VBoxContainer2/ButtonContainer2/AutoLaunchLevel
|
||||
@onready var levelSelect : CustomOptionButton = $VBoxContainer2/HBoxContainer/LevelSelect
|
||||
@onready var waveTabContainer : TabContainer = $VBoxContainer2/ScrollContainer/WaveContainer
|
||||
@onready var towerSelector : ItemList = $VBoxContainer2/ButtonContainer5/TowerSelector
|
||||
@onready var autoLaunchLevel : CheckButton = $VBC/HBC3/AutoLaunchLevel
|
||||
@onready var levelSelect : CustomOptionButton = $VBC/HBC/LevelSelect
|
||||
@onready var spawnQty : CustomLineEdit = $VBC/HBC4/SpawnQty
|
||||
@onready var waveTabContainer : TabContainer = $VBC/ScrollContainer/WaveContainer
|
||||
@onready var towerSelector : ItemList = $VBC/HBC5/TowerSelector
|
||||
|
||||
var level : Level
|
||||
var currentWave : int = -1
|
||||
|
|
@ -53,6 +55,7 @@ func buildTree() -> void:
|
|||
|
||||
manageAllowedTowers()
|
||||
autoLaunchLevel.button_pressed = level.auto_start
|
||||
spawnQty.setValue(level.laneCount)
|
||||
for i in level.waves.size():
|
||||
waveTabContainer.add_child(buildWave(level.waves[i]))
|
||||
|
||||
|
|
@ -76,18 +79,6 @@ func buildWave(wave : Wave) -> VBoxContainer:
|
|||
!troopContainer.get_child(troopContainer.get_child_count() - 1).has_meta("troop_group"):
|
||||
troopContainer.add_child(HSeparator.new())
|
||||
|
||||
if troop.spawn_delay:
|
||||
var timeSeparator : HBoxContainer = buildInputLabel(
|
||||
func(newValue):
|
||||
troop.spawn_delay = newValue
|
||||
if newValue == 0:
|
||||
refreshWaveNode(level.waves[currentWave], currentWave),
|
||||
troop.spawn_delay,
|
||||
CustomLineEdit.TYPE.FLOAT,
|
||||
"sec."
|
||||
)
|
||||
troopContainer.add_child(timeSeparator)
|
||||
|
||||
var nodeToAppend : BoxContainer = troopContainer
|
||||
if i < wave.troops.size() -1 && wave.troops[i + 1].spawn_delay == 0:
|
||||
if i == 0 || !troopContainer.get_child(troopContainer.get_child_count() - 1).has_meta("troop_group"):
|
||||
|
|
@ -100,21 +91,8 @@ func buildWave(wave : Wave) -> VBoxContainer:
|
|||
nodeToAppend = troopContainer.get_child(troopContainer.get_child_count() - 1)
|
||||
nodeToAppend.add_child(VSeparator.new())
|
||||
|
||||
var ennemyContainer : VBoxContainer = VBoxContainer.new()
|
||||
ennemyContainer.add_child(createSection("Troop N°" + str(i + 1), removeTroop.bind(troop, wave), TROOP_LABEL_SETTINGS))
|
||||
nodeToAppend.add_child(createTroop(troop, wave))
|
||||
|
||||
if troop.spawn_delay == 0:
|
||||
var button : Button = Button.new()
|
||||
button.text = "Séparer"
|
||||
button.pressed.connect(
|
||||
func():
|
||||
troop.spawn_delay = 1
|
||||
refreshWaveNode(level.waves[currentWave], currentWave),
|
||||
)
|
||||
ennemyContainer.add_child(button)
|
||||
|
||||
buildTroop(troop, ennemyContainer)
|
||||
nodeToAppend.add_child(ennemyContainer)
|
||||
|
||||
var addTroopBtn : Button = Button.new()
|
||||
addTroopBtn.text = "Ajouter une troupe"
|
||||
|
|
@ -124,59 +102,13 @@ func buildWave(wave : Wave) -> VBoxContainer:
|
|||
return troopContainer
|
||||
|
||||
|
||||
func createTroop(troop : Troop, wave : Wave) -> TroopMaker:
|
||||
var enemyContainer : TroopMaker = TROOP_SCENE.instantiate()
|
||||
enemyContainer.setTroop(troop, wave.troops.find(troop))
|
||||
enemyContainer.troopDeleted.connect(removeTroop.bind(troop, wave))
|
||||
enemyContainer.troopChanged.connect(refreshWaveNode.bind(wave, level.waves.find(wave)))
|
||||
|
||||
func buildTroop(troop : Troop, ennemyContainer : VBoxContainer) -> void:
|
||||
var qtyEdit : HBoxContainer = buildInputLabel(
|
||||
func(newValue): troop.number_to_spawn = newValue,
|
||||
troop.number_to_spawn,
|
||||
CustomLineEdit.TYPE.INT,
|
||||
"x"
|
||||
)
|
||||
|
||||
var enemySelector : CustomOptionButton = CustomOptionButton.new()
|
||||
enemySelector.onValueChanged.connect(func(resourcePath): troop.enemy = resourcePath)
|
||||
enemySelector.setOptions(enemies, troop.enemy)
|
||||
|
||||
qtyEdit.add_child(enemySelector)
|
||||
ennemyContainer.add_child(qtyEdit)
|
||||
|
||||
|
||||
func buildInputLabel(updateCallback : Callable, delay : float, type : CustomLineEdit.TYPE, text : String = "") -> HBoxContainer:
|
||||
var container : HBoxContainer = HBoxContainer.new()
|
||||
container.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
container.alignment = BoxContainer.ALIGNMENT_CENTER
|
||||
|
||||
var timeEdit : CustomLineEdit = CustomLineEdit.new()
|
||||
timeEdit.inputType = type
|
||||
timeEdit.setValue(delay)
|
||||
timeEdit.valueHasChanged.connect(updateCallback)
|
||||
container.add_child(timeEdit)
|
||||
|
||||
if text:
|
||||
var label : Label = Label.new()
|
||||
label.text = text
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
label.label_settings = BASE_LABEL_SETTINGS
|
||||
container.add_child(label)
|
||||
|
||||
return container
|
||||
|
||||
|
||||
func createSection(sectionName : String, BtnCallback : Callable, settings : LabelSettings = BASE_LABEL_SETTINGS) -> HSplitContainer :
|
||||
var container : HSplitContainer = HSplitContainer.new()
|
||||
|
||||
var label : Label = Label.new()
|
||||
label.text = sectionName
|
||||
label.label_settings = settings
|
||||
|
||||
var button : Button = Button.new()
|
||||
button.text = "Supprimer"
|
||||
button.pressed.connect(BtnCallback)
|
||||
|
||||
container.add_child(label)
|
||||
container.add_child(button)
|
||||
|
||||
return container
|
||||
return enemyContainer
|
||||
|
||||
|
||||
func cleanMenu() -> void:
|
||||
|
|
@ -300,3 +232,8 @@ func recreateTabBar() -> void:
|
|||
waveTabBar.set_tab_title(i, "Vague N°" + str(i + 1))
|
||||
else:
|
||||
waveTabBar.remove_tab(i)
|
||||
|
||||
|
||||
func onSpawnQtyChange(newValue: int) -> void:
|
||||
level.laneCount = newValue
|
||||
spawnQtyChanged.emit(newValue)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://dh24t8804isms"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dh24t8804isms"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://27y0jliv6ckx" path="res://addons/LevelEditor/WaveMaker.gd" id="1_usfft"]
|
||||
[ext_resource type="Script" uid="uid://b47p2u458hsn0" path="res://addons/LevelEditor/UI/CustomOptionButton.gd" id="2_xjxpq"]
|
||||
[ext_resource type="Script" uid="uid://bpv75ucqoy446" path="res://addons/LevelEditor/UI/CustomLineEdit.gd" id="3_qw7ts"]
|
||||
|
||||
[node name="Menu" type="HBoxContainer"]
|
||||
offset_right = 885.0
|
||||
|
|
@ -10,66 +11,84 @@ size_flags_horizontal = 3
|
|||
size_flags_vertical = 3
|
||||
script = ExtResource("1_usfft")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
[node name="Margin" type="MarginContainer" parent="."]
|
||||
custom_minimum_size = Vector2(20, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
|
||||
[node name="VBC" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer2"]
|
||||
[node name="Margin" type="MarginContainer" parent="VBC"]
|
||||
custom_minimum_size = Vector2(0, 20)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer2"]
|
||||
[node name="HBC" type="HBoxContainer" parent="VBC"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="LevelSelect" type="OptionButton" parent="VBoxContainer2/HBoxContainer"]
|
||||
[node name="LevelSelect" type="OptionButton" parent="VBC/HBC"]
|
||||
layout_mode = 2
|
||||
selected = 0
|
||||
allow_reselect = true
|
||||
item_count = 2
|
||||
popup/item_0/text = "level_1"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "level_2"
|
||||
popup/item_1/id = 1
|
||||
script = ExtResource("2_xjxpq")
|
||||
metadata/_custom_type_script = "uid://b47p2u458hsn0"
|
||||
|
||||
[node name="NewLevel" type="Button" parent="VBoxContainer2/HBoxContainer"]
|
||||
[node name="NewLevel" type="Button" parent="VBC/HBC"]
|
||||
layout_mode = 2
|
||||
text = "Nouveau Niveau"
|
||||
|
||||
[node name="Save" type="Button" parent="VBoxContainer2/HBoxContainer"]
|
||||
[node name="Save" type="Button" parent="VBC/HBC"]
|
||||
layout_mode = 2
|
||||
text = "Sauvegarder"
|
||||
|
||||
[node name="RefreshUI" type="Button" parent="VBoxContainer2/HBoxContainer"]
|
||||
[node name="RefreshUI" type="Button" parent="VBC/HBC"]
|
||||
layout_mode = 2
|
||||
text = "Rafraichir"
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="VBoxContainer2"]
|
||||
[node name="HBC2" type="HBoxContainer" parent="VBC"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Add wave" type="Button" parent="VBoxContainer2/ButtonContainer"]
|
||||
[node name="Add wave" type="Button" parent="VBC/HBC2"]
|
||||
layout_mode = 2
|
||||
text = "Ajouter une vague"
|
||||
|
||||
[node name="RemoveWave" type="Button" parent="VBoxContainer2/ButtonContainer"]
|
||||
[node name="RemoveWave" type="Button" parent="VBC/HBC2"]
|
||||
layout_mode = 2
|
||||
text = "Suprimer la vague"
|
||||
|
||||
[node name="ButtonContainer2" type="HBoxContainer" parent="VBoxContainer2"]
|
||||
[node name="HBC3" type="HBoxContainer" parent="VBC"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AutoLaunchLevel" type="CheckButton" parent="VBoxContainer2/ButtonContainer2"]
|
||||
[node name="AutoLaunchLevel" type="CheckButton" parent="VBC/HBC3"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer2/ButtonContainer2"]
|
||||
[node name="Label" type="Label" parent="VBC/HBC3"]
|
||||
layout_mode = 2
|
||||
text = "Lancer le niveau auto. "
|
||||
|
||||
[node name="ButtonContainer5" type="HBoxContainer" parent="VBoxContainer2"]
|
||||
[node name="HBC4" type="HBoxContainer" parent="VBC"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SpawnQty" type="LineEdit" parent="VBC/HBC4"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("3_qw7ts")
|
||||
metadata/_custom_type_script = "uid://bpv75ucqoy446"
|
||||
|
||||
[node name="Label" type="Label" parent="VBC/HBC4"]
|
||||
layout_mode = 2
|
||||
text = " Nombre de voies"
|
||||
|
||||
[node name="HBC5" type="HBoxContainer" parent="VBC"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TowerSelector" type="ItemList" parent="VBoxContainer2/ButtonContainer5"]
|
||||
[node name="TowerSelector" type="ItemList" parent="VBC/HBC5"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
select_mode = 2
|
||||
|
|
@ -86,27 +105,28 @@ item_4/text = " EVAN "
|
|||
item_5/text = " ALEX "
|
||||
item_6/text = " GERALDINE "
|
||||
|
||||
[node name="MarginContainer4" type="MarginContainer" parent="VBoxContainer2"]
|
||||
[node name="Margin2" type="MarginContainer" parent="VBC"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer2"]
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBC"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="WaveContainer" type="TabContainer" parent="VBoxContainer2/ScrollContainer"]
|
||||
[node name="WaveContainer" type="TabContainer" parent="VBC/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
clip_tabs = false
|
||||
drag_to_rearrange_enabled = true
|
||||
|
||||
[connection signal="onValueChanged" from="VBoxContainer2/HBoxContainer/LevelSelect" to="." method="selectLevel"]
|
||||
[connection signal="pressed" from="VBoxContainer2/HBoxContainer/NewLevel" to="." method="_on_new_level_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer2/HBoxContainer/Save" to="." method="_on_save_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer2/HBoxContainer/RefreshUI" to="." method="resetApp"]
|
||||
[connection signal="pressed" from="VBoxContainer2/ButtonContainer/Add wave" to="." method="addWave"]
|
||||
[connection signal="pressed" from="VBoxContainer2/ButtonContainer/RemoveWave" to="." method="removeWave"]
|
||||
[connection signal="toggled" from="VBoxContainer2/ButtonContainer2/AutoLaunchLevel" to="." method="_on_auto_launch_wave_toggled"]
|
||||
[connection signal="multi_selected" from="VBoxContainer2/ButtonContainer5/TowerSelector" to="." method="onSelectedTowerChange"]
|
||||
[connection signal="active_tab_rearranged" from="VBoxContainer2/ScrollContainer/WaveContainer" to="." method="changeWaveOrder"]
|
||||
[connection signal="tab_changed" from="VBoxContainer2/ScrollContainer/WaveContainer" to="." method="tabFocusHaschanged"]
|
||||
[connection signal="onValueChanged" from="VBC/HBC/LevelSelect" to="." method="selectLevel"]
|
||||
[connection signal="pressed" from="VBC/HBC/NewLevel" to="." method="_on_new_level_pressed"]
|
||||
[connection signal="pressed" from="VBC/HBC/Save" to="." method="_on_save_pressed"]
|
||||
[connection signal="pressed" from="VBC/HBC/RefreshUI" to="." method="resetApp"]
|
||||
[connection signal="pressed" from="VBC/HBC2/Add wave" to="." method="addWave"]
|
||||
[connection signal="pressed" from="VBC/HBC2/RemoveWave" to="." method="removeWave"]
|
||||
[connection signal="toggled" from="VBC/HBC3/AutoLaunchLevel" to="." method="_on_auto_launch_wave_toggled"]
|
||||
[connection signal="valueHasChanged" from="VBC/HBC4/SpawnQty" to="." method="onSpawnQtyChange"]
|
||||
[connection signal="multi_selected" from="VBC/HBC5/TowerSelector" to="." method="onSelectedTowerChange"]
|
||||
[connection signal="active_tab_rearranged" from="VBC/ScrollContainer/WaveContainer" to="." method="changeWaveOrder"]
|
||||
[connection signal="tab_changed" from="VBC/ScrollContainer/WaveContainer" to="." method="tabFocusHaschanged"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue