This commit is contained in:
SuhwanKim 2024-02-18 09:58:55 -08:00
commit 1cad1c26d7
228 changed files with 7634 additions and 20 deletions

View File

@ -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"]

View File

@ -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=""

View File

@ -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": ""
}

View File

@ -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;
""")

View File

@ -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"]

View File

@ -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()

View File

@ -0,0 +1,3 @@
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4"
dest_md5="41051ec7a940540d8c9badbd43d2180f"

View File

@ -0,0 +1,3 @@
source_md5="13a1e728def8fb06bd8e797fcc392604"
dest_md5="254ea3ed3a62b36ab206f320d0c51637"

View File

@ -0,0 +1,3 @@
source_md5="266f789a4e895911161321092c2c2429"
dest_md5="505d2398da99764a2e0cc067ba291aa1"

View File

@ -0,0 +1,3 @@
source_md5="266f789a4e895911161321092c2c2429"
dest_md5="505d2398da99764a2e0cc067ba291aa1"

View File

@ -0,0 +1,3 @@
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
dest_md5="26ea799ea0a3da9e753b3ebe822e0570"

View File

@ -0,0 +1,16 @@
extends Control
# 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

View File

@ -0,0 +1,51 @@
[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]
[node name="MenuScreen" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
[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 = 65.0
margin_bottom = -91.0
rect_scale = Vector2( 1.04675, 1.07389 )
[node name="But_ChangeScene" parent="VBoxContainer" instance=ExtResource( 2 )]
margin_right = 184.0
margin_bottom = 37.0
text = "Test Postgres"
next_scene_path = "res://screens/DBTest_Postgres.tscn"
[node name="But_Quit" parent="VBoxContainer" instance=ExtResource( 1 )]
margin_top = 41.0
margin_right = 184.0
margin_bottom = 61.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
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Background_black.png-56039c85507f66e5b636dc3622fcd7f0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Backgrounds/Background_black.png"
dest_files=[ "res://.import/Background_black.png-56039c85507f66e5b636dc3622fcd7f0.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Background_white.png-90278c2837a8c1d366dff638eb6d5498.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Backgrounds/Background_white.png"
dest_files=[ "res://.import/Background_white.png-90278c2837a8c1d366dff638eb6d5498.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/background_demo.png-e30ac367b3596013bad15f6d4bbea075.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Backgrounds/background_demo.png"
dest_files=[ "res://.import/background_demo.png-e30ac367b3596013bad15f6d4bbea075.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,7 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/l_10646.ttf" type="DynamicFontData" id=1]
[resource]
size = 42
font_data = ExtResource( 1 )

View File

@ -0,0 +1,7 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/l_10646.ttf" type="DynamicFontData" id=1]
[resource]
size = 24
font_data = ExtResource( 1 )

View File

@ -0,0 +1,6 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/l_10646.ttf" type="DynamicFontData" id=1]
[resource]
font_data = ExtResource( 1 )

View File

@ -0,0 +1,6 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/Fonts_source/LiberationSerif-Regular.ttf" type="DynamicFontData" id=1]
[resource]
font_data = ExtResource( 1 )

View File

@ -0,0 +1,7 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/Fonts_source/LiberationSerif-Regular.ttf" type="DynamicFontData" id=1]
[resource]
size = 20
font_data = ExtResource( 1 )

View File

@ -0,0 +1,7 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/Fonts_source/LiberationSerif-Regular.ttf" type="DynamicFontData" id=1]
[resource]
size = 30
font_data = ExtResource( 1 )

View File

@ -0,0 +1,7 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/Fonts_source/LiberationSerif-Regular.ttf" type="DynamicFontData" id=1]
[resource]
size = 40
font_data = ExtResource( 1 )

View File

@ -0,0 +1,9 @@
[gd_resource type="StyleBoxFlat" format=2]
[resource]
bg_color = Color( 0, 0, 0, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 0, 0, 0, 1 )

View File

@ -0,0 +1,9 @@
[gd_resource type="StyleBoxFlat" format=2]
[resource]
bg_color = Color( 1, 1, 1, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 1, 1, 1, 1 )

View File

@ -0,0 +1,120 @@
[gd_resource type="Theme" load_steps=5 format=2]
[ext_resource path="res://assets/sbf_black.tres" type="StyleBox" id=1]
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=2]
[ext_resource path="res://assets/liberation_serif_20pt.tres" type="DynamicFont" id=3]
[ext_resource path="res://assets/liberation_serif.tres" type="DynamicFont" id=4]
[resource]
Button/colors/font_color = Color( 1, 1, 1, 1 )
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
Button/constants/hseparation = 2
Button/fonts/font = ExtResource( 2 )
Button/styles/disabled = null
Button/styles/focus = null
Button/styles/hover = null
Button/styles/normal = ExtResource( 1 )
Button/styles/pressed = ExtResource( 1 )
ItemList/colors/font_color = Color( 1, 1, 1, 1 )
ItemList/colors/font_color_selected = Color( 1, 1, 1, 1 )
ItemList/colors/guide_color = Color( 0, 0, 0, 0.1 )
ItemList/constants/hseparation = 4
ItemList/constants/icon_margin = 4
ItemList/constants/line_separation = 2
ItemList/constants/vseparation = 2
ItemList/fonts/font = ExtResource( 3 )
ItemList/styles/bg = ExtResource( 1 )
ItemList/styles/bg_focus = ExtResource( 1 )
ItemList/styles/cursor = null
ItemList/styles/cursor_unfocused = ExtResource( 1 )
ItemList/styles/selected = null
ItemList/styles/selected_focus = null
Label/colors/font_color = Color( 1, 1, 1, 1 )
Label/colors/font_color_shadow = Color( 0, 0, 0, 0 )
Label/colors/font_outline_modulate = Color( 1, 1, 1, 1 )
Label/constants/line_spacing = 3
Label/constants/shadow_as_outline = 0
Label/constants/shadow_offset_x = 1
Label/constants/shadow_offset_y = 1
Label/fonts/font = ExtResource( 3 )
Label/styles/normal = ExtResource( 1 )
LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 )
LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 )
LineEdit/colors/cursor_color = Color( 0.94, 0.94, 0.94, 1 )
LineEdit/colors/font_color = Color( 1, 1, 1, 1 )
LineEdit/colors/font_color_selected = Color( 1, 1, 1, 1 )
LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 )
LineEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
LineEdit/constants/minimum_spaces = 12
LineEdit/fonts/font = null
LineEdit/icons/clear = null
LineEdit/styles/focus = null
LineEdit/styles/normal = ExtResource( 1 )
LineEdit/styles/read_only = null
MarginContainer/constants/margin_bottom = 0
MarginContainer/constants/margin_left = 0
MarginContainer/constants/margin_right = 0
MarginContainer/constants/margin_top = 0
Panel/styles/panel = ExtResource( 1 )
PanelContainer/styles/panel = ExtResource( 1 )
Tabs/colors/font_color_bg = Color( 1, 1, 1, 1 )
Tabs/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Tabs/colors/font_color_fg = Color( 1, 1, 1, 1 )
Tabs/constants/hseparation = 4
Tabs/constants/label_valign_bg = 2
Tabs/constants/label_valign_fg = 0
Tabs/constants/top_margin = 24
Tabs/fonts/font = ExtResource( 3 )
Tabs/icons/close = null
Tabs/icons/decrement = null
Tabs/icons/decrement_highlight = null
Tabs/icons/increment = null
Tabs/icons/increment_highlight = null
Tabs/styles/button = ExtResource( 1 )
Tabs/styles/button_pressed = null
Tabs/styles/panel = ExtResource( 1 )
Tabs/styles/tab_bg = ExtResource( 1 )
Tabs/styles/tab_disabled = null
Tabs/styles/tab_fg = ExtResource( 1 )
TextEdit/colors/background_color = Color( 1, 1, 1, 1 )
TextEdit/colors/bookmark_color = Color( 0.08, 0.49, 0.98, 1 )
TextEdit/colors/brace_mismatch_color = Color( 1, 0.2, 0.2, 1 )
TextEdit/colors/breakpoint_color = Color( 0.8, 0.8, 0.4, 0.2 )
TextEdit/colors/caret_background_color = Color( 0, 0, 0, 1 )
TextEdit/colors/caret_color = Color( 0.88, 0.88, 0.88, 1 )
TextEdit/colors/code_folding_color = Color( 0.8, 0.8, 0.8, 0.8 )
TextEdit/colors/completion_background_color = Color( 0.17, 0.16, 0.2, 1 )
TextEdit/colors/completion_existing_color = Color( 0.87, 0.87, 0.87, 0.13 )
TextEdit/colors/completion_font_color = Color( 0.67, 0.67, 0.67, 1 )
TextEdit/colors/completion_scroll_color = Color( 1, 1, 1, 1 )
TextEdit/colors/completion_selected_color = Color( 0.26, 0.26, 0.27, 1 )
TextEdit/colors/current_line_color = Color( 0.25, 0.25, 0.26, 0.8 )
TextEdit/colors/executing_line_color = Color( 0.2, 0.8, 0.2, 0.4 )
TextEdit/colors/font_color = Color( 1, 1, 1, 1 )
TextEdit/colors/font_color_readonly = Color( 0.933333, 0.933333, 0.933333, 0.501961 )
TextEdit/colors/font_color_selected = Color( 1, 1, 1, 1 )
TextEdit/colors/function_color = Color( 0.4, 0.64, 0.81, 1 )
TextEdit/colors/line_number_color = Color( 0.67, 0.67, 0.67, 0.4 )
TextEdit/colors/mark_color = Color( 1, 0.4, 0.4, 0.4 )
TextEdit/colors/member_variable_color = Color( 0.9, 0.31, 0.35, 1 )
TextEdit/colors/number_color = Color( 0.92, 0.58, 0.2, 1 )
TextEdit/colors/safe_line_number_color = Color( 0.67, 0.78, 0.67, 0.6 )
TextEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
TextEdit/colors/symbol_color = Color( 0.94, 0.94, 0.94, 1 )
TextEdit/colors/word_highlighted_color = Color( 0.8, 0.9, 0.9, 0.15 )
TextEdit/constants/completion_lines = 7
TextEdit/constants/completion_max_width = 50
TextEdit/constants/completion_scroll_width = 3
TextEdit/constants/line_spacing = 4
TextEdit/fonts/font = ExtResource( 4 )
TextEdit/icons/fold = null
TextEdit/icons/folded = null
TextEdit/icons/space = null
TextEdit/icons/tab = null
TextEdit/styles/completion = ExtResource( 1 )
TextEdit/styles/focus = ExtResource( 1 )
TextEdit/styles/normal = ExtResource( 1 )
TextEdit/styles/read_only = ExtResource( 1 )
VBoxContainer/constants/separation = 4

View File

@ -0,0 +1,120 @@
[gd_resource type="Theme" load_steps=5 format=2]
[ext_resource path="res://assets/sbf_white.tres" type="StyleBox" id=1]
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=2]
[ext_resource path="res://assets/liberation_serif_20pt.tres" type="DynamicFont" id=3]
[ext_resource path="res://assets/liberation_serif.tres" type="DynamicFont" id=4]
[resource]
Button/colors/font_color = Color( 0, 0, 0, 1 )
Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
Button/constants/hseparation = 2
Button/fonts/font = ExtResource( 2 )
Button/styles/disabled = null
Button/styles/focus = null
Button/styles/hover = null
Button/styles/normal = ExtResource( 1 )
Button/styles/pressed = ExtResource( 1 )
ItemList/colors/font_color = Color( 0, 0, 0, 1 )
ItemList/colors/font_color_selected = Color( 1, 1, 1, 1 )
ItemList/colors/guide_color = Color( 0, 0, 0, 0.1 )
ItemList/constants/hseparation = 4
ItemList/constants/icon_margin = 4
ItemList/constants/line_separation = 2
ItemList/constants/vseparation = 2
ItemList/fonts/font = null
ItemList/styles/bg = ExtResource( 1 )
ItemList/styles/bg_focus = ExtResource( 1 )
ItemList/styles/cursor = null
ItemList/styles/cursor_unfocused = ExtResource( 1 )
ItemList/styles/selected = null
ItemList/styles/selected_focus = null
Label/colors/font_color = Color( 0, 0, 0, 1 )
Label/colors/font_color_shadow = Color( 0, 0, 0, 0 )
Label/colors/font_outline_modulate = Color( 1, 1, 1, 1 )
Label/constants/line_spacing = 3
Label/constants/shadow_as_outline = 0
Label/constants/shadow_offset_x = 1
Label/constants/shadow_offset_y = 1
Label/fonts/font = ExtResource( 3 )
Label/styles/normal = ExtResource( 1 )
LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 )
LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 )
LineEdit/colors/cursor_color = Color( 0.94, 0.94, 0.94, 1 )
LineEdit/colors/font_color = Color( 0, 0, 0, 1 )
LineEdit/colors/font_color_selected = Color( 0, 0, 0, 1 )
LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 )
LineEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
LineEdit/constants/minimum_spaces = 12
LineEdit/fonts/font = null
LineEdit/icons/clear = null
LineEdit/styles/focus = null
LineEdit/styles/normal = ExtResource( 1 )
LineEdit/styles/read_only = null
MarginContainer/constants/margin_bottom = 0
MarginContainer/constants/margin_left = 0
MarginContainer/constants/margin_right = 0
MarginContainer/constants/margin_top = 0
Panel/styles/panel = ExtResource( 1 )
PanelContainer/styles/panel = ExtResource( 1 )
Tabs/colors/font_color_bg = Color( 0, 0, 0, 1 )
Tabs/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Tabs/colors/font_color_fg = Color( 0, 0, 0, 1 )
Tabs/constants/hseparation = 4
Tabs/constants/label_valign_bg = 2
Tabs/constants/label_valign_fg = 0
Tabs/constants/top_margin = 24
Tabs/fonts/font = ExtResource( 3 )
Tabs/icons/close = null
Tabs/icons/decrement = null
Tabs/icons/decrement_highlight = null
Tabs/icons/increment = null
Tabs/icons/increment_highlight = null
Tabs/styles/button = ExtResource( 1 )
Tabs/styles/button_pressed = null
Tabs/styles/panel = ExtResource( 1 )
Tabs/styles/tab_bg = ExtResource( 1 )
Tabs/styles/tab_disabled = null
Tabs/styles/tab_fg = ExtResource( 1 )
TextEdit/colors/background_color = Color( 1, 1, 1, 1 )
TextEdit/colors/bookmark_color = Color( 0.08, 0.49, 0.98, 1 )
TextEdit/colors/brace_mismatch_color = Color( 1, 0.2, 0.2, 1 )
TextEdit/colors/breakpoint_color = Color( 0.8, 0.8, 0.4, 0.2 )
TextEdit/colors/caret_background_color = Color( 0, 0, 0, 1 )
TextEdit/colors/caret_color = Color( 0.88, 0.88, 0.88, 1 )
TextEdit/colors/code_folding_color = Color( 0.8, 0.8, 0.8, 0.8 )
TextEdit/colors/completion_background_color = Color( 0.17, 0.16, 0.2, 1 )
TextEdit/colors/completion_existing_color = Color( 0.87, 0.87, 0.87, 0.13 )
TextEdit/colors/completion_font_color = Color( 0.67, 0.67, 0.67, 1 )
TextEdit/colors/completion_scroll_color = Color( 1, 1, 1, 1 )
TextEdit/colors/completion_selected_color = Color( 0.26, 0.26, 0.27, 1 )
TextEdit/colors/current_line_color = Color( 0.25, 0.25, 0.26, 0.8 )
TextEdit/colors/executing_line_color = Color( 0.2, 0.8, 0.2, 0.4 )
TextEdit/colors/font_color = Color( 0.00392157, 0.00392157, 0.00392157, 1 )
TextEdit/colors/font_color_readonly = Color( 0.0588235, 0.0588235, 0.0588235, 0.501961 )
TextEdit/colors/font_color_selected = Color( 0, 0, 0, 1 )
TextEdit/colors/function_color = Color( 0.4, 0.64, 0.81, 1 )
TextEdit/colors/line_number_color = Color( 0.67, 0.67, 0.67, 0.4 )
TextEdit/colors/mark_color = Color( 1, 0.4, 0.4, 0.4 )
TextEdit/colors/member_variable_color = Color( 0.9, 0.31, 0.35, 1 )
TextEdit/colors/number_color = Color( 0.92, 0.58, 0.2, 1 )
TextEdit/colors/safe_line_number_color = Color( 0.67, 0.78, 0.67, 0.6 )
TextEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 )
TextEdit/colors/symbol_color = Color( 0.94, 0.94, 0.94, 1 )
TextEdit/colors/word_highlighted_color = Color( 0.8, 0.9, 0.9, 0.15 )
TextEdit/constants/completion_lines = 7
TextEdit/constants/completion_max_width = 50
TextEdit/constants/completion_scroll_width = 3
TextEdit/constants/line_spacing = 4
TextEdit/fonts/font = ExtResource( 4 )
TextEdit/icons/fold = null
TextEdit/icons/folded = null
TextEdit/icons/space = null
TextEdit/icons/tab = null
TextEdit/styles/completion = ExtResource( 1 )
TextEdit/styles/focus = ExtResource( 1 )
TextEdit/styles/normal = ExtResource( 1 )
TextEdit/styles/read_only = ExtResource( 1 )
VBoxContainer/constants/separation = 4

View File

@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

View File

@ -0,0 +1,34 @@
[preset.0]
name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Godot_Outputs/Godot_35_Outputs/Web/BaseTest/index.html"
script_export_mode=1
script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
variant/export_type=0
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color( 0, 0, 0, 1 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,46 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
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": ""
}
[application]
config/name="Database_Testing"
run/main_scene="res://MenuScreen.tscn"
config/icon="res://icon.png"
[gui]
common/drop_mouse_on_gui_input_disabled=true
[physics]
common/enable_pause_aware_picking=true
[rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_environment="res://default_env.tres"

View File

@ -0,0 +1,81 @@
extends Node
var database := PostgreSQLClient.new()
#TODO: ADD RELEVANT VALUES BELOW FOR TESTING!
const USER = "bcirpgbackend"
const PASSWORD = "'QP@(10qpwo"
const HOST = "localhost"
const PORT = 5432 # Default postgres port
const DATABASE = "main" # Database name
func _ready() -> void:
print("Test is running")
func _init() -> void:
print("Init running")
var _error := database.connect("connection_established", self, "_executer")
_error = database.connect("authentication_error", self, "_authentication_error")
_error = database.connect("connection_closed", self, "_close")
#Connection to the database
_error = database.connect_to_host("postgresql://%s:%s@%s:%d/%s" % [USER, PASSWORD, HOST, PORT, DATABASE])
func _physics_process(_delta: float) -> void:
print("Physics running")
database.poll()
func _authentication_error(error_object: Dictionary) -> void:
prints("Error connection to database:", error_object["message"])
func _executer() -> void:
print("Executor running")
print(database.parameter_status)
# var datas := database.execute("""
# BEGIN;
# /*Helloworld*/
# SELECT concat('Hello', 'World');
# COMMIT;
# """)
var datas := database.execute("""
BEGIN;
SELECT * FROM characters;
COMMIT;
""")
#The datas variable contains an array of PostgreSQLQueryResult object.
for data in datas:
#Specifies the number of fields in a row (can be zero).
print(data.number_of_fields_in_a_row)
# This is usually a single word that identifies which SQL command was completed.
# note: the "BEGIN" and "COMMIT" commands return empty values
print(data.command_tag)
print(data.row_description)
print(data.data_row)
prints("Notice:", data.notice)
if not database.error_object.empty():
prints("Error:", database.error_object)
database.close()
func _close(clean_closure := true) -> void:
prints("DB CLOSE,", "Clean closure:", clean_closure)
func _exit_tree() -> void:
print("Exit running")
database.close()

View File

@ -0,0 +1,38 @@
[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]
[node name="Control" type="Node2D"]
script = ExtResource( 2 )
[node name="Background" type="Panel" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 415.0
margin_top = 133.0
margin_right = 653.0
margin_bottom = 233.0
[node name="But_MainMenu" parent="VBoxContainer" instance=ExtResource( 1 )]
margin_right = 238.0
margin_bottom = 100.0
text = "Main Menu"
next_scene_path = "res://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 = 846.0
margin_top = 554.0
margin_right = 1018.0
margin_bottom = 592.0
text = "Version: 0.0.0"

View File

@ -0,0 +1,134 @@
extends Control
# https://stackoverflow.com/a/65774028
# Be Sure to make these Vars as OnReadys; you can read up on it here.
# Items to Fill the dropdown Lists
onready var keyboardContents = ["Qwerty", "Dvorak", "Alphabetical"]
onready var themeContents = ["White on Black", "Black on White"]
onready var saveObject = get_node('/root/GlobalSaveInstance')
#res://SettingsMenuControl.tscn
# Vars For UI Widgets
onready var NameVar = get_node('Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/DisplayNameLineEdit')
onready var NRiskVar = get_node('Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/VBoxRiskFactor/RiskSlider')
onready var FontVar = get_node("Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox/FontSizeSlider")
onready var BrightnessVar = get_node('Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox/BrightnessSlider')
onready var VolumeVar = get_node("Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/VolumeSlider")
onready var ClosedCaptionsVar = get_node('Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/HBoxClosedCaptions/ClosedCaptionsCheckBox')
onready var ConsoleCommandVar = get_node('Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/HBoxDevConsole/DevConsoleCheckbox')
onready var saveButton = get_node("Panel/HBoxBottomRow/SaveButton")
onready var bKeyboardEnabled = get_node("Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/HBoxVirtualKeyboardEnabled/VisualKeyboardCheckBox")
onready var keyboardLayoutList = get_node('Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/LayoutItemList')
onready var themeChoiceList = get_node('Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/ThemeItemList')
var iniFile = ConfigFile.new()
func saveToInstance():
#Save to Singleton, so saveFile does not need to be constantly read
saveObject.settingsInstance.inputName = NameVar.text
saveObject.settingsInstance.riskFactor = NRiskVar.value
saveObject.settingsInstance.fontSize = FontVar.value
saveObject.settingsInstance.volume = VolumeVar.value
saveObject.settingsInstance.bClosedCaptions = ClosedCaptionsVar.is_pressed()
saveObject.settingsInstance.bdevConsole = ConsoleCommandVar.is_pressed()
saveObject.settingsInstance.bVirtualKeyboard = bKeyboardEnabled.is_pressed()
var savedKeyboardItems = keyboardLayoutList.get_selected_items()
var keyboardSelection = savedKeyboardItems[0]
saveObject.settingsInstance.visualKeyboardLayout = keyboardSelection
var savedThemeItems = themeChoiceList.get_selected_items()
var themeSelection = savedThemeItems[0]
saveObject.settingsInstance.themeChoiceInt = themeSelection
#Trigger re-load of the file name
saveObject.load_settings_file()
theme=load(saveObject.settingsInstance.themeFile)
func saveFile():
iniFile.set_value("player_preferences", "player_name", NameVar.text)
iniFile.set_value("player_preferences", "risk_threshold", NRiskVar.value)
iniFile.set_value("visual_controls", "font_size", FontVar.value)
iniFile.set_value("visual_controls", "brightness", BrightnessVar.value)
iniFile.set_value("general_settings", "volume", VolumeVar.value)
iniFile.set_value("general_settings", "closed_captions", ClosedCaptionsVar.is_pressed())
iniFile.set_value("general_settings", "dev_console", ConsoleCommandVar.is_pressed())
print(keyboardLayoutList.get_selected_items())
var savedKeyboardItems = keyboardLayoutList.get_selected_items()
var keyboardSelection = savedKeyboardItems[0]
var savedThemeItems = themeChoiceList.get_selected_items()
var themeSelection = savedThemeItems[0]
print(typeof(keyboardSelection))
iniFile.set_value("virtual_keyboard", "keyboard_layout", keyboardSelection)
iniFile.set_value("theme", "theme_selection", themeSelection)
iniFile.save("res://_userFiles/PlayerPreferences.cfg")
#DKM TEMP: can this be done at singleton, initial load level instead of here?
func loadFile():
pass
func _process(delta):
if saveButton.pressed == true:
if NameVar.text == "":
print("Please input a name")
if NameVar.text != "":
# Save to the template instance
saveToInstance()
saveFile()
print('saveFileRan')
func _ready():
#Get the singleton's values for initial settings:
NameVar.text = saveObject.settingsInstance.inputName
NRiskVar.value = saveObject.settingsInstance.riskFactor
FontVar.value = saveObject.settingsInstance.fontSize
ClosedCaptionsVar.pressed = saveObject.settingsInstance.bClosedCaptions
ConsoleCommandVar.pressed = saveObject.settingsInstance.bdevConsole
bKeyboardEnabled.pressed = saveObject.settingsInstance.bVirtualKeyboard
print(NameVar.get_path())
# Init Keyboard Layout List
for i in range(3):
keyboardLayoutList.add_item(keyboardContents[i],null,true)
keyboardLayoutList.select(0,true)
# Init Theme Choice List
for i in range(2):
themeChoiceList.add_item(themeContents[i],null,true)
keyboardLayoutList.select(saveObject.settingsInstance.visualKeyboardLayout,true)
themeChoiceList.select(saveObject.settingsInstance.themeChoiceInt,true)
#Load selected theme:
theme=load(saveObject.settingsInstance.themeFile)

View File

@ -0,0 +1,322 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://screens/SettingsMenuConfig.gd" type="Script" id=1]
[ext_resource path="res://assets/liberation_serif.tres" type="DynamicFont" id=2]
[ext_resource path="res://userInterface/But_ChangeScene.tscn" type="PackedScene" id=3]
[sub_resource type="Theme" id=1]
default_font = ExtResource( 2 )
[node name="Control" type="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -512.0
margin_top = -300.0
margin_right = 512.0
margin_bottom = 300.0
theme = SubResource( 1 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Panel" type="Panel" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -512.0
margin_top = -302.0
margin_right = 512.0
margin_bottom = 298.0
rect_pivot_offset = Vector2( -276, 469 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="Panel"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -298.5
margin_right = 298.5
margin_bottom = 19.0
custom_constants/separation = 60
alignment = 1
[node name="RootVboxVisualControls" type="VBoxContainer" parent="Panel/HBoxContainer"]
margin_right = 98.0
margin_bottom = 19.0
[node name="VisualControlsLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls"]
margin_right = 98.0
margin_bottom = 19.0
text = "Visual Controls"
[node name="VisualControlsVBox" type="VBoxContainer" parent="Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -77.5
margin_top = 30.0
margin_right = 77.5
margin_bottom = 52.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxFontSize" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox"]
margin_right = 155.0
margin_bottom = 19.0
[node name="FontLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox/HBoxFontSize"]
margin_right = 64.0
margin_bottom = 19.0
text = "Font Size:"
[node name="FontSizeSlider" type="HSlider" parent="Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox"]
margin_top = 23.0
margin_right = 155.0
margin_bottom = 39.0
min_value = 1.0
max_value = 5.0
value = 5.0
rounded = true
tick_count = 10
ticks_on_borders = true
[node name="BrightnessLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox"]
margin_top = 43.0
margin_right = 155.0
margin_bottom = 62.0
text = "Brightness:"
[node name="BrightnessSlider" type="HSlider" parent="Panel/HBoxContainer/RootVboxVisualControls/VisualControlsLabel/VisualControlsVBox"]
margin_top = 66.0
margin_right = 155.0
margin_bottom = 82.0
min_value = 1.0
max_value = 5.0
value = 5.0
rounded = true
tick_count = 10
ticks_on_borders = true
[node name="RootVboxPlayerPreferences" type="VBoxContainer" parent="Panel/HBoxContainer"]
margin_left = 158.0
margin_right = 275.0
margin_bottom = 19.0
[node name="Label" type="Label" parent="Panel/HBoxContainer/RootVboxPlayerPreferences"]
margin_right = 117.0
margin_bottom = 19.0
text = "Player Preferances"
[node name="VBoxPlayerPreferances" type="VBoxContainer" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label"]
margin_left = -18.5
margin_top = 30.0
margin_right = 126.5
margin_bottom = 125.0
[node name="HBoxDisplayName" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances"]
margin_right = 145.0
margin_bottom = 19.0
[node name="DisplayNameLabel" type="Label" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/HBoxDisplayName"]
margin_right = 95.0
margin_bottom = 19.0
text = "Display Name:"
[node name="DisplayNameLineEdit" type="LineEdit" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances"]
margin_top = 23.0
margin_right = 145.0
margin_bottom = 52.0
[node name="VBoxRiskFactor" type="VBoxContainer" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances"]
margin_top = 56.0
margin_right = 145.0
margin_bottom = 95.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxRiskFactor" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/VBoxRiskFactor"]
margin_right = 145.0
margin_bottom = 19.0
[node name="RiskFactorLabel" type="Label" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/VBoxRiskFactor/HBoxRiskFactor"]
margin_right = 145.0
margin_bottom = 19.0
text = "Risk Factor Threshold:"
[node name="RiskSlider" type="HSlider" parent="Panel/HBoxContainer/RootVboxPlayerPreferences/Label/VBoxPlayerPreferances/VBoxRiskFactor"]
margin_top = 23.0
margin_right = 145.0
margin_bottom = 39.0
min_value = 1.0
max_value = 5.0
value = 5.0
rounded = true
tick_count = 10
ticks_on_borders = true
[node name="RootVboxGeneralSettings" type="VBoxContainer" parent="Panel/HBoxContainer"]
margin_left = 335.0
margin_right = 439.0
margin_bottom = 19.0
[node name="GeneralSettingsLabel" type="Label" parent="Panel/HBoxContainer/RootVboxGeneralSettings"]
margin_right = 104.0
margin_bottom = 19.0
text = "General Settings"
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -77.5
margin_top = 30.0
margin_right = 77.5
margin_bottom = 120.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer"]
margin_right = 155.0
margin_bottom = 19.0
rect_pivot_offset = Vector2( 62, 14 )
text = "Volume:"
[node name="VolumeSlider" type="HSlider" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer"]
margin_top = 23.0
margin_right = 155.0
margin_bottom = 39.0
max_value = 10.0
rounded = true
tick_count = 10
ticks_on_borders = true
[node name="HBoxClosedCaptions" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer"]
margin_top = 43.0
margin_right = 155.0
margin_bottom = 70.0
[node name="ClosedCaptionsLabel" type="Label" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/HBoxClosedCaptions"]
margin_top = 4.0
margin_right = 108.0
margin_bottom = 23.0
text = "Closed Captions:"
[node name="ClosedCaptionsCheckBox" type="CheckBox" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/HBoxClosedCaptions"]
margin_left = 112.0
margin_right = 136.0
margin_bottom = 27.0
[node name="HBoxDevConsole" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer"]
margin_top = 74.0
margin_right = 155.0
margin_bottom = 101.0
[node name="DevConsoleLabel" type="Label" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/HBoxDevConsole"]
margin_top = 4.0
margin_right = 126.0
margin_bottom = 23.0
text = "Developer Console:"
[node name="DevConsoleCheckbox" type="CheckBox" parent="Panel/HBoxContainer/RootVboxGeneralSettings/GeneralSettingsLabel/VBoxContainer/HBoxDevConsole"]
margin_left = 130.0
margin_right = 154.0
margin_bottom = 27.0
[node name="RootVboxVisualControls2" type="VBoxContainer" parent="Panel/HBoxContainer"]
margin_left = 499.0
margin_right = 597.0
margin_bottom = 19.0
[node name="Label2" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls2"]
margin_right = 98.0
margin_bottom = 19.0
text = "Visual Controls"
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -77.5
margin_top = 30.0
margin_right = 77.5
margin_bottom = 52.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxThemes" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer"]
margin_right = 155.0
margin_bottom = 19.0
[node name="ThemesLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/HBoxThemes"]
margin_right = 119.0
margin_bottom = 19.0
text = "Theme Preference:"
[node name="ThemeItemList" type="ItemList" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer"]
margin_top = 23.0
margin_right = 155.0
margin_bottom = 32.0
auto_height = true
[node name="HBoxVirtualKeyboardEnabled" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer"]
margin_top = 36.0
margin_right = 155.0
margin_bottom = 63.0
[node name="VisualKeyBoardLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/HBoxVirtualKeyboardEnabled"]
margin_top = 4.0
margin_right = 110.0
margin_bottom = 23.0
text = "Virtual Keyboard"
[node name="VisualKeyboardCheckBox" type="CheckBox" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/HBoxVirtualKeyboardEnabled"]
margin_left = 114.0
margin_right = 138.0
margin_bottom = 27.0
[node name="HBoxKeyboardLayout" type="HBoxContainer" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer"]
margin_top = 67.0
margin_right = 155.0
margin_bottom = 86.0
[node name="LayoutLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/HBoxKeyboardLayout"]
margin_right = 120.0
margin_bottom = 19.0
text = "Layout Preference:"
[node name="LayoutItemList" type="ItemList" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer"]
margin_top = 90.0
margin_right = 155.0
margin_bottom = 99.0
auto_height = true
[node name="HBoxBottomRow" type="HBoxContainer" parent="Panel"]
anchor_left = 0.500488
anchor_right = 0.595215
margin_left = -48.5
margin_top = 200.0
margin_right = 48.5
margin_bottom = 225.0
alignment = 1
__meta__ = {
"_edit_use_anchors_": true
}
[node name="SaveButton" type="Button" parent="Panel/HBoxBottomRow"]
margin_left = 24.0
margin_right = 121.0
margin_bottom = 25.0
text = "Save Settings"
[node name="But_ChangeScene" parent="Panel/HBoxBottomRow" instance=ExtResource( 3 )]
margin_left = 125.0
margin_right = 170.0
margin_bottom = 25.0
text = "Back"
next_scene_path = "res://screens/MenuScreen.tscn"

View File

@ -0,0 +1,7 @@
extends Control
#GRAB FOCUS: simple script for temp files to grab focus
func _ready() -> void:
$Title/But_ChangeScene.grab_focus()

View File

@ -0,0 +1,20 @@
#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: = ""
func _on_But_NewGame_button_up():
var error_on_change=get_tree().change_scene(next_scene_path)
if error_on_change !=0:
print("ERROR: ",error_on_change)
func _get_configuration_warning() -> String:
return "next_scene_path must be set for this button to work" if next_scene_path == "" else ""

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://UserInterface/But_ChangeScene.gd" type="Script" id=1]
[node name="But_ChangeScene" type="Button"]
margin_right = 130.0
margin_bottom = 24.0
size_flags_vertical = 3
text = "New Game"
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="button_up" from="." to="." method="_on_But_NewGame_button_up"]

View File

@ -0,0 +1,34 @@
#BUT_QUIT:
# Unique script for ending a game. Will additionally perform or call needed
# shut down and close-out functionality.
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()
#JSON: requires dictionaries:
#func _saveHistory_JSON() -> void:
# var history_screens_arr = get_node("/root/History").historyScreensSingleton.output_history_array
# var file = File.new()
# file.open(history_JSON, File.WRITE)
# file.store_string(to_json(history_screens_arr))
#
# file.close()
# # #DKM TEMP:
# print("Saved history array size should be: " + str(history_screens_arr.size()))
#DKM TEMP:
#tres file:
#func _saveHistory() -> void:
# var history_screens = get_node("/root/History").historyScreensSingleton
# assert(ResourceSaver.save("user://history.tres", history_screens)==OK)
# #DKM TEMP:
# print("Saved history array size: " + str(history_screens.output_history_array.size()))

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://UserInterface/But_Quit.gd" type="Script" id=1]
[node name="But_Quit" type="Button"]
margin_top = 240.0
margin_right = 179.0
margin_bottom = 284.0
text = "Quit"
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="button_up" from="." to="." method="_on_But_Quit_button_up"]

View File

@ -0,0 +1,14 @@
[gd_scene format=2]
[node name="Title" type="Label"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -110.5
margin_top = 114.422
margin_right = 110.5
margin_bottom = 180.422
text = "Main Menu"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

View File

@ -0,0 +1,73 @@
# Creating Database Users for PostgreSQL for our projects.
I wanted to let you know, that it is a bit of a tricky process to connect to the PostGres backend as a user that is not **postgres**. Here are the steps that I did, to make it so I could connect as another user.
## Backend
Be sure to remote into your backend database server using SSH, and perform the following steps.
```
ssh <YourUsername>@srv1.bcirpg.com
sudo nano /etc/postgresql/13/main/pg_hba.conf
```
Ensure that the bottom section of this file looks like this example below. The main thing that we are worried about, is turning on MD5 authentication. This will allow our new user accounts to sign in, using defined passwords.
```
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
```
From there we can move on to creating the user.
## Creating a new default user
Connecting to the database is impossible, without a new user. I am going to use Ernie as the example username.
Here are the commands that I ran to create a new user, that can be used by Godot's Postgres plugin.
```
sudo -u postgres createuser ernie
sudo -u postgres psql -d main
main=#
main=# ALTER USER ernie WITH PASSWORD 'yourpassword';
```
From there you can connect to the database using the following command.
Be sure to connect using the same password that you used, when creating your "Ernie" user.
`psql -h localhost -d main -U ernie`

View File

@ -0,0 +1,19 @@
# How to get arround SSL and HTTP Errors with Mozilla Firefox.
Sometimes you might get an error in regards to HTTPS and our project, when using Firefox.
The best way around that is to clear your Cache and Cookies before doing anything else.
If that does not work, you can attempt to disable HTTPS Only Mode.
## How to clear cookies in Mozilla Firefox.
[Mozilla Docs](https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox)
## How to learn more about HTTPS Only Mode in Mozilla Firefox.
[Mozilla Docs](https://support.mozilla.org/en-US/kb/https-only-prefs#)

View File

@ -0,0 +1 @@
source_md5="cfb2a27b25dace2544a35a8ec7d50081"

View File

@ -0,0 +1,3 @@
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4"
dest_md5="ab01d4eeab6e15a95fc10ee1b4e02967"

View File

@ -0,0 +1,3 @@
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4"
dest_md5="ab01d4eeab6e15a95fc10ee1b4e02967"

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