added some frontend menu functionality to godmod

This commit is contained in:
BassS0ul 2023-08-13 13:39:45 -05:00
parent ef3c27b371
commit aeae4b58ed
106 changed files with 297 additions and 1031 deletions

View File

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false,
"grid_step": Vector2(8, 8),
"grid_visibility": 1,
"ofs": Vector2(-114.248, -94.2102),
"ofs": Vector2(-752.978, -405.893),
"primary_grid_steps": 8,
"show_edit_locks": true,
"show_guides": true,
@ -32,7 +32,7 @@ Anim={
"snap_rotation_step": 0.261799,
"snap_scale": false,
"snap_scale_step": 0.1,
"zoom": 1.33484
"zoom": 0.707107
}
3D={
"fov": 70.01,

View File

@ -1,5 +1,5 @@
[folding]
node_unfolds=[NodePath("HBoxContainer"), PackedStringArray("Material", "Layout/Transform", "Layout", "Theme Overrides", "Theme Overrides/constants"), NodePath("HBoxContainer/VBoxContainer/OptionButton_ModuleSettings"), PackedStringArray("item_count_array", "BiDi", "popup", "Input", "Tooltip"), NodePath("HBoxContainer/VBoxContainer2/OptionButton_Wizards"), PackedStringArray("Text Behavior", "Icon Behavior", "BiDi", "item_count_array")]
node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("HBoxContainer"), PackedStringArray("Material", "Layout/Transform", "Theme Overrides/constants", "Theme Overrides", "Layout"), NodePath("HBoxContainer/VBoxContainer/OptionButton_ModuleSettings"), PackedStringArray("item_count_array", "BiDi", "popup", "Input", "Tooltip"), NodePath("HBoxContainer/VBoxContainer2/OptionButton_Wizards"), PackedStringArray("Text Behavior", "Icon Behavior", "BiDi", "item_count_array"), NodePath("HBoxContainer/VBoxContainer3"), PackedStringArray("Layout"), NodePath("HBoxContainer/VBoxContainer3/GenreMenu/HBoxContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants", "Layout"), NodePath("HBoxContainer/VBoxContainer3/GenreMenu/HBoxContainer/Default/GenreContainer"), PackedStringArray("Layout"), NodePath("HBoxContainer/VBoxContainer3/GenreMenu/HBoxContainer/Default/GenreContainer/HBoxContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants"), NodePath("HBoxContainer/VBoxContainer3/CharacterMenu/VBoxContainer/OptionButton"), PackedStringArray("item_count_array"), NodePath("HBoxContainer/VBoxContainer3/CharacterMenu/VBoxContainer/OptionButton/VBoxContainer/HBoxContainer/VBoxContainer2/TextEdit"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing")]
resource_unfolds=[]
nodes_folded=[]

View File

@ -1,9 +1,11 @@
Label
TextEdit
VBoxContainer
OptionButton
Button
CheckButton
HBoxContainer
OptionButton
Label
Button
CheckBox
CheckButton
Panel
ItemList
Control

View File

@ -16,11 +16,11 @@ dock_5="Inspector,Node,History"
[EditorNode]
open_scenes=["res://toolset_test/drag_and_drop_demo_final.tscn", "res://toolset_test_tabbed_merged/draggable_assets.tscn", "res://toolset_test_tabbed_merged/tabbed_merged_test_interface.tscn", "res://index_screen/index.tscn", "res://top_toolbar/TopToolbar.tscn"]
open_scenes=["res://top_toolbar/TopToolbar.tscn"]
[ScriptEditor]
open_scripts=["res://toolset_test/draggable_final.gd", "res://toolset_test/drag_and_drop_demo_final.gd", "res://toolset_test_tabbed_merged/PanelCanvas_Temp.gd", "res://toolset_test_tabbed_merged/source_container.gd", "res://toolset_test_tabbed_merged/target_container_final.gd", "res://toolset_test_tabbed_merged/toolset_test_tabbed_merged.gd"]
open_scripts=["res://GenreSettings.gd", "res://MenuManager.gd"]
open_help=[]
script_split_offset=70
list_split_offset=0

View File

@ -1,36 +1,11 @@
2a60927148abd1d33b818b535e306557
::res://::1687113905
Cabin-VariableFont_wdth,wght.ttf::FontFile::6071708341937432371::1685898239::1686505462::1::::<><>::
default_env.tres::Environment::-1::1685898239::0::1::::<><>::
icon.png::CompressedTexture2D::6683631437730026850::1685898239::1686505462::1::::<><>::
README.md::TextFile::-1::1685898239::0::1::::<><>::
::res://index_screen/::1687112687
index.tscn::PackedScene::1801527253264693182::1687112687::0::1::::<><>::
::res://toolset_test/::1687112687
draggable.tscn::PackedScene::-1::1685898239::0::1::::<><>::res://Cabin-VariableFont_wdth,wght.ttf<>res://toolset_test/draggable_final.gd
draggable_final.gd::GDScript::-1::1685898239::0::1::::Draggable<>ColorRect<>::
drag_and_drop_demo_final.gd::GDScript::-1::1685898239::0::1::::<>PanelContainer<>::
drag_and_drop_demo_final.tscn::PackedScene::5450542302151337224::1687112687::0::1::::<><>::res://toolset_test/source_container.gd<>res://toolset_test/target_container_final.gd<>res://toolset_test/drag_and_drop_demo_final.gd
source_container.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
target_container_final.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
::res://toolset_test_manual/::1685898239
Control_Manual_MasterScript.gd::GDScript::-1::1685898239::0::1::::<>PanelContainer<>::
drag_and_drop_demo_final.tscn::PackedScene::-1::1685898239::0::1::::<><>::res://Cabin-VariableFont_wdth,wght.ttf<>res://toolset_test/source_container.gd<>res://toolset_test/target_container_final.gd<>res://toolset_test_manual/Control_Manual_MasterScript.gd
source_container.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
target_container_final.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
::res://toolset_test_tabbed/::1685898239
Control_Manual_MasterScript.gd::GDScript::-1::1685898239::0::1::::<>PanelContainer<>::
source_container.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
tabbed_layout_test_2023_0514A.tscn::PackedScene::-1::1685898239::0::1::::<><>::
target_container_final.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
::res://toolset_test_tabbed_merged/::1687112687
AssetsContainer.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
draggable_assets.tscn::PackedScene::7601867094005848387::1687112687::0::1::::<><>::res://toolset_test/draggable_final.gd
draggable_assets_final.gd::GDScript::-1::1685898239::0::1::::Draggable_Assets<>ColorRect<>::
PanelCanvas_Temp.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
source_container.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
tabbed_merged_test_interface.tscn::PackedScene::6222854153641568888::1687112687::0::1::::<><>::res://toolset_test_tabbed_merged/toolset_test_tabbed_merged.gd<>res://toolset_test_tabbed_merged/AssetsContainer.gd<>res://toolset_test_tabbed_merged/PanelCanvas_Temp.gd
target_container_final.gd::GDScript::-1::1685898239::0::1::::<>Panel<>::
toolset_test_tabbed_merged.gd::GDScript::-1::1685898239::0::1::::<>PanelContainer<>::
::res://top_toolbar/::1687112687
TopToolbar.tscn::PackedScene::5079673781919012116::1687112687::0::1::::<><>::
::res://::1691776207
Cabin-VariableFont_wdth,wght.ttf::FontFile::6071708341937432371::1691364683::1691364683::1::::<><>::
default_env.tres::Environment::-1::1691364683::0::1::::<><>::
icon.png::CompressedTexture2D::6683631437730026850::1691364683::1691364683::1::::<><>::
MenuManager.gd::GDScript::-1::1691459965::0::1::::<>Node<>::
README.md::TextFile::-1::1691364683::0::1::::<><>::
::res://index_screen/::1691364683
index.tscn::PackedScene::1801527253264693182::1691364683::0::1::::<><>::
::res://top_toolbar/::1691459965
TopToolbar.tscn::PackedScene::5079673781919012116::1691459965::0::1::::<><>::res://MenuManager.gd

View File

@ -1,5 +1,3 @@
res://top_toolbar/TopToolbar.tscn
res://toolset_test/drag_and_drop_demo_final.tscn
res://toolset_test_tabbed_merged/draggable_assets.tscn
res://toolset_test_tabbed_merged/tabbed_merged_test_interface.tscn
res://index_screen/index.tscn
res://MenuManager.gd
res://GenreSettings.gd

View File

@ -1,6 +1,7 @@
[editor_metadata]
executable_path="/usr/bin/godot"
executable_path="C:/Users/Trevor/Desktop/Godot_v4.0.4-stable_win64.exe/Godot_v4.0.4-stable_win64.exe"
use_advanced_connections=false
[debug_options]
@ -9,5 +10,13 @@ run_reload_scripts=true
[recent_files]
scenes=["res://top_toolbar/TopToolbar.tscn", "res://index_screen/index.tscn", "res://toolset_test_tabbed_merged/tabbed_merged_test_interface.tscn", "res://toolset_test_tabbed_merged/draggable_assets.tscn", "res://toolset_test/drag_and_drop_demo_final.tscn"]
scripts=["res://toolset_test_tabbed_merged/target_container_final.gd", "res://toolset_test_tabbed_merged/toolset_test_tabbed_merged.gd", "res://toolset_test/draggable_final.gd", "res://toolset_test_tabbed_merged/PanelCanvas_Temp.gd", "res://toolset_test_tabbed_merged/source_container.gd", "res://toolset_test/drag_and_drop_demo_final.gd"]
scenes=["res://new_genre.tscn", "res://top_toolbar/TopToolbar.tscn", "res://index_screen/index.tscn", "res://toolset_test_tabbed_merged/tabbed_merged_test_interface.tscn", "res://toolset_test_tabbed_merged/draggable_assets.tscn", "res://toolset_test/drag_and_drop_demo_final.tscn"]
scripts=["res://GenreSettings.gd", "res://RadioButtonManager.gd", "res://MenuManager.gd", "res://toolset_test_tabbed_merged/target_container_final.gd", "res://toolset_test_tabbed_merged/toolset_test_tabbed_merged.gd", "res://toolset_test/draggable_final.gd", "res://toolset_test_tabbed_merged/PanelCanvas_Temp.gd", "res://toolset_test_tabbed_merged/source_container.gd", "res://toolset_test/drag_and_drop_demo_final.gd"]
[dialog_bounds]
create_new_node=Rect2(510, 190, 900, 700)
[script_setup]
last_selected_language="GDScript"

View File

@ -0,0 +1,2 @@
res://
res://top_toolbar

View File

@ -1,82 +1,26 @@
[res://toolset_test/drag_and_drop_demo_final.gd]
[res://MenuManager.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"column": 22,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 0.0,
"row": 29,
"scroll_position": 3.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://toolset_test_tabbed_merged/source_container.gd]
[res://GenreSettings.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"column": 157,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://toolset_test_tabbed_merged/PanelCanvas_Temp.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://toolset_test/draggable_final.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://toolset_test_tabbed_merged/toolset_test_tabbed_merged.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://toolset_test_tabbed_merged/target_container_final.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"h_scroll_position": 365,
"row": 17,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"

View File

@ -0,0 +1,18 @@
extends Node
var newGenre = load("res://new_genre.tscn")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_new_genre_button_up():
var genreInstance = newGenre.instantiate()
$HBoxContainer/Default/GenreContainer.add_child(genreInstance)
$HBoxContainer/Default/GenreContainer.move_child($HBoxContainer/Default/GenreContainer/NewGenre, $HBoxContainer/Default/GenreContainer.get_child_count() - 1)

View File

@ -0,0 +1,30 @@
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
$GenreMenu.hide()
$DialogMenu.hide()
$CharacterMenu.hide()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_option_button_wizards_item_selected(index):
match index:
0:
$GenreMenu.show()
$DialogMenu.hide()
$CharacterMenu.hide()
1:
$GenreMenu.hide()
$DialogMenu.show()
$CharacterMenu.hide()
2:
$GenreMenu.hide()
$DialogMenu.hide()
$CharacterMenu.show()

View File

@ -0,0 +1,11 @@
[gd_scene format=3 uid="uid://b73umxygrr8gf"]
[node name="NewGenre" type="HBoxContainer"]
theme_override_constants/separation = 135
[node name="CheckBox" type="CheckBox" parent="."]
layout_mode = 2
[node name="TextEdit" type="TextEdit" parent="."]
layout_mode = 2
size_flags_horizontal = 3

View File

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="Experiment_Location_Folders"
run/main_scene="res://toolset_test/drag_and_drop_demo_final.tscn"
run/main_scene="res://top_toolbar/TopToolbar.tscn"
config/features=PackedStringArray("4.0")
config/icon="res://icon.png"

View File

@ -1,9 +0,0 @@
extends PanelContainer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$VLayout/DragAndDropColumns/SourceContainer/FileDialog.popup()

View File

@ -1,104 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://cjwjvurcfkdr1"]
[ext_resource type="Script" path="res://toolset_test/source_container.gd" id="2"]
[ext_resource type="Script" path="res://toolset_test/target_container_final.gd" id="3"]
[ext_resource type="Script" path="res://toolset_test/drag_and_drop_demo_final.gd" id="4"]
[node name="DragAndDropDemo" type="PanelContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource("4")
[node name="VLayout" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="DescriptionHeader" type="HBoxContainer" parent="VLayout"]
layout_mode = 2
[node name="M1H" type="Panel" parent="VLayout/DescriptionHeader"]
layout_mode = 2
[node name="Menu One" type="Label" parent="VLayout/DescriptionHeader/M1H"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
text = "Menu 1"
[node name="M2H" type="Panel" parent="VLayout/DescriptionHeader"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MenuTwo" type="Label" parent="VLayout/DescriptionHeader/M2H"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
text = "Menu 2"
[node name="M3H" type="Panel" parent="VLayout/DescriptionHeader"]
layout_mode = 2
[node name="Menu3Label" type="Label" parent="VLayout/DescriptionHeader/M3H"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
text = "Menu 3"
[node name="M4H" type="Panel" parent="VLayout/DescriptionHeader"]
layout_mode = 2
[node name="Menu4Label" type="Label" parent="VLayout/DescriptionHeader/M4H"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
text = "Menu 4"
[node name="ToolsOptions" type="HBoxContainer" parent="VLayout"]
layout_mode = 2
[node name="ToolsContainer" type="Panel" parent="VLayout/ToolsOptions"]
layout_mode = 2
script = ExtResource("2")
[node name="Padding" type="MarginContainer" parent="VLayout/ToolsOptions/ToolsContainer"]
layout_mode = 0
[node name="Columns" type="HBoxContainer" parent="VLayout/ToolsOptions/ToolsContainer/Padding"]
layout_mode = 2
[node name="DragAndDropColumns" type="HBoxContainer" parent="VLayout"]
layout_mode = 2
size_flags_vertical = 3
[node name="SourceContainer" type="Panel" parent="VLayout/DragAndDropColumns"]
layout_mode = 2
[node name="FileDialog" type="FileDialog" parent="VLayout/DragAndDropColumns/SourceContainer"]
size = Vector2i(596, 162)
mode = 2
visible = true
access = 2
[node name="Padding" type="MarginContainer" parent="VLayout/DragAndDropColumns/SourceContainer"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Rows" type="VBoxContainer" parent="VLayout/DragAndDropColumns/SourceContainer/Padding"]
layout_mode = 2
[node name="CanvasContainer" type="Panel" parent="VLayout/DragAndDropColumns"]
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("3")
[node name="Padding" type="MarginContainer" parent="VLayout/DragAndDropColumns/CanvasContainer"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Rows" type="VBoxContainer" parent="VLayout/DragAndDropColumns/CanvasContainer/Padding"]
layout_mode = 2
[node name="DetailsContainer" type="Panel" parent="VLayout/DragAndDropColumns"]
layout_mode = 2

View File

@ -1,26 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Cabin-VariableFont_wdth,wght.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://toolset_test/draggable_final.gd" type="Script" id=2]
[sub_resource type="DynamicFont" id=6]
size = 24
font_data = ExtResource( 1 )
[node name="Draggable" type="ColorRect"]
margin_right = 210.0
margin_bottom = 50.0
rect_min_size = Vector2( 210, 50 )
color = Color( 0.752941, 0.305882, 0.305882, 1 )
script = ExtResource( 2 )
[node name="Label" type="Label" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 6 )
text = "Drag Me"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}

View File

@ -1,42 +0,0 @@
extends ColorRect
class_name Draggable
var id: int
var label: String
# set this to true once we've been dropped on our target
var dropped_on_target: bool = false
func _ready() -> void:
add_to_group("DRAGGABLE")
$Label.text = label
func get_drag_data(_position: Vector2):
print("[Draggable] get_drag_data has run")
if not dropped_on_target:
set_drag_preview(_get_preview_control())
return self
func _on_item_dropped_on_target(draggable):
print("[Draggable] Signal item_dropped_on_target received")
if draggable.get("id") != id:
return
print("[Draggable] Iven been dropped, removing myself from source container")
queue_free()
func _get_preview_control() -> Control:
"""
The preview control must not be in the scene tree. You should not free the control, and
you should not keep a reference to the control beyond the duration of the drag.
It will be deleted automatically after the drag has ended.
"""
var preview = ColorRect.new()
preview.rect_size = rect_size
var preview_color = color
preview_color.a = .5
preview.color = preview_color
preview.set_rotation(.1) # in readians
return preview

View File

@ -1,31 +0,0 @@
extends Panel
onready var drop_target = get_node("/root/DragAndDropDemo/VLayout/DragAndDropColumns/CanvasContainer")
onready var draggable_scene: PackedScene = preload("res://toolset_test/draggable.tscn")
onready var draggable_container = $Padding/Columns
var dragables = [
{"id": 1, "label": "dialog"},
{"id": 2, "label": "object"},
{"id": 3, "label": "encounter"}
]
func _ready() -> void:
drop_target.connect("item_dropped_on_target", self, "_on_item_dropped_on_target")
_populate_dragables()
func _populate_dragables():
for dragable in dragables:
var drag_item = draggable_scene.instance()
drag_item.id = dragable["id"]
drag_item.label = dragable["label"]
draggable_container.add_child(drag_item)
func _on_item_dropped_on_target(dropped_item: Draggable) -> void:
for drag_item in draggable_container.get_children():
drag_item = (drag_item as Draggable)
if drag_item.id == dropped_item.id:
#draggable_container.remove_child(drag_item)
#drag_item.queue_free()
break

View File

@ -1,26 +0,0 @@
extends Panel
signal item_dropped_on_target(draggable)
var draggable: PackedScene = preload("res://toolset_test/draggable.tscn")
func can_drop_data(position: Vector2, data) -> bool:
var can_drop: bool = data is Node and data.is_in_group("DRAGGABLE")
print("[TargetContainer] can_drop_data has run, returning %s" % can_drop)
return can_drop
func drop_data(position: Vector2, data) -> void:
print("[TargetContainer] drop_data has run")
print("[TargetContainer] Emiting signal: item_dropped_on_target")
#DKM TEMP: here we'd open wizard or create new item.
# How should this display when it's finalized?
var draggable_copy: ColorRect = draggable.instance()
draggable_copy.id = data.id
#Instantiate a new version of the specific item in this content capsule
draggable_copy.label = data.label
draggable_copy.dropped_on_target = true # disable further dragging
$Padding/Rows.add_child(draggable_copy)
emit_signal("item_dropped_on_target", data)

View File

@ -1,16 +0,0 @@
extends PanelContainer
# Declare member variables here. Examples:
# var a: int = 2
# var b: String = "text"
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var outputFolderStr = "Region\n\tLocation\n\t\tSpace\n\t\t\tScene" + "\n\t\tSpace"
$VLayout/HBoxContainer/TabContainer/Structural_Tab/TextEdit.text = outputFolderStr
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta: float) -> void:
# pass

View File

@ -1,198 +0,0 @@
[gd_scene load_steps=11 format=2]
[ext_resource path="res://Cabin-VariableFont_wdth,wght.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://toolset_test/source_container.gd" type="Script" id=2]
[ext_resource path="res://toolset_test/target_container_final.gd" type="Script" id=3]
[ext_resource path="res://toolset_test_manual/Control_Manual_MasterScript.gd" type="Script" id=4]
[sub_resource type="StyleBoxFlat" id=5]
bg_color = Color( 0, 0, 0, 1 )
[sub_resource type="DynamicFont" id=4]
size = 32
font_data = ExtResource( 1 )
[sub_resource type="StyleBoxFlat" id=7]
bg_color = Color( 0.760784, 0.760784, 0.760784, 1 )
[sub_resource type="StyleBoxFlat" id=6]
bg_color = Color( 1, 1, 1, 1 )
[sub_resource type="StyleBoxFlat" id=2]
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 1, 1, 1, 1 )
[node name="DragAndDropDemo" type="PanelContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 4 )
[node name="VLayout" type="VBoxContainer" parent="."]
margin_left = 7.0
margin_top = 7.0
margin_right = 1017.0
margin_bottom = 593.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DescriptionHeader" type="HBoxContainer" parent="VLayout"]
margin_right = 1010.0
margin_bottom = 50.0
rect_min_size = Vector2( 0, 50 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="M1H" type="Panel" parent="VLayout/DescriptionHeader"]
margin_right = 250.0
margin_bottom = 50.0
rect_min_size = Vector2( 250, 50 )
custom_styles/panel = SubResource( 5 )
[node name="Menu One" type="Label" parent="VLayout/DescriptionHeader/M1H"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 4 )
text = "Menu 1"
align = 1
valign = 1
[node name="M2H" type="Panel" parent="VLayout/DescriptionHeader"]
margin_left = 254.0
margin_right = 502.0
margin_bottom = 50.0
size_flags_horizontal = 3
custom_styles/panel = SubResource( 5 )
[node name="MenuTwo" type="Label" parent="VLayout/DescriptionHeader/M2H"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 4 )
text = "Menu 2"
align = 1
valign = 1
[node name="M3H" type="Panel" parent="VLayout/DescriptionHeader"]
margin_left = 506.0
margin_right = 756.0
margin_bottom = 50.0
rect_min_size = Vector2( 250, 0 )
custom_styles/panel = SubResource( 5 )
[node name="Menu3Label" type="Label" parent="VLayout/DescriptionHeader/M3H"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 4 )
text = "Menu 3"
align = 1
valign = 1
[node name="M4H" type="Panel" parent="VLayout/DescriptionHeader"]
margin_left = 760.0
margin_right = 1010.0
margin_bottom = 50.0
rect_min_size = Vector2( 250, 0 )
custom_styles/panel = SubResource( 5 )
[node name="Menu4Label" type="Label" parent="VLayout/DescriptionHeader/M4H"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 4 )
text = "Menu 4"
align = 1
valign = 1
[node name="ToolsOptions" type="HBoxContainer" parent="VLayout"]
margin_top = 54.0
margin_right = 1010.0
margin_bottom = 104.0
rect_min_size = Vector2( 0, 50 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolsContainer" type="Panel" parent="VLayout/ToolsOptions"]
margin_right = 1010.0
margin_bottom = 50.0
rect_min_size = Vector2( 1010, 50 )
custom_styles/panel = SubResource( 7 )
script = ExtResource( 2 )
[node name="Padding" type="MarginContainer" parent="VLayout/ToolsOptions/ToolsContainer"]
margin_right = 1005.0
margin_bottom = 47.0
rect_min_size = Vector2( 1005, 0 )
[node name="Columns" type="HBoxContainer" parent="VLayout/ToolsOptions/ToolsContainer/Padding"]
margin_right = 1005.0
margin_bottom = 47.0
rect_min_size = Vector2( 1005, 0 )
[node name="DragAndDropColumns" type="HBoxContainer" parent="VLayout"]
margin_top = 108.0
margin_right = 1010.0
margin_bottom = 586.0
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SourceContainer" type="Panel" parent="VLayout/DragAndDropColumns"]
margin_right = 175.0
margin_bottom = 478.0
rect_min_size = Vector2( 175, 0 )
custom_styles/panel = SubResource( 6 )
[node name="Padding" type="MarginContainer" parent="VLayout/DragAndDropColumns/SourceContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 30.0
rect_clip_content = true
custom_constants/margin_right = 20
custom_constants/margin_top = 20
custom_constants/margin_left = 20
custom_constants/margin_bottom = 20
[node name="TextEdit" type="TextEdit" parent="VLayout/DragAndDropColumns/SourceContainer"]
margin_right = 175.0
margin_bottom = 478.0
[node name="CanvasContainer" type="Panel" parent="VLayout/DragAndDropColumns"]
margin_left = 179.0
margin_right = 831.0
margin_bottom = 478.0
size_flags_horizontal = 3
custom_styles/panel = SubResource( 2 )
script = ExtResource( 3 )
[node name="Padding" type="MarginContainer" parent="VLayout/DragAndDropColumns/CanvasContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 33.0
margin_top = -5.0
margin_right = -2.0
margin_bottom = -1.0
mouse_filter = 1
custom_constants/margin_right = 20
custom_constants/margin_top = 20
custom_constants/margin_left = 20
custom_constants/margin_bottom = 20
[node name="Rows" type="VBoxContainer" parent="VLayout/DragAndDropColumns/CanvasContainer/Padding"]
margin_left = 20.0
margin_top = 20.0
margin_right = 597.0
margin_bottom = 462.0
custom_constants/separation = 15
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DetailsContainer" type="Panel" parent="VLayout/DragAndDropColumns"]
margin_left = 835.0
margin_right = 1010.0
margin_bottom = 478.0
rect_min_size = Vector2( 175, 0 )
custom_styles/panel = SubResource( 3 )

View File

@ -1,31 +0,0 @@
extends Panel
onready var drop_target = get_node("/root/DragAndDropDemo/VLayout/DragAndDropColumns/CanvasContainer")
onready var draggable_scene: PackedScene = preload("res://toolset_test/draggable.tscn")
onready var draggable_container = $Padding/Columns
var dragables = [
{"id": 1, "label": "dialog"},
{"id": 2, "label": "object"},
{"id": 3, "label": "encounter"}
]
func _ready() -> void:
drop_target.connect("item_dropped_on_target", self, "_on_item_dropped_on_target")
_populate_dragables()
func _populate_dragables():
for dragable in dragables:
var drag_item = draggable_scene.instance()
drag_item.id = dragable["id"]
drag_item.label = dragable["label"]
draggable_container.add_child(drag_item)
func _on_item_dropped_on_target(dropped_item: Draggable) -> void:
for drag_item in draggable_container.get_children():
drag_item = (drag_item as Draggable)
if drag_item.id == dropped_item.id:
#draggable_container.remove_child(drag_item)
#drag_item.queue_free()
break

View File

@ -1,26 +0,0 @@
extends Panel
signal item_dropped_on_target(draggable)
var draggable: PackedScene = preload("res://toolset_test/draggable.tscn")
func can_drop_data(position: Vector2, data) -> bool:
var can_drop: bool = data is Node and data.is_in_group("DRAGGABLE")
print("[TargetContainer] can_drop_data has run, returning %s" % can_drop)
return can_drop
func drop_data(position: Vector2, data) -> void:
print("[TargetContainer] drop_data has run")
print("[TargetContainer] Emiting signal: item_dropped_on_target")
#DKM TEMP: here we'd open wizard or create new item.
# How should this display when it's finalized?
var draggable_copy: ColorRect = draggable.instance()
draggable_copy.id = data.id
#Instantiate a new version of the specific item in this content capsule
draggable_copy.label = data.label
draggable_copy.dropped_on_target = true # disable further dragging
$Padding/Rows.add_child(draggable_copy)
emit_signal("item_dropped_on_target", data)

View File

@ -1,16 +0,0 @@
extends PanelContainer
# Declare member variables here. Examples:
# var a: int = 2
# var b: String = "text"
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var outputFolderStr = "Region\n\tLocation\n\t\tSpace\n\t\t\tScene" + "\n\t\tSpace"
$VLayout/DragAndDropColumns/SourceContainer/TextEdit.text = outputFolderStr
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta: float) -> void:
# pass

View File

@ -1,31 +0,0 @@
extends Panel
onready var drop_target = get_node("/root/DragAndDropDemo/VLayout/DragAndDropColumns/CanvasContainer")
onready var draggable_scene: PackedScene = preload("res://toolset_test/draggable.tscn")
onready var draggable_container = $Padding/Columns
var dragables = [
{"id": 1, "label": "dialog"},
{"id": 2, "label": "object"},
{"id": 3, "label": "encounter"}
]
func _ready() -> void:
drop_target.connect("item_dropped_on_target", self, "_on_item_dropped_on_target")
_populate_dragables()
func _populate_dragables():
for dragable in dragables:
var drag_item = draggable_scene.instance()
drag_item.id = dragable["id"]
drag_item.label = dragable["label"]
draggable_container.add_child(drag_item)
func _on_item_dropped_on_target(dropped_item: Draggable) -> void:
for drag_item in draggable_container.get_children():
drag_item = (drag_item as Draggable)
if drag_item.id == dropped_item.id:
#draggable_container.remove_child(drag_item)
#drag_item.queue_free()
break

View File

@ -1,33 +0,0 @@
[gd_scene format=2]
[node name="Node2D" type="Node2D"]
[node name="TabContainer" type="TabContainer" parent="."]
margin_right = 1027.0
margin_bottom = 604.0
[node name="Visual_Tab" type="Tabs" parent="TabContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
margin_top = 32.0
margin_right = -4.0
margin_bottom = -4.0
[node name="ColorPicker" type="ColorPicker" parent="TabContainer/Visual_Tab"]
margin_left = 4.0
margin_top = 4.0
margin_right = 312.0
margin_bottom = 466.0
[node name="Structural_Tab" type="Tabs" parent="TabContainer"]
visible = false
margin_right = 40.0
margin_bottom = 24.0
[node name="TextEdit" type="TextEdit" parent="TabContainer/Structural_Tab"]
margin_left = 4.0
margin_top = 32.0
margin_right = 1023.0
margin_bottom = 600.0
text = "Location folder data loads here"

View File

@ -1,26 +0,0 @@
extends Panel
signal item_dropped_on_target(draggable)
var draggable: PackedScene = preload("res://toolset_test/draggable.tscn")
func can_drop_data(position: Vector2, data) -> bool:
var can_drop: bool = data is Node and data.is_in_group("DRAGGABLE")
print("[TargetContainer] can_drop_data has run, returning %s" % can_drop)
return can_drop
func drop_data(position: Vector2, data) -> void:
print("[TargetContainer] drop_data has run")
print("[TargetContainer] Emiting signal: item_dropped_on_target")
#DKM TEMP: here we'd open wizard or create new item.
# How should this display when it's finalized?
var draggable_copy: ColorRect = draggable.instance()
draggable_copy.id = data.id
#Instantiate a new version of the specific item in this content capsule
draggable_copy.label = data.label
draggable_copy.dropped_on_target = true # disable further dragging
$Padding/Rows.add_child(draggable_copy)
emit_signal("item_dropped_on_target", data)

View File

@ -1,33 +0,0 @@
extends Panel
onready var drop_target = get_node("/root/Tabbed_merged_test/VLayout/HBoxContainer/TabContainer/Structural_Tab/PanelCanvas_Temp")
onready var draggable_assets_scene: PackedScene = preload("res://toolset_test_tabbed_merged/draggable_assets.tscn")
onready var draggable_assets_container = $Padding/AssetsRows
var dragables = [
{"id": 1, "label": "region"},
{"id": 2, "label": "location"},
{"id": 3, "label": "space"},
{"id": 4, "label": "scene"},
]
func _ready() -> void:
drop_target.connect("item_dropped_on_target", self, "_on_item_dropped_on_target")
_populate_dragables()
func _populate_dragables():
for dragable in dragables:
var drag_item = draggable_assets_scene.instance()
drag_item.id = dragable["id"]
drag_item.label = dragable["label"]
draggable_assets_container.add_child(drag_item)
func _on_item_dropped_on_target(dropped_item: Draggable_Assets) -> void:
for drag_item in draggable_assets_container.get_children():
drag_item = (drag_item as Draggable_Assets)
if drag_item.id == dropped_item.id:
#draggable_container.remove_child(drag_item)
#drag_item.queue_free()
break

View File

@ -1,25 +0,0 @@
extends Panel
signal item_dropped_on_target(draggable_assets)
var draggable_assets: PackedScene = preload("res://toolset_test_tabbed_merged/draggable_assets.tscn")
func can_drop_data(position: Vector2, data) -> bool:
var can_drop: bool = data is Node and data.is_in_group("DRAGGABLE_ASSETS")
print("[TargetContainer] can_drop_data has run, returning %s" % can_drop)
return can_drop
func drop_data(position: Vector2, data) -> void:
print("[TargetContainer] drop_data has run")
print("[TargetContainer] Emiting signal: item_dropped_on_target")
#DKM TEMP: here we'd open wizard or create new item.
# How should this display when it's finalized?
var draggable_copy: ColorRect = draggable_assets.instance()
draggable_copy.id = data.id
#Instantiate a new version of the specific item in this content capsule
draggable_copy.label = data.label
draggable_copy.dropped_on_target = true # disable further dragging
$Padding/Rows.add_child(draggable_copy)
emit_signal("item_dropped_on_target", data)

View File

@ -1,13 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://dgknv1j7luukp"]
[ext_resource type="Script" path="res://toolset_test/draggable_final.gd" id="2"]
[node name="Draggable" type="ColorRect"]
color = Color(0.752941, 0.305882, 0.305882, 1)
script = ExtResource("2")
[node name="Label" type="Label" parent="."]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
text = "Drag Me"

Some files were not shown because too many files have changed in this diff Show More