diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/MenuScreen.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/MenuScreen.tscn index 8bbe135..c0d55cb 100644 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/MenuScreen.tscn +++ b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/MenuScreen.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://userInterface/But_Quit.tscn" type="PackedScene" id=1] -[ext_resource path="res://userInterface/But_ChangeScene.tscn" type="PackedScene" id=2] +[ext_resource path="res://userInterface/But_Quit.gd" type="Script" id=3] +[ext_resource path="res://userInterface/But_ChangeScene.gd" type="Script" id=4] [node name="MenuScreen" type="Control"] anchor_right = 1.0 @@ -25,16 +25,26 @@ margin_right = 65.0 margin_bottom = -91.0 rect_scale = Vector2( 1.04675, 1.07389 ) -[node name="But_ChangeScene" parent="VBoxContainer" instance=ExtResource( 2 )] +[node name="But_ChangeScene" type="Button" parent="VBoxContainer"] margin_right = 184.0 margin_bottom = 37.0 +size_flags_vertical = 3 text = "Test Postgres" +script = ExtResource( 4 ) +__meta__ = { +"_edit_use_anchors_": false +} next_scene_path = "res://screens/DBTest_Postgres.tscn" -[node name="But_Quit" parent="VBoxContainer" instance=ExtResource( 1 )] +[node name="But_Quit" type="Button" parent="VBoxContainer"] margin_top = 41.0 margin_right = 184.0 margin_bottom = 61.0 +text = "Quit" +script = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} [node name="Version" type="Label" parent="."] anchor_left = 1.0 @@ -49,3 +59,6 @@ text = "Version: 0.0.0" __meta__ = { "_edit_use_anchors_": false } + +[connection signal="button_up" from="VBoxContainer/But_ChangeScene" to="VBoxContainer/But_ChangeScene" method="_on_But_NewGame_button_up"] +[connection signal="button_up" from="VBoxContainer/But_Quit" to="VBoxContainer/But_Quit" method="_on_But_Quit_button_up"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/export_presets.cfg b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/export_presets.cfg index da2c105..e8f3a0c 100644 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/export_presets.cfg +++ b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/export_presets.cfg @@ -7,7 +7,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../Godot_Outputs/Godot_35_Outputs/Web/BaseTest/index.html" +export_path="../../Godot_Outputs/Godot_35_Outputs/Web/Database_Testing_2023_1029A/index.html" script_export_mode=1 script_encryption_key="" diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/project.godot b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/project.godot index 150b594..ee4b6ca 100644 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/project.godot +++ b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/project.godot @@ -9,18 +9,12 @@ config_version=4 _global_script_classes=[ { -"base": "PanelContainer", -"class": "Locale", -"language": "GDScript", -"path": "res://userInterface/Locale.gd" -}, { "base": "Object", "class": "PostgreSQLClient", "language": "GDScript", "path": "res://screens/PostgreSQLClient.gd" } ] _global_script_class_icons={ -"Locale": "", "PostgreSQLClient": "" } diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/But_HistoryPager.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/But_HistoryPager.gd deleted file mode 100644 index a5e1b2f..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/But_HistoryPager.gd +++ /dev/null @@ -1,13 +0,0 @@ -#BUT_HISTORYPAGER: -# Iterates the page number and calls HistoryViewer script to display -# stored page and response fro the history array -# - -extends Button - -onready var historyViewerScript = get_node("/root/HistoryViewer") - -#DKM TEMP: this needs refactoring -- too much being calculated as needed/repeated -func _on_But_HistoryPager_button_up() -> void: - historyViewerScript.update_pager() - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Add.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Add.gd deleted file mode 100644 index bc9d1b2..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Add.gd +++ /dev/null @@ -1,22 +0,0 @@ -#CHARACTER_ADD: -# Script for adding a new character and both saving it to file and loading -# it into the character object - -extends Control - -onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance - -func _ready() -> void: - theme=load(settings.themeFile) - $Title/But_SaveChar.grab_focus() - -func _on_But_SaveChar_pressed() -> void: - $Title/FileDialog.popup() - -#DKM TEMP: just text for now from text edit -func _on_FileDialog_file_selected(path: String) -> void: - var pc = get_node("/root/PlayerCharacter") - var newCharFile = File.new() - newCharFile.open(path, 2) - newCharFile.store_string($TextEdit.text) - pc.playerCharacterSingleton.pcText = $TextEdit.text diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Add.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Add.tscn deleted file mode 100644 index 96473c7..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Add.tscn +++ /dev/null @@ -1,171 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://userInterface/Title.tscn" type="PackedScene" id=1] -[ext_resource path="res://userInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://screens/Character_Add.gd" type="Script" id=3] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="TextEdit" type="TextEdit" parent="."] -margin_left = 215.0 -margin_top = 23.0 -margin_right = 997.0 -margin_bottom = 447.0 - -[node name="Title" parent="." instance=ExtResource( 1 )] -anchor_left = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 0.0 -margin_top = 0.0 -margin_right = 0.0 -margin_bottom = 0.0 -text = "Create Character (temp)" - -[node name="But_SaveChar" type="Button" parent="Title"] -margin_right = 12.0 -margin_bottom = 20.0 -text = "Save Character" - -[node name="But_ChangeScene" parent="Title" instance=ExtResource( 2 )] -margin_left = -1.0 -margin_top = 48.0 -margin_right = 142.0 -margin_bottom = 72.0 -text = "Temp: Main Menu" -next_scene_path = "res://screens/MenuScreen.tscn" - -[node name="But_StartNewGame" parent="Title" instance=ExtResource( 2 )] -margin_top = 98.0 -margin_right = 159.0 -margin_bottom = 122.0 -text = "Temp: Start New Game" - -[node name="FileDialog" type="FileDialog" parent="Title"] -margin_left = 164.0 -margin_top = 35.0 -margin_right = 741.0 -margin_bottom = 426.0 -rect_min_size = Vector2( 400, 140 ) -access = 1 - -[node name="VBoxContainer" type="VBoxContainer" parent="Title"] -anchor_left = 0.5 -anchor_right = 0.5 -margin_left = -20.0 -margin_top = 50.0 -margin_right = 20.0 -margin_bottom = 140.0 - -[node name="LabelName" type="Label" parent="Title/VBoxContainer"] -margin_right = 81.0 -margin_bottom = 31.0 -text = "NAME -" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelName"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelProfession" type="Label" parent="Title/VBoxContainer"] -margin_top = 35.0 -margin_right = 81.0 -margin_bottom = 66.0 -text = "PROFESSION -" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelProfession"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelStrength" type="Label" parent="Title/VBoxContainer"] -margin_top = 70.0 -margin_right = 81.0 -margin_bottom = 101.0 -text = "STRENGTH -" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelStrength"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelIntellect" type="Label" parent="Title/VBoxContainer"] -margin_top = 105.0 -margin_right = 81.0 -margin_bottom = 136.0 -text = "INTELLECT -" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelIntellect"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelWillpower" type="Label" parent="Title/VBoxContainer"] -margin_top = 140.0 -margin_right = 81.0 -margin_bottom = 171.0 -text = "WILLPOWER -" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelWillpower"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelCharm" type="Label" parent="Title/VBoxContainer"] -margin_top = 175.0 -margin_right = 81.0 -margin_bottom = 189.0 -text = "CHARM" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelCharm"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelWeapon" type="Label" parent="Title/VBoxContainer"] -margin_top = 193.0 -margin_right = 81.0 -margin_bottom = 224.0 -text = "WEAPON -" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelWeapon"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelArmor" type="Label" parent="Title/VBoxContainer"] -margin_top = 228.0 -margin_right = 81.0 -margin_bottom = 242.0 -text = "ARMOR" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelArmor"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[node name="LabelQuote" type="Label" parent="Title/VBoxContainer"] -margin_top = 246.0 -margin_right = 81.0 -margin_bottom = 260.0 -text = "QUOTE" - -[node name="LineEdit" type="LineEdit" parent="Title/VBoxContainer/LabelQuote"] -margin_top = 15.0 -margin_right = 58.0 -margin_bottom = 24.0 - -[connection signal="pressed" from="Title/But_SaveChar" to="." method="_on_But_SaveChar_pressed"] -[connection signal="file_selected" from="Title/FileDialog" to="." method="_on_FileDialog_file_selected"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Load.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Load.gd deleted file mode 100644 index ad6681d..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Load.gd +++ /dev/null @@ -1,24 +0,0 @@ -#CHARACTER_LOAD: -# Script for loading a character file into the character object from file - -extends Control - -onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance - -func _ready() -> void: - theme=load(settings.themeFile) - $Title/But_loadCharacter.grab_focus() - - -func _on_But_loadCharacter_pressed() -> void: - $LoadCharacter_FileDialog.popup() - - -#DKM TEMP: we need to load the character item, not display to field -func _on_LoadCharacter_FileDialog_file_selected(path: String) -> void: - print(path) - var charFile = File.new() - charFile.open(path, 1) - var pc = get_node("/root/PlayerCharacter") - pc.playerCharacterSingleton.pcText = charFile.get_as_text() - $TextEdit.text = pc.playerCharacterSingleton.pcText diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Load.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Load.tscn deleted file mode 100644 index 38038a2..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Character_Load.tscn +++ /dev/null @@ -1,70 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://userInterface/Title.tscn" type="PackedScene" id=1] -[ext_resource path="res://userInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://screens/Character_Load.gd" type="Script" id=3] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="TextEdit" type="TextEdit" parent="."] -margin_left = 189.0 -margin_top = 18.0 -margin_right = 989.0 -margin_bottom = 461.0 -readonly = true -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Title" parent="." instance=ExtResource( 1 )] -anchor_left = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 0.0 -margin_top = 0.0 -margin_right = 0.0 -margin_bottom = 0.0 -text = "Load Character (temp)" - -[node name="But_loadCharacter" type="Button" parent="Title"] -margin_left = 22.0 -margin_top = 34.0 -margin_right = 155.0 -margin_bottom = 54.0 -text = "Load Character File" - -[node name="But_StartNewGame" parent="Title" instance=ExtResource( 2 )] -margin_left = 22.0 -margin_top = 71.0 -margin_right = 181.0 -margin_bottom = 95.0 -text = "Temp: Start New Game" - -[node name="But_ChangeScene" parent="Title" instance=ExtResource( 2 )] -margin_left = 21.0 -margin_top = 109.0 -margin_right = 164.0 -margin_bottom = 133.0 -text = "Temp: Main Menu " - -[node name="LoadCharacter_FileDialog" type="FileDialog" parent="."] -margin_left = 193.0 -margin_top = 33.0 -margin_right = 862.0 -margin_bottom = 409.0 -rect_min_size = Vector2( 400, 140 ) -window_title = "Open a File" -mode = 0 -access = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[connection signal="pressed" from="Title/But_loadCharacter" to="." method="_on_But_loadCharacter_pressed"] -[connection signal="file_selected" from="LoadCharacter_FileDialog" to="." method="_on_LoadCharacter_FileDialog_file_selected"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.gd index a45394c..f90c115 100644 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.gd +++ b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.gd @@ -3,11 +3,11 @@ extends Node var database := PostgreSQLClient.new() #TODO: ADD RELEVANT VALUES BELOW FOR TESTING! -const USER = ''#"postgres" -const PASSWORD = '' -const HOST = ''#"localhost" +const USER = 'ernie'#"postgres" +const PASSWORD = 'myPasswordGoesHere' #TODO: replace with correct password +const HOST = 'localhost'#"localhost" const PORT = 5432 # Default postgres port -const DATABASE = ''#"postgres" +const DATABASE = 'main'#"postgres" @@ -16,6 +16,7 @@ func _ready() -> void: func _init() -> void: print("Init running") + print("USER: " + str(USER) + "; HOST: " + str(HOST) + "; PORT: " + str(PORT) + "; DATABASE: " + str(DATABASE)) var _error := database.connect("connection_established", self, "_executer") _error = database.connect("authentication_error", self, "_authentication_error") _error = database.connect("connection_closed", self, "_close") @@ -46,7 +47,7 @@ func _executer() -> void: var datas := database.execute(""" BEGIN; - SELECT * FROM characters; + SELECT * FROM test_characters; COMMIT; """) diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.tscn index e54e935..5f55dbd 100644 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.tscn +++ b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/DBTest_Postgres.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=1] [ext_resource path="res://screens/DBTest_Postgres.gd" type="Script" id=2] +[ext_resource path="res://userInterface/But_ChangeScene.gd" type="Script" id=3] [node name="Control" type="Node2D"] script = ExtResource( 2 ) @@ -20,10 +20,15 @@ margin_top = 133.0 margin_right = 653.0 margin_bottom = 233.0 -[node name="But_MainMenu" parent="VBoxContainer" instance=ExtResource( 1 )] +[node name="But_MainMenu" type="Button" parent="VBoxContainer"] margin_right = 238.0 margin_bottom = 100.0 +size_flags_vertical = 3 text = "Main Menu" +script = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} next_scene_path = "res://MenuScreen.tscn" [node name="Version" type="Label" parent="."] @@ -36,3 +41,5 @@ margin_top = 554.0 margin_right = 1018.0 margin_bottom = 592.0 text = "Version: 0.0.0" + +[connection signal="button_up" from="VBoxContainer/But_MainMenu" to="VBoxContainer/But_MainMenu" method="_on_But_NewGame_button_up"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/HistoryViewer.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/HistoryViewer.gd deleted file mode 100644 index 843b361..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/HistoryViewer.gd +++ /dev/null @@ -1,49 +0,0 @@ -#HISTORY_VIEWER: -# Controls output space -- will display the appropriate history array page. -# DKM TEMP: 5/15/22: what's here is replicated from the Game script for starting -# purposes. I have this working in experimental version -- will add this back -# next. - -extends Control - -onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance -onready var history_source = get_node("/root/History").historyScreensSingleton -onready var current_history = $Background/MarginContainer/Rows/GameInfo/CurrentHistory -#For zero-indexed array position: -onready var current_history_page_no = 0 -onready var page_displayer = $Background/MarginContainer/Rows/ItemList/Page_Display - -#Abstract class we instance when wanted in game as child of HistoryReference -const TextOutput = preload("res://UserInterface/Response.tscn") -const InputResponse = preload("res://UserInterface/InputResponse.tscn") - - -func _ready() -> void: - theme=load(settings.themeFile) - - print("Loaded history array size is: " + str(history_source.output_history_array.size())) - update_pager() - #DKM TEMP: -# page_displayer.text = "1" -# if(current_history.get_child_count() > 0): -# current_history.remove_child(current_history.get_child(0)) -# var opening_res = history_source.output_history_array[0] -# current_history.add_child(opening_res) - -#Copies the response output to add to both current game output, and the -# history array. -func add_display_to_game(response: Control): - if(current_history.get_child_count() > 0): - current_history.remove_child(current_history.get_child(0)) - current_history.add_child(response) - -func update_pager(): - if(current_history_page_no >= history_source.output_history_array.size()): - current_history_page_no = 0 - print("Current page: " + str(current_history_page_no)) - add_display_to_game(history_source.output_history_array[current_history_page_no]) - current_history_page_no = current_history_page_no +1 - page_displayer.text = str(current_history_page_no) - - - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/HistoryViewer.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/HistoryViewer.tscn deleted file mode 100644 index a5ff472..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/HistoryViewer.tscn +++ /dev/null @@ -1,100 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://screens/HistoryViewer.gd" type="Script" id=1] -[ext_resource path="res://userInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://assets/ui_controlNode_dark_theme.tres" type="Theme" id=3] -[ext_resource path="res://screens/But_HistoryPager.gd" type="Script" id=4] - -[node name="HistoryViewer" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 3 ) -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Background" type="PanelContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MarginContainer" type="MarginContainer" parent="Background"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 1023.0 -margin_bottom = 599.0 -custom_constants/margin_right = 20 -custom_constants/margin_top = 10 -custom_constants/margin_left = 20 -custom_constants/margin_bottom = 20 - -[node name="Rows" type="VBoxContainer" parent="Background/MarginContainer"] -margin_left = 20.0 -margin_top = 10.0 -margin_right = 1002.0 -margin_bottom = 578.0 -custom_constants/separation = 10 - -[node name="ItemList" type="ItemList" parent="Background/MarginContainer/Rows"] -margin_right = 982.0 -margin_bottom = 40.0 -rect_min_size = Vector2( 0, 40 ) - -[node name="But_ChangeScene" parent="Background/MarginContainer/Rows/ItemList" instance=ExtResource( 2 )] -margin_right = 200.0 -margin_bottom = 36.0 -text = "More Options" -next_scene_path = "res://screens/MoreOptions.tscn" - -[node name="But_HistoryPager" type="Button" parent="Background/MarginContainer/Rows/ItemList"] -anchor_left = 0.5 -anchor_right = 0.5 -margin_left = -84.0 -margin_right = 115.0 -margin_bottom = 36.0 -text = "History Pager" -script = ExtResource( 4 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Label" type="Label" parent="Background/MarginContainer/Rows/ItemList"] -anchor_left = 1.0 -anchor_right = 1.0 -margin_left = -194.94 -margin_top = -1.12247 -margin_right = -81.9397 -margin_bottom = 23.8775 -text = "History Page:" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Page_Display" type="Label" parent="Background/MarginContainer/Rows/ItemList"] -anchor_left = 1.0 -anchor_right = 1.0 -margin_left = -40.0 -margin_bottom = 25.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="GameInfo" type="PanelContainer" parent="Background/MarginContainer/Rows"] -margin_top = 50.0 -margin_right = 982.0 -margin_bottom = 568.0 -size_flags_vertical = 3 - -[node name="CurrentHistory" type="VBoxContainer" parent="Background/MarginContainer/Rows/GameInfo"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 981.0 -margin_bottom = 517.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -custom_constants/separation = 20 - -[connection signal="button_up" from="Background/MarginContainer/Rows/ItemList/But_HistoryPager" to="Background/MarginContainer/Rows/ItemList/But_HistoryPager" method="_on_But_HistoryPager_button_up"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/ImportCharacter.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/ImportCharacter.gd deleted file mode 100644 index 3a17978..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/ImportCharacter.gd +++ /dev/null @@ -1,48 +0,0 @@ -#GRAB FOCUS: simple script for temp files to grab focus -# Expanded for Import Character option - -extends Control - -onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance -onready var pSingleton = get_node("/root/PlayerCharacter").pc - -var charFilePath -var a - - -func _ready() -> void: - theme=load(settings.themeFile) - -func _on_Button_pressed(): - $FileDialog.popup() - -#this is going to take information from the file the player chose and put the individul parts into textboxes so it can be edited and then saved -func _on_FileDialog_file_selected(path): - var file = File.new() - #read the text in the file, save it in the variable a - file.open(path, File.READ) - - #split by the spaces so the individual pieces can be separated into textboxes - while file.eof_reached() == false: - var csvStrArray = file.get_csv_line() - var i = 0 - var isLabel = true - while i < csvStrArray.size(): - var csvStr = csvStrArray[i] - if(isLabel): - #make a new textbox for each piece of information - var textLine = Label.new() - $ScrollContainer/VBoxContainer.add_child(textLine) - textLine.text = csvStr.to_upper() - isLabel = false - #DKM TEMP: save this unformatted to the singleton text string - pSingleton.pcText += csvStr.to_upper() + ": " - else: - isLabel = true - var textBox = LineEdit.new() - $ScrollContainer/VBoxContainer.add_child(textBox) - textBox.text = csvStr - #DKM TEMP: save this unformatted to the singleton text string - pSingleton.pcText += csvStr + "\n" - i += 1 - file.close() diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/ImportCharacter.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/ImportCharacter.tscn deleted file mode 100644 index 3ba6357..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/ImportCharacter.tscn +++ /dev/null @@ -1,127 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://UserInterface/Title.tscn" type="PackedScene" id=1] -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://screens/ImportCharacter.gd" type="Script" id=3] -[ext_resource path="res://userInterface/But_PlayButton.gd" type="Script" id=4] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="PopupDialog" type="PopupDialog" parent="."] -anchor_top = 0.5 -anchor_bottom = 0.5 - -[node name="WarnText" type="Label" parent="PopupDialog"] -margin_right = 40.0 -margin_bottom = 14.0 -text = "Example" - -[node name="Background" type="Panel" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="FileDialog" type="FileDialog" parent="."] -margin_left = 113.0 -margin_top = 24.0 -margin_right = 886.0 -margin_bottom = 480.0 -window_title = "Open a File" -mode = 0 -access = 2 -current_dir = "/ProgramData/CS_Working/RPGR/Godot_projects/bcirpg_mergedDemo_20220911A" -current_file = "_userData/characterFiles" -current_path = "/ProgramData/CS_Working/RPGR/Godot_projects/bcirpg_mergedDemo_20220911A/_userData/characterFiles" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Title" parent="." instance=ExtResource( 1 )] -margin_left = -164.0 -margin_top = 0.0 -margin_right = 164.0 -margin_bottom = 14.0 -text = "Import Character" - -[node name="But_Play" parent="." instance=ExtResource( 2 )] -margin_left = 1.0 -margin_top = 34.0 -margin_right = 152.0 -margin_bottom = 71.0 -text = "Start Game" -script = ExtResource( 4 ) -next_scene_path = "res://gamePlay/Game.tscn" - -[node name="But_Cancel" parent="." instance=ExtResource( 2 )] -margin_left = 1.0 -margin_top = 78.0 -margin_right = 152.0 -margin_bottom = 115.0 -text = "Back" -next_scene_path = "res://Screens/MenuScreen.tscn" - -[node name="VBoxContainer2" type="VBoxContainer" parent="."] -anchor_left = 0.0634766 -anchor_top = 0.0583333 -anchor_right = 0.103516 -anchor_bottom = 0.0583333 -margin_left = 107.0 -margin_right = 435.0 -margin_bottom = 44.0 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": true -} - -[node name="But_OpenFile" type="Button" parent="VBoxContainer2"] -margin_right = 369.0 -margin_bottom = 20.0 -text = "Open Character File" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Save_Button" type="Button" parent="VBoxContainer2"] -margin_top = 24.0 -margin_right = 369.0 -margin_bottom = 44.0 -text = "Save" - -[node name="ScrollContainer" type="ScrollContainer" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -341.0 -margin_top = -175.0 -margin_right = 427.0 -margin_bottom = 284.0 -follow_focus = true -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="NameLabel" type="Label" parent="ScrollContainer/VBoxContainer"] -visible = false -margin_bottom = 14.0 - -[node name="LineEdit" type="LineEdit" parent="ScrollContainer/VBoxContainer"] -visible = false -margin_right = 58.0 -margin_bottom = 24.0 - -[connection signal="file_selected" from="FileDialog" to="." method="_on_FileDialog_file_selected"] -[connection signal="pressed" from="VBoxContainer2/But_OpenFile" to="." method="_on_Button_pressed"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/LoadGame_temp.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/LoadGame_temp.tscn deleted file mode 100644 index c843e61..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/LoadGame_temp.tscn +++ /dev/null @@ -1,27 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://UserInterface/Title.tscn" type="PackedScene" id=1] -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://screens/grabFocus.gd" type="Script" id=3] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Title" parent="." instance=ExtResource( 1 )] -anchor_left = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 0.0 -margin_top = 0.0 -margin_right = 0.0 -margin_bottom = 0.0 -text = "Multiplayer (temp)" - -[node name="But_ChangeScene" parent="Title" instance=ExtResource( 2 )] -text = "Temp: back to menu" -next_scene_path = "res://Screens/MenuScreen.tscn" diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MenuScreen.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MenuScreen.gd deleted file mode 100644 index b9d754a..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MenuScreen.gd +++ /dev/null @@ -1,11 +0,0 @@ -#MENUSCREEN: -# Script purely to grab focus for tabbing control - -extends Control - -#onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance - -# Called when the node enters the scene tree for the first time. -func _ready() -> void: - #theme=load(settings.themeFile) - $VBoxContainer/But_NewGame.grab_focus() diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MenuScreen.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MenuScreen.tscn deleted file mode 100644 index 56874a4..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MenuScreen.tscn +++ /dev/null @@ -1,102 +0,0 @@ -[gd_scene load_steps=7 format=2] - -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=1] -[ext_resource path="res://Screens/MenuScreen.gd" type="Script" id=2] -[ext_resource path="res://assets/liberation_serif_40pt.tres" type="DynamicFont" id=3] -[ext_resource path="res://UserInterface/Title.tscn" type="PackedScene" id=5] -[ext_resource path="res://assets/ui_controlNode_dark_theme.tres" type="Theme" id=6] -[ext_resource path="res://UserInterface/But_Quit.tscn" type="PackedScene" id=10] - -[node name="MenuScreen" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 6 ) -script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Background" type="Panel" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Title" parent="." instance=ExtResource( 5 )] -margin_top = 51.8676 -margin_bottom = 117.868 -custom_fonts/font = ExtResource( 3 ) - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -119.0 -margin_top = -152.0 -margin_right = 119.0 -margin_bottom = 152.0 -rect_scale = Vector2( 1.04675, 1.07389 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="But_NewGame" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_right = 238.0 -margin_bottom = 40.0 -next_scene_path = "res://screens/PlayerSelection.tscn" - -[node name="But_LoadGame" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 44.0 -margin_right = 238.0 -margin_bottom = 85.0 -text = "Load Game" -next_scene_path = "res://screens/LoadGame_temp.tscn" - -[node name="But_Multiplayer" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 89.0 -margin_right = 238.0 -margin_bottom = 130.0 -text = "Multiplayer" -next_scene_path = "res://Screens/Multiplayer_temp.tscn" - -[node name="But_AddChar" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 134.0 -margin_right = 238.0 -margin_bottom = 174.0 -text = "Add Character" -next_scene_path = "res://Screens/Character_Add.tscn" - -[node name="But_ImportChar2" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 178.0 -margin_right = 238.0 -margin_bottom = 219.0 -text = "Import Character" -next_scene_path = "res://Screens/ImportCharacter.tscn" - -[node name="But_Settings" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 223.0 -margin_right = 238.0 -margin_bottom = 264.0 -text = "Settings" -next_scene_path = "res://Screens/SettingsMenuControl.tscn" - -[node name="But_Quit" parent="VBoxContainer" instance=ExtResource( 10 )] -margin_top = 268.0 -margin_right = 238.0 -margin_bottom = 304.0 - -[node name="Version" type="Label" parent="."] -anchor_left = 1.0 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = -177.0 -margin_top = -44.0 -margin_right = -5.0 -margin_bottom = -6.0 -text = "Version: 0.0.0" -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MoreOptions.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MoreOptions.gd deleted file mode 100644 index 8bbdbe1..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MoreOptions.gd +++ /dev/null @@ -1,11 +0,0 @@ -#MOREOPTIONS: -# Script purely to grab focus for tabbing control - -extends Control - -#onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance - -# Called when the node enters the scene tree for the first time. -func _ready() -> void: - #theme=load(settings.themeFile) - $VBoxContainer/But_ResumeGame.grab_focus() diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MoreOptions.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MoreOptions.tscn deleted file mode 100644 index 8111327..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/MoreOptions.tscn +++ /dev/null @@ -1,79 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=1] -[ext_resource path="res://screens/MoreOptions.gd" type="Script" id=2] -[ext_resource path="res://userInterface/But_ResumeGame.gd" type="Script" id=3] -[ext_resource path="res://assets/ui_controlNode_dark_theme.tres" type="Theme" id=6] - -[node name="MoreOptions" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 6 ) -script = ExtResource( 2 ) - -[node name="Background" type="Panel" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -119.0 -margin_top = -152.0 -margin_right = 119.0 -margin_bottom = 152.0 -rect_scale = Vector2( 1.04675, 1.07389 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="But_ResumeGame" type="Button" parent="VBoxContainer"] -margin_right = 238.0 -margin_bottom = 36.0 -text = "Resume Game" -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="But_ShowHistory" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 40.0 -margin_right = 238.0 -margin_bottom = 125.0 -text = "Show History" -next_scene_path = "res://screens/HistoryViewer.tscn" - -[node name="But_Chat" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 129.0 -margin_right = 238.0 -margin_bottom = 214.0 -text = "Chat" -next_scene_path = "res://screens/MenuScreen.tscn" - -[node name="But_MainMenu" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 218.0 -margin_right = 238.0 -margin_bottom = 304.0 -text = "Main Menu" -next_scene_path = "res://Screens/MenuScreen.tscn" - -[node name="Version" type="Label" parent="."] -anchor_left = 1.0 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = -177.0 -margin_top = -44.0 -margin_right = -5.0 -margin_bottom = -6.0 -text = "Version: 0.0.0" -__meta__ = { -"_edit_use_anchors_": false -} - -[connection signal="button_up" from="VBoxContainer/But_ResumeGame" to="VBoxContainer/But_ResumeGame" method="_on_But_ResumeGame_button_up"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Multiplayer_temp.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Multiplayer_temp.tscn deleted file mode 100644 index a693767..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Multiplayer_temp.tscn +++ /dev/null @@ -1,24 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://UserInterface/Title.tscn" type="PackedScene" id=1] -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://screens/grabFocus.gd" type="Script" id=3] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) - -[node name="Title" parent="." instance=ExtResource( 1 )] -anchor_left = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 0.0 -margin_top = 0.0 -margin_right = 0.0 -margin_bottom = 0.0 -text = "Multiplayer (temp)" - -[node name="But_ChangeScene" parent="Title" instance=ExtResource( 2 )] -text = "Temp: back to menu" -next_scene_path = "res://Screens/MenuScreen.tscn" diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/NewGame_temp.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/NewGame_temp.tscn deleted file mode 100644 index c843e61..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/NewGame_temp.tscn +++ /dev/null @@ -1,27 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://UserInterface/Title.tscn" type="PackedScene" id=1] -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=2] -[ext_resource path="res://screens/grabFocus.gd" type="Script" id=3] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Title" parent="." instance=ExtResource( 1 )] -anchor_left = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 0.0 -margin_top = 0.0 -margin_right = 0.0 -margin_bottom = 0.0 -text = "Multiplayer (temp)" - -[node name="But_ChangeScene" parent="Title" instance=ExtResource( 2 )] -text = "Temp: back to menu" -next_scene_path = "res://Screens/MenuScreen.tscn" diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/PlayerSelection.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/PlayerSelection.gd deleted file mode 100644 index 6aa9b23..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/PlayerSelection.gd +++ /dev/null @@ -1,11 +0,0 @@ -#PLAYERSELECTION: -# Script purely to grab focus for tabbing control - -extends Control - -onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance - -# Called when the node enters the scene tree for the first time. -func _ready() -> void: - theme=load(settings.themeFile) - $VBoxContainer/But_ChoosePlayer.grab_focus() diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/PlayerSelection.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/PlayerSelection.tscn deleted file mode 100644 index aba2136..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/PlayerSelection.tscn +++ /dev/null @@ -1,69 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://UserInterface/But_ChangeScene.tscn" type="PackedScene" id=1] -[ext_resource path="res://screens/PlayerSelection.gd" type="Script" id=2] -[ext_resource path="res://assets/ui_controlNode_dark_theme.tres" type="Theme" id=6] - -[node name="PlayerSelection" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 6 ) -script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Background" type="Panel" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -119.0 -margin_top = -152.0 -margin_right = 119.0 -margin_bottom = 152.0 -rect_scale = Vector2( 1.04675, 1.07389 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="But_ChoosePlayer" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_right = 238.0 -margin_bottom = 98.0 -text = "Import Character" -next_scene_path = "res://screens/ImportCharacter.tscn" - -[node name="But_AddChar" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 102.0 -margin_right = 238.0 -margin_bottom = 201.0 -text = "Create Character" -next_scene_path = "res://Screens/Character_Add.tscn" - -[node name="But_MainMenu" parent="VBoxContainer" instance=ExtResource( 1 )] -margin_top = 205.0 -margin_right = 238.0 -margin_bottom = 304.0 -text = "Main Menu" -next_scene_path = "res://Screens/MenuScreen.tscn" - -[node name="Version" type="Label" parent="."] -anchor_left = 1.0 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = -177.0 -margin_top = -44.0 -margin_right = -5.0 -margin_bottom = -6.0 -text = "Version: 0.0.0" -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Temp_Button.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Temp_Button.gd deleted file mode 100644 index d5fbca5..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/screens/Temp_Button.gd +++ /dev/null @@ -1,17 +0,0 @@ -extends Button - - -# Declare member variables here. Examples: -# var a: int = 2 -# var b: String = "text" -var tempToggle = 0 - -func _on_Button_button_up(): - var controlNode = get_node("../../") - print(controlNode.name) - if(tempToggle == 0): - controlNode.theme=load("res://assets/ui_controlNode_dark_theme.tres") - tempToggle = 1 - else: - controlNode.theme=load("res://assets/ui_controlNode_light_theme.tres") - tempToggle = 0 diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_History.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_History.gd deleted file mode 100644 index 6406e14..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_History.gd +++ /dev/null @@ -1,39 +0,0 @@ -#BUT_HISTORY: -# Unique script attached to the But_History to hide/show history versus -# current game page. - -tool -extends Button - -onready var game_history_array = get_node("/root/History").historyScreensSingleton.output_history_array - -var is_history = false - - -func _on_But_History_button_up(): - var history_pager_button = get_node("../../ItemList/But_History_Page") - var history_rows_node = get_node("../../GameInfo/HistoryRows") - var current_text_node = get_node("../../GameInfo/CurrentText") - var option_one = get_node("../../InputArea/VBoxContainer/option1") - var option_two = get_node("../../InputArea/VBoxContainer/option2") - var option_three = get_node("../../InputArea/VBoxContainer/option3") - - if(!is_history): - if(game_history_array != null): - history_rows_node.add_child(game_history_array[0]) - history_pager_button.show() - history_rows_node.show() - current_text_node.hide() - option_one.hide() - option_two.hide() - option_three.hide() - is_history = true - else: - history_pager_button.hide() - history_rows_node.hide() - current_text_node.show() - option_one.show() - option_two.show() - option_three.show() - is_history = false - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_History_Page.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_History_Page.gd deleted file mode 100644 index f63f1e3..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_History_Page.gd +++ /dev/null @@ -1,21 +0,0 @@ -#BUT_HISTORY_PAGE: -# Unique paging script for showing next page in the history game's history -# array. - - -tool -extends Button - -var current_page = 0 - -func _on_But_History_Page_button_up(): - var game_history_array = get_node("/root/History").historyScreensSingleton.output_history_array - var history_rows_node = get_node("../../GameInfo/HistoryRows") - if(current_page < game_history_array.size()-1): - current_page += 1 - else: - current_page = 0 - history_rows_node.remove_child(history_rows_node.get_child(0)) - history_rows_node.add_child(game_history_array[current_page]) - - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_PlayButton.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_PlayButton.gd deleted file mode 100644 index 3303ae8..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_PlayButton.gd +++ /dev/null @@ -1,28 +0,0 @@ -#BUT_CHANGESCENE: -# Generic template script allowing GUI linking of scenes by button press. - -tool -extends Button - -#Creates param usable in the UI; and the params next to export make it string and file browser -export(String, FILE) var next_scene_path: = "" - -onready var pSingleton = get_node("/root/PlayerCharacter").pc - -var tempToggle = 0 - -func _on_But_NewGame_button_up(): - if(pSingleton.pcText.length() < 1): - #print("GOT IT! Popup msg: " + $PopupDialog/WarnText.text) - var alertPopup = get_node("../PopupDialog") - var alertPopupText = get_node("../PopupDialog/WarnText") - alertPopupText.text = "No player was loaded! Please load a character to begin game." - alertPopup.popup_centered() - return - else: - get_tree().change_scene(next_scene_path) - - -func _get_configuration_warning() -> String: - return "next_scene_path must be set for this button to work" if next_scene_path == "" else "" - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_Quit.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_Quit.gd index 1c6d989..b374368 100644 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_Quit.gd +++ b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_Quit.gd @@ -4,10 +4,8 @@ extends Button -#var history_JSON = "user://history.json" -#DKM TEMP: save history is only here temporarily -- needs to move upstream. func _on_But_Quit_button_up(): get_tree().quit() diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_ResumeGame.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_ResumeGame.gd deleted file mode 100644 index ee37c4f..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_ResumeGame.gd +++ /dev/null @@ -1,14 +0,0 @@ -tool -extends Button - - -func _on_But_ResumeGame_button_up(): - var root = get_node("/root") - var thisScene = get_node("/root/MoreOptions") - var gameSingleton = get_node("/root/GameCurrent") - var gameScene = gameSingleton.gameCurrent_scene - root.remove_child(thisScene) - #DKM TEMP: cleanup this scene! - thisScene.queue_free() - root.add_child(gameScene) - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_SaveSettings.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_SaveSettings.gd deleted file mode 100644 index 0b09f53..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/But_SaveSettings.gd +++ /dev/null @@ -1,80 +0,0 @@ -#BUT_SAVESETTINGS: -# Unique script for saving settings on player settings scene. - - -#Tool lets you any code in editor, such as plugins -tool -extends Button - -#Creates param usable in the UI; and the params next to export make it string and file browser -export(String, FILE) var next_scene_path: = "" - -#Button response: save settings and move on. -func _on_But_NewGame_button_up(): - var inputName = get_node("../../VBoxContainer/HBoxContainer/input_name") - var inputRisk = get_node("../../VBoxContainer/HBoxContainer2/input_risk") - _saveSettings(inputName.text, inputRisk.text) - get_tree().change_scene(next_scene_path) - - -#HELPER FUNCTIONS: -func _get_configuration_warning() -> String: - return "next_scene_path must be set for this button to work" if next_scene_path == "" else "" - - -#CONFIG/INI SAVE: -func _saveSettings(inputSettings : String, riskFactor : String) -> void: - var player_settings = get_node("/root/PlayerSettings") - player_settings.playerSettingsSingleton.inputName = inputSettings - player_settings.playerSettingsSingleton.riskFactor = riskFactor - var config = ConfigFile.new() - - config.set_value("Temp player","InputSettings", inputSettings) - config.set_value("Temp player","RiskFactor", riskFactor) - - config.save("user://settings.cfg") - -#JSON SAVE: -#func _saveSettings(inputSettings : String, riskFactor : String) -> void: -# var player_settings = get_node("/root/PlayerSettings") -# player_settings.playerSettingsSingleton.inputName = inputSettings -# player_settings.playerSettingsSingleton.riskFactor = riskFactor -# #Temp: -# var temp_manual_JSON = { -# "playerSettingsTemplate": { -# "inputName": inputSettings, -# "riskFactor": riskFactor -# } -# } -# -# #Save to file (JSON for now) -# var settings_file = "user://testPlayerSettings.sav" -# var file = File.new() -# if file.open(settings_file, File.WRITE) != 0: -# print("Cannot write temporary file to: " + settings_file) -# else: -# file.store_line(to_json(temp_manual_JSON)) -# file.close() - - -#****This save Settings functions as designed; but modified to work with alternate approach of loading -#func _saveSettings(inputSettings : String, riskFactor : String) -> void: - #Debugging: -# print("Input name: " + inputSettings + "; and risk factor set to : " + riskFactor) -# var player_settings = get_node("/root/PlayerSettings") -# player_settings.playerSettingsSingleton.inputName = inputSettings -# player_settings.playerSettingsSingleton.riskFactor = riskFactor - - #Save to file (for now) -# if settings_save_file_name == "": -# settings_save_file_name = "settings.save" -# var settings_file = "user://" + settings_save_file_name -# var file = File.new() -# file.open(settings_file, File.WRITE) -# file.store_var(player_settings.playerSettingsSingleton.inputName) - #DKM TEMP: To save object; removed for testing - #file.store_var(player_settings.playerSettingsSingleton, true) -# file.close() - - - diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/InputResponse.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/InputResponse.gd deleted file mode 100644 index 87f2395..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/InputResponse.gd +++ /dev/null @@ -1,5 +0,0 @@ -extends VBoxContainer - -func set_text(input: String, response: String): - $InputHistory.text = input - $Response.text = response diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/InputResponse.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/InputResponse.tscn deleted file mode 100644 index 8449256..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/InputResponse.tscn +++ /dev/null @@ -1,22 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://UserInterface/Response.tscn" type="PackedScene" id=2] -[ext_resource path="res://UserInterface/InputResponse.gd" type="Script" id=3] - -[node name="InputResponse" type="VBoxContainer"] -margin_right = 984.0 -margin_bottom = 68.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="InputHistory" type="Label" parent="."] -margin_right = 984.0 -margin_bottom = 14.0 -text = " > This is what user selected" -autowrap = true - -[node name="Response" parent="." instance=ExtResource( 2 )] -margin_top = 18.0 -margin_bottom = 32.0 diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Locale.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Locale.gd deleted file mode 100644 index f034b3a..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Locale.gd +++ /dev/null @@ -1,49 +0,0 @@ -#LOCALE CLASS: -# Template script for the Locale scene; allows for connecting exits, and also -# maintains a visited bool (currently un-used) and takes additional -# options via the GUI: -# 1. Name -# 2. Description -# 3. The 3 option strings available at the location -# - - -extends PanelContainer -#Allows Godot to handle autocomplete and 'register' class -class_name Locale - -var locale_name = "Location Name" -var locale_description = "This is the description of the location." -var locale_action = "Default action" -var locale_action_params = [] -var options_array = [] -var destinations_array = [] - - -var visited = false; - -var exits: Dictionary = {} - -#DKM TEMP: right now connects both directions, but can make an alt func that c -# connects just one way for example (for one-way-doors) -# currently not in use, but the override defaults false but if passed can let -# you apply custom direction -func connect_exit(direction: String, locale: Locale, override_direction: bool = false): - if(!override_direction): - match direction: - "west": - exits[direction] = locale - locale.exits["east"] = self - "east": - exits[direction] = locale - locale.exits["west"] = self - "north": - exits[direction] = locale - locale.exits["south"] = self - "south": - exits[direction] = locale - locale.exits["north"] = self - _: - printerr("Tried to connect invalid direction: %s", direction) - else: - exits[direction] = locale diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Locale.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Locale.tscn deleted file mode 100644 index eb96470..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Locale.tscn +++ /dev/null @@ -1,35 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://userInterface/Locale.gd" type="Script" id=3] - -[node name="Locale" type="PanelContainer"] -margin_right = 250.001 -margin_bottom = 200.0 -rect_min_size = Vector2( 250, 200 ) -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MarginContainer" type="MarginContainer" parent="."] -margin_left = 7.0 -margin_top = 7.0 -margin_right = 243.001 -margin_bottom = 193.0 - -[node name="Rows" type="VBoxContainer" parent="MarginContainer"] -margin_right = 236.0 -margin_bottom = 186.0 - -[node name="LocaleName" type="Label" parent="MarginContainer/Rows"] -margin_right = 236.0 -margin_bottom = 14.0 -text = "Locale Name" -align = 1 - -[node name="LocaleDescription" type="Label" parent="MarginContainer/Rows"] -margin_top = 18.0 -margin_right = 236.0 -margin_bottom = 49.0 -text = "This is the description text for the locale. " -autowrap = true diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Option.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Option.gd deleted file mode 100644 index 1de5518..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Option.gd +++ /dev/null @@ -1,10 +0,0 @@ -extends Button - -signal option_pressed(destinationLabel) - -var destinationLabel - -#DKM TEMP: test -func _on_Option_button_up() -> void: - print("Button pushed!") - emit_signal("option_pressed", destinationLabel) diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Option.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Option.tscn deleted file mode 100644 index 0da50d0..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Option.tscn +++ /dev/null @@ -1,16 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://userInterface/Option.gd" type="Script" id=1] - -[node name="Option" type="Button"] -margin_top = 30.0 -margin_right = 984.0 -margin_bottom = 68.0 -text = "Option # " -align = 0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[connection signal="button_up" from="." to="." method="_on_Option_button_up"] diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Response.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Response.tscn deleted file mode 100644 index 3891ae3..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/Response.tscn +++ /dev/null @@ -1,11 +0,0 @@ -[gd_scene format=2] - -[node name="Response" type="Label"] -margin_top = 30.0 -margin_right = 984.0 -margin_bottom = 68.0 -text = "Game text continues here... " -autowrap = true -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/testExample.gd b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/testExample.gd deleted file mode 100644 index d144d48..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/testExample.gd +++ /dev/null @@ -1,16 +0,0 @@ -extends Node2D - - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - - -# 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 diff --git a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/testExample.tscn b/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/testExample.tscn deleted file mode 100644 index 5ef58fb..0000000 --- a/Phase2/Databases/Sandbox_Test_Godot_Code/Doug/Database_Testing_2023_1001A/userInterface/testExample.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://userInterface/testExample.gd" type="Script" id=1] - -[node name="testExample" type="Node2D"] -script = ExtResource( 1 )