Skip to content

Commit

Permalink
Updated assetlib branch to v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dkollmann committed Jul 1, 2021
1 parent 42ca73c commit dd4de93
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 70 deletions.
2 changes: 1 addition & 1 deletion addons/easycpp/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
name="Easy C++"
description="Makes using C++ code easier."
author="Daniel Kollmann"
version="0.1"
version="0.2"
script="plugin.gd"
2 changes: 2 additions & 0 deletions addons/easycpp/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ func _enter_tree():

toolwindow = preload("res://addons/easycpp/scenes/tool_window.tscn").instance()

assert(toolwindow != null)

toolwindow.editorbase = get_editor_interface().get_base_control()

add_control_to_dock(DOCK_SLOT_LEFT_UL, toolwindow)
Expand Down
37 changes: 25 additions & 12 deletions addons/easycpp/scenes/buildconfiguration.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,88 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="PropertiesContainer" type="GridContainer" parent="."]
[node name="ScrollContainer" type="ScrollContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
scroll_horizontal_enabled = false
__meta__ = {
"_edit_use_anchors_": false
}

[node name="PropertiesContainer" type="GridContainer" parent="ScrollContainer"]
margin_right = 1024.0
margin_bottom = 408.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/vseparation = 4
custom_constants/hseparation = 4
columns = 2
__meta__ = {
"_edit_use_anchors_": false
}

[node name="NameLabel" type="Label" parent="PropertiesContainer"]
[node name="NameLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 5.0
margin_right = 165.0
margin_bottom = 19.0
text = "Name:"

[node name="NameLineEdit" type="LineEdit" parent="PropertiesContainer"]
[node name="NameLineEdit" type="LineEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_right = 1024.0
margin_bottom = 24.0
size_flags_horizontal = 3

[node name="EnabledLabel" type="Label" parent="PropertiesContainer"]
[node name="EnabledLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 33.0
margin_right = 165.0
margin_bottom = 47.0
text = "Enabled:"

[node name="EnabledCheckBox" type="CheckBox" parent="PropertiesContainer"]
[node name="EnabledCheckBox" type="CheckBox" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 28.0
margin_right = 193.0
margin_bottom = 52.0
size_flags_horizontal = 0

[node name="ArgumentsLabel" type="Label" parent="PropertiesContainer"]
[node name="ArgumentsLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 120.0
margin_right = 165.0
margin_bottom = 151.0
text = "Arguments:
(One argument per line.)"

[node name="ArgumentsEdit" type="TextEdit" parent="PropertiesContainer"]
[node name="ArgumentsEdit" type="TextEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 56.0
margin_right = 1024.0
margin_bottom = 216.0
rect_min_size = Vector2( 0, 160 )
size_flags_horizontal = 3

[node name="DefinesLabel" type="Label" parent="PropertiesContainer"]
[node name="DefinesLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 284.0
margin_right = 165.0
margin_bottom = 315.0
text = "Defines:
(One define per line.)"

[node name="DefinesEdit" type="TextEdit" parent="PropertiesContainer"]
[node name="DefinesEdit" type="TextEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 220.0
margin_right = 1024.0
margin_bottom = 380.0
rect_min_size = Vector2( 0, 160 )
size_flags_horizontal = 3

[node name="DebugLibLabel" type="Label" parent="PropertiesContainer"]
[node name="DebugLibLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 389.0
margin_right = 165.0
margin_bottom = 403.0
text = "Use debug libraries:"

[node name="DebugLibCheckbox" type="CheckBox" parent="PropertiesContainer"]
[node name="DebugLibCheckbox" type="CheckBox" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 384.0
margin_right = 193.0
Expand Down
54 changes: 32 additions & 22 deletions addons/easycpp/scenes/buildplatform.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,135 +10,145 @@ __meta__ = {
"_edit_use_anchors_": false
}

[node name="PropertiesContainer" type="GridContainer" parent="."]
[node name="ScrollContainer" type="ScrollContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
scroll_horizontal_enabled = false
__meta__ = {
"_edit_use_anchors_": false
}

[node name="PropertiesContainer" type="GridContainer" parent="ScrollContainer"]
margin_right = 1024.0
margin_bottom = 492.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/vseparation = 4
custom_constants/hseparation = 4
columns = 2

[node name="NameLabel" type="Label" parent="PropertiesContainer"]
[node name="NameLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 5.0
margin_right = 165.0
margin_bottom = 19.0
text = "Name:"

[node name="NameLineEdit" type="LineEdit" parent="PropertiesContainer"]
[node name="NameLineEdit" type="LineEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_right = 1024.0
margin_bottom = 24.0
size_flags_horizontal = 3

[node name="EnabledLabel" type="Label" parent="PropertiesContainer"]
[node name="EnabledLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 33.0
margin_right = 165.0
margin_bottom = 47.0
text = "Enabled:"

[node name="EnabledCheckBox" type="CheckBox" parent="PropertiesContainer"]
[node name="EnabledCheckBox" type="CheckBox" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 28.0
margin_right = 193.0
margin_bottom = 52.0
size_flags_horizontal = 0

[node name="AvailableOnLabel" type="Label" parent="PropertiesContainer"]
[node name="AvailableOnLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 61.0
margin_right = 165.0
margin_bottom = 75.0
text = "Available on:"

[node name="AvailableOnContainer" type="HBoxContainer" parent="PropertiesContainer"]
[node name="AvailableOnContainer" type="HBoxContainer" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 56.0
margin_right = 1024.0
margin_bottom = 80.0
size_flags_horizontal = 3

[node name="WindowsCheckBox" type="CheckBox" parent="PropertiesContainer/AvailableOnContainer"]
[node name="WindowsCheckBox" type="CheckBox" parent="ScrollContainer/PropertiesContainer/AvailableOnContainer"]
margin_right = 86.0
margin_bottom = 24.0
text = "Windows"

[node name="LinuxCheckBox" type="CheckBox" parent="PropertiesContainer/AvailableOnContainer"]
[node name="LinuxCheckBox" type="CheckBox" parent="ScrollContainer/PropertiesContainer/AvailableOnContainer"]
margin_left = 90.0
margin_right = 189.0
margin_bottom = 24.0
text = "Linux / X11"

[node name="MacOSCheckBox" type="CheckBox" parent="PropertiesContainer/AvailableOnContainer"]
[node name="MacOSCheckBox" type="CheckBox" parent="ScrollContainer/PropertiesContainer/AvailableOnContainer"]
margin_left = 193.0
margin_right = 266.0
margin_bottom = 24.0
text = "macOS"

[node name="ArgumentsLabel" type="Label" parent="PropertiesContainer"]
[node name="ArgumentsLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 148.0
margin_right = 165.0
margin_bottom = 179.0
text = "Arguments:
(One argument per line.)"

[node name="ArgumentsEdit" type="TextEdit" parent="PropertiesContainer"]
[node name="ArgumentsEdit" type="TextEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 84.0
margin_right = 1024.0
margin_bottom = 244.0
rect_min_size = Vector2( 0, 160 )
size_flags_horizontal = 3

[node name="DefinesLabel" type="Label" parent="PropertiesContainer"]
[node name="DefinesLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 312.0
margin_right = 165.0
margin_bottom = 343.0
text = "Defines:
(One define per line.)"

[node name="DefinesEdit" type="TextEdit" parent="PropertiesContainer"]
[node name="DefinesEdit" type="TextEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 248.0
margin_right = 1024.0
margin_bottom = 408.0
rect_min_size = Vector2( 0, 160 )
size_flags_horizontal = 3

[node name="OutputLabel" type="Label" parent="PropertiesContainer"]
[node name="OutputLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 417.0
margin_right = 165.0
margin_bottom = 431.0
text = "Output:"

[node name="OutputLineEdit" type="LineEdit" parent="PropertiesContainer"]
[node name="OutputLineEdit" type="LineEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 412.0
margin_right = 1024.0
margin_bottom = 436.0
size_flags_horizontal = 3

[node name="GDNLIBLabel" type="Label" parent="PropertiesContainer"]
[node name="GDNLIBLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 445.0
margin_right = 165.0
margin_bottom = 459.0
text = "GDNLIB Key:"

[node name="GDNLIBLineEdit" type="LineEdit" parent="PropertiesContainer"]
[node name="GDNLIBLineEdit" type="LineEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 440.0
margin_right = 1024.0
margin_bottom = 464.0
size_flags_horizontal = 3

[node name="VSToolchainLabel" type="Label" parent="PropertiesContainer"]
[node name="VSToolchainLabel" type="Label" parent="ScrollContainer/PropertiesContainer"]
margin_top = 473.0
margin_right = 165.0
margin_bottom = 487.0
text = "Visual Studio Toolchain:"

[node name="VSToolchainLineEdit" type="LineEdit" parent="PropertiesContainer"]
[node name="VSToolchainLineEdit" type="LineEdit" parent="ScrollContainer/PropertiesContainer"]
margin_left = 169.0
margin_top = 468.0
margin_right = 1024.0
margin_bottom = 492.0
size_flags_horizontal = 3

[connection signal="text_changed" from="PropertiesContainer/NameLineEdit" to="." method="_on_NameLineEdit_text_changed"]
[connection signal="text_changed" from="ScrollContainer/PropertiesContainer/NameLineEdit" to="." method="_on_NameLineEdit_text_changed"]
5 changes: 3 additions & 2 deletions addons/easycpp/scenes/settings.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ __meta__ = {
}

[node name="HBoxContainer" type="HBoxContainer" parent="SettingsContainer"]
visible = false
margin_right = 784.0
margin_bottom = 34.0
alignment = 2
Expand All @@ -44,14 +45,12 @@ margin_bottom = 34.0
text = "Show All Settings"

[node name="TabContainer" type="TabContainer" parent="SettingsContainer"]
margin_top = 44.0
margin_right = 784.0
margin_bottom = 540.0
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="Settings" type="Tabs" parent="SettingsContainer/TabContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
Expand Down Expand Up @@ -206,6 +205,7 @@ caret_blink = true
caret_blink_speed = 0.5

[node name="Build Platforms" type="Tabs" parent="SettingsContainer/TabContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
Expand All @@ -217,6 +217,7 @@ margin_bottom = -4.0
tabtype = ExtResource( 6 )

[node name="Build Configurations" type="Tabs" parent="SettingsContainer/TabContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
Expand Down
2 changes: 2 additions & 0 deletions addons/easycpp/scenes/tabcontrol.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ text = "Delete Selected"
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 24.0
size_flags_horizontal = 3
size_flags_vertical = 3

[connection signal="pressed" from="VBoxContainer/HBoxContainer/AddButton" to="." method="_on_AddButton_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/DuplicateButton" to="." method="_on_DuplicateButton_pressed"]
Expand Down
22 changes: 11 additions & 11 deletions addons/easycpp/scripts/buildconfigurationsetting.gd
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
tool
extends Tabs
extends BuildSetting


func setobj(bld :BuildConfiguration) -> void:
name = bld.name

$PropertiesContainer/NameLineEdit.text = bld.name
$PropertiesContainer/EnabledCheckBox.pressed = bld.enabled
$PropertiesContainer/ArgumentsEdit.text = PoolStringArray(bld.arguments).join("\n")
$PropertiesContainer/DefinesEdit.text = PoolStringArray(bld.defines).join("\n")
$PropertiesContainer/DebugLibCheckbox.pressed = bld.debuglibs
$ScrollContainer/PropertiesContainer/NameLineEdit.text = bld.name
$ScrollContainer/PropertiesContainer/EnabledCheckBox.pressed = bld.enabled
$ScrollContainer/PropertiesContainer/ArgumentsEdit.text = PoolStringArray(bld.arguments).join("\n")
$ScrollContainer/PropertiesContainer/DefinesEdit.text = PoolStringArray(bld.defines).join("\n")
$ScrollContainer/PropertiesContainer/DebugLibCheckbox.pressed = bld.debuglibs


func createobj() -> BuildConfiguration:
var bld := BuildConfiguration.new()

bld.name = $PropertiesContainer/NameLineEdit.text.strip_edges()
bld.enabled = $PropertiesContainer/EnabledCheckBox.pressed
bld.arguments = Utils.split_clean($PropertiesContainer/ArgumentsEdit.text, "\n", false)
bld.defines = Utils.split_clean($PropertiesContainer/DefinesEdit.text, "\n", false)
bld.debuglibs = $PropertiesContainer/DebugLibCheckbox.pressed
bld.name = $ScrollContainer/PropertiesContainer/NameLineEdit.text.strip_edges()
bld.enabled = $ScrollContainer/PropertiesContainer/EnabledCheckBox.pressed
bld.arguments = Utils.split_clean($ScrollContainer/PropertiesContainer/ArgumentsEdit.text, "\n", false)
bld.defines = Utils.split_clean($ScrollContainer/PropertiesContainer/DefinesEdit.text, "\n", false)
bld.debuglibs = $ScrollContainer/PropertiesContainer/DebugLibCheckbox.pressed

return bld

Expand Down
Loading

0 comments on commit dd4de93

Please sign in to comment.