mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
Adds mergedDemo_2022_0904A; retooling game for drawing from source module file
Begins retooling the mergedDemo to generate locations and options (and eventually dialog and all) from a module data source. Working with JSON now just to get started, will switch this to DB once it's up and working. Currently generates 'node' arrays and intro text; stopped working on adding dynamic options from these nodes and connecting them.
This commit is contained in:
parent
7b00653248
commit
949a0dba9b
@ -0,0 +1,3 @@
|
||||
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4"
|
||||
dest_md5="ab01d4eeab6e15a95fc10ee1b4e02967"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="79d2b9a5284e50d91a97c2dd565f2fa4"
|
||||
dest_md5="ab01d4eeab6e15a95fc10ee1b4e02967"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="13a1e728def8fb06bd8e797fcc392604"
|
||||
dest_md5="b396169339b2e8d769e9830c387050ad"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="13a1e728def8fb06bd8e797fcc392604"
|
||||
dest_md5="b396169339b2e8d769e9830c387050ad"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="266f789a4e895911161321092c2c2429"
|
||||
dest_md5="a08a6dcf169f683724bfd5cd82e23fe6"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="266f789a4e895911161321092c2c2429"
|
||||
dest_md5="a08a6dcf169f683724bfd5cd82e23fe6"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
|
||||
dest_md5="2ded9e7f9060e2b530aab678b135fc5b"
|
||||
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
source_md5="fe8dea03f3f241ec8c3f199dcd974cbe"
|
@ -0,0 +1,8 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
****************************
|
||||
README.TXT:
|
||||
****************************
|
||||
Author: Doug McCord
|
||||
Date: 27-Feb-2022
|
||||
|
||||
****************************
|
||||
Intro notes:
|
||||
This menu was stripped down from the bigger game and settings testing
|
||||
I was doing -- so there's a decent chance yet of something broken --
|
||||
please let me know if you encounter anything that's not linking up as
|
||||
desired. Currently there are temp destinations loaded for each of the
|
||||
menu options -- these are saved as scenes in the screens folder.
|
||||
|
||||
Currently almost all the buttons are instances of the same source
|
||||
button object -- linked to their destination using the 'Next Scene Path'
|
||||
available in the inspector.
|
||||
|
||||
|
||||
****************************
|
||||
Project file structure:
|
||||
Surface Layer:
|
||||
Default Godot files remain at this level
|
||||
|
||||
_toArchive:
|
||||
Directory to serve as reference-only; precursor to trash
|
||||
|
||||
assets:
|
||||
Images, fonts, themes and styles (TRES text resource data files). Note that all fonts and styles are defined in
|
||||
the following themes: ui_controlNode_light_theme.tres and ui_controlNode_dark_theme.tres. Any style changes
|
||||
should be made in those theme files to assure propagation throughout.
|
||||
|
||||
gamePlay:
|
||||
Scenes and scripts specific to the gameplay section
|
||||
|
||||
globalScripts:
|
||||
For project-wide use, or scripts that are not either:
|
||||
A. attached to a template scene, intended to go with all instances of that, or
|
||||
B. unique, scene-specific scripts.
|
||||
|
||||
screens:
|
||||
Planned to include both .tscn scene files and their associated scripts.
|
||||
|
||||
userInterface: (note misnomer for text-based game)
|
||||
Re-useable UI elements and their scripts, such as change-scene, input-response
|
@ -0,0 +1,26 @@
|
||||
{
|
||||
"Node_Boat1":{
|
||||
"Id":"Boat_001",
|
||||
"Action":"ShowText",
|
||||
"A_Params":"",
|
||||
"Text":"The game has begun! You may select from the options below. You are in a boat. You have been shipwrecked. You can leave the boat through a hatch.",
|
||||
"Option_Labels":["Examine Ship","Climb through hatch"],
|
||||
"Option_GoTos":["Boat_002","Shore_001"]
|
||||
},
|
||||
"Node_Boat_002":{
|
||||
"Id":"Boat_002",
|
||||
"Action":"ShowText",
|
||||
"A_Params":"",
|
||||
"Text":"The boat is old and wrecked.",
|
||||
"Option_Labels":["Continue"],
|
||||
"Option_GoTos":["Boat_001"]
|
||||
},
|
||||
"Node_Shore_001":{
|
||||
"Id":"Shore_001",
|
||||
"Action":"ShowText",
|
||||
"A_Params":"",
|
||||
"Text":"You've reached the shore!",
|
||||
"Option_Labels":["Return to boat"],
|
||||
"Option_GoTos":["Boat_001"]
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
[player_preferences]
|
||||
|
||||
player_name="Tester the Bold!"
|
||||
risk_threshold=2.0
|
||||
|
||||
[visual_controls]
|
||||
|
||||
font_size=3.0
|
||||
brightness=5.0
|
||||
|
||||
[general_settings]
|
||||
|
||||
volume=0.0
|
||||
closed_captions=false
|
||||
dev_console=true
|
||||
|
||||
[virtual_keyboard]
|
||||
|
||||
keyboard_layout=2
|
||||
|
||||
[theme]
|
||||
|
||||
theme_selection=0
|
@ -0,0 +1,3 @@
|
||||
Files for testing only. On deployment, these should be put at the appropriate user:// location for your operating system. For windows this is:
|
||||
|
||||
C:\Users\{username}\AppData\Roaming\Godot\app_userdata\BCIRPGR_mergedDemo
|
@ -0,0 +1,9 @@
|
||||
Name,Thickly Goes
|
||||
Profession,Brawler
|
||||
Strength,Excessive
|
||||
Intellect,Diminished
|
||||
Willpower,Variable
|
||||
Charm,Lacking
|
||||
Weapon,Meaty Fists
|
||||
Armor,Leather Jacket and Chaps
|
||||
A Quote,You talkin to me?!
|
|
@ -0,0 +1,13 @@
|
||||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://TestingFiles/UserData/characterFiles/testingCSVCharFile.csv"
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
@ -0,0 +1,14 @@
|
||||
Name: Bruno
|
||||
Class: Seer
|
||||
Level: 22
|
||||
|
||||
S: 9
|
||||
I: 11
|
||||
W: 16
|
||||
D: 14
|
||||
C: 10
|
||||
Chr: 8
|
||||
|
||||
HP: 31
|
||||
|
||||
Description: slight, anxious seer who hides from view whenever possible, due to the negative ramifications of his prophetic abilities.
|
@ -0,0 +1,28 @@
|
||||
[gd_resource type="Theme" load_steps=3 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]
|
||||
|
||||
[resource]
|
||||
Button/colors/font_color = Color( 0.878431, 0.878431, 0.878431, 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 = 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 = null
|
||||
Label/styles/normal = null
|
||||
Panel/styles/panel = ExtResource( 1 )
|
||||
VBoxContainer/constants/separation = 4
|
@ -0,0 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_20pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
@ -0,0 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_20pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Theme" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
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( 1, 1, 1, 1 )
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
||||
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 = null
|
||||
Button/styles/disabled = null
|
||||
Button/styles/focus = null
|
||||
Button/styles/hover = null
|
||||
Button/styles/normal = SubResource( 1 )
|
||||
Button/styles/pressed = null
|
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Theme" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
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( 1, 1, 1, 1 )
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
||||
Button/colors/font_color = Color( 0.00392157, 0.00392157, 0.00392157, 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 = null
|
||||
Button/styles/disabled = null
|
||||
Button/styles/focus = null
|
||||
Button/styles/hover = null
|
||||
Button/styles/normal = SubResource( 1 )
|
||||
Button/styles/pressed = null
|
@ -0,0 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
@ -0,0 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_40pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource( 1 )
|
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,34 @@
|
||||
[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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
@ -0,0 +1,34 @@
|
||||
[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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
@ -0,0 +1,34 @@
|
||||
[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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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 )
|
@ -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 )
|
@ -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 )
|
Binary file not shown.
@ -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 )
|
@ -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 )
|
@ -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 )
|
@ -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 )
|
@ -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 )
|
@ -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 )
|
@ -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
|
@ -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
|
@ -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 )
|
@ -0,0 +1,39 @@
|
||||
#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
|
||||
|
@ -0,0 +1,21 @@
|
||||
#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])
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
#But_MoreOptions:
|
||||
# For these options, we leave the game object active and manually add and remove
|
||||
# the scenes as needed.
|
||||
|
||||
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_MoreOptions_button_up():
|
||||
var root = get_node("/root")
|
||||
var gameCurrent = get_node("/root/Game")
|
||||
var gameSingleton = get_node("/root/GameCurrent")
|
||||
var nextScene = load(next_scene_path)
|
||||
|
||||
gameSingleton.gameCurrent_scene = gameCurrent
|
||||
root.remove_child(gameCurrent)
|
||||
nextScene = nextScene.instance()
|
||||
root.add_child(nextScene)
|
||||
|
||||
|
||||
func _get_configuration_warning() -> String:
|
||||
return "next_scene_path must be set for this button to work" if next_scene_path == "" else ""
|
||||
|
@ -0,0 +1,13 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/liberation_serif_30pt.tres" type="DynamicFont" id=1]
|
||||
|
||||
[node name="option1" type="Button"]
|
||||
margin_right = 706.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "Option 1"
|
||||
align = 0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
#COMMAND PROCESSOR:
|
||||
# Handles player input, including navigation on the map
|
||||
|
||||
extends Node
|
||||
|
||||
|
||||
var current_locale = null
|
||||
var current_opt1 = null
|
||||
var current_opt2 = null
|
||||
var current_opt3 = null
|
||||
|
||||
#Allows us to pass in the starting location
|
||||
func initialize(starting_locale) -> String:
|
||||
current_opt1 = get_node("../Background/MarginContainer/Rows/InputArea/VBoxContainer/option1")
|
||||
current_opt2 = get_node("../Background/MarginContainer/Rows/InputArea/VBoxContainer/option2")
|
||||
current_opt3 = get_node("../Background/MarginContainer/Rows/InputArea/VBoxContainer/option3")
|
||||
|
||||
current_opt1.grab_focus()
|
||||
return change_room(starting_locale)
|
||||
|
||||
#DKM TEMP: this must load from files written by toolset
|
||||
#Function that loads response from the option string chosen
|
||||
func process_command(option: String) -> String:
|
||||
var optCmd_Action = option.split(": ", false)
|
||||
if (optCmd_Action.size() < 2):
|
||||
return "Error: no valid command and action in option!"
|
||||
match optCmd_Action[0]:
|
||||
"Go":
|
||||
return go(optCmd_Action[1])
|
||||
"Wait":
|
||||
return "You rest a bit. Now what?"
|
||||
"Talk":
|
||||
return talk(optCmd_Action[1])
|
||||
"Examine":
|
||||
return examine(optCmd_Action[1])
|
||||
"Scream":
|
||||
return "You yell :'" + optCmd_Action[1].to_upper() +"'!!"
|
||||
_:
|
||||
return "Nothing happens! Command word was: " + optCmd_Action[0]
|
||||
|
||||
|
||||
|
||||
func go(action: String) -> String:
|
||||
var destination = action.split(" ", false)[0]
|
||||
if current_locale.exits.keys().has(destination):
|
||||
var change_response = change_room(current_locale.exits[destination])
|
||||
return PoolStringArray(["You go %s." % destination, change_response]).join("\n")
|
||||
else:
|
||||
return "That is not a valid place to go!"
|
||||
|
||||
#DKM TEMP: do an examination dictionary lookup here?
|
||||
func examine(action: String) -> String:
|
||||
return action.to_upper() + " looks about how you'd expect. [Dictionary lookup forthcoming]"
|
||||
|
||||
#DKM TEMP: dialog entry needed -- temp
|
||||
func talk(action: String) -> String:
|
||||
var target = action.split("to ", false)[0].to_upper()
|
||||
return target + " has little to say! [Dialog forthcoming]"
|
||||
|
||||
#Helper:
|
||||
func change_room(new_room: Locale) -> String:
|
||||
current_locale = new_room
|
||||
current_opt1.text = new_room.option1
|
||||
current_opt2.text = new_room.option2
|
||||
current_opt3.text = new_room.option3
|
||||
var exit_string = PoolStringArray(new_room.exits.keys()).join(" ")
|
||||
var strings = PoolStringArray([
|
||||
"You are now in: " + new_room.locale_name + ". " +
|
||||
new_room.locale_description,
|
||||
"Exits: " + exit_string
|
||||
]).join("\n")
|
||||
return strings;
|
@ -0,0 +1,147 @@
|
||||
#GAME:
|
||||
# Controls output space, loading descriptions and options for each locale and
|
||||
# appending to the history array.
|
||||
|
||||
extends Control
|
||||
|
||||
#Source for module file: to the GU
|
||||
#export(String, FILE, "*.json") var module_file_path:String
|
||||
#DKM TEMP:
|
||||
var module_file_path = "user://Module_Demo_001.json"
|
||||
|
||||
onready var history_source = get_node("/root/History").historyScreensSingleton
|
||||
onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance
|
||||
|
||||
#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")
|
||||
|
||||
onready var command_processor = $CommandProcessor
|
||||
onready var current_text = $Background/MarginContainer/Rows/GameInfo/CurrentText
|
||||
onready var history_pager = $Background/MarginContainer/Rows/ItemList/But_History_Page
|
||||
onready var option_one = $Background/MarginContainer/Rows/InputArea/VBoxContainer/option1
|
||||
onready var option_two= $Background/MarginContainer/Rows/InputArea/VBoxContainer/option2
|
||||
onready var option_three = $Background/MarginContainer/Rows/InputArea/VBoxContainer/option3
|
||||
onready var pSingleton = get_node("/root/PlayerCharacter")
|
||||
onready var charSheet = $Con_charSheet/MarginContainer/VBoxContainer/CharacterSheet
|
||||
|
||||
|
||||
#DKM TEMP: this is just a temp file solution for grabbing map/module, will be replaced with DB
|
||||
# or desired load approach
|
||||
onready var module_map = "user://temp_map.save"
|
||||
|
||||
func _ready() -> void:
|
||||
save_module()
|
||||
theme=load(settings.themeFile)
|
||||
|
||||
#DKM TEMP: testing:
|
||||
var moduleDict = loadJSONToDict(module_file_path)
|
||||
|
||||
#DKM TEMP: this needs to be refactored to reposition this initialization
|
||||
var i = 0
|
||||
print("Looking for JSON at: " + module_file_path)
|
||||
print("Json returned as: " + str(moduleDict))
|
||||
var initialNode = Locale.new()
|
||||
var nodeArray = [initialNode]
|
||||
for moduleNode in moduleDict.values():
|
||||
if nodeArray.size() <= i:
|
||||
var newNode = Locale.new()
|
||||
nodeArray.append(newNode)
|
||||
nodeArray[i].locale_name = moduleNode.get("Id")
|
||||
nodeArray[i].locale_description = moduleNode.get("Text")
|
||||
var nodeOptions = moduleNode.get("Option_Labels")
|
||||
for option in nodeOptions:
|
||||
nodeArray[i].options_array.append(option)
|
||||
print("For #" + str(i) + ": appended option of: " + str(option))
|
||||
var nodeDestinations = moduleNode.get("Option_GoTos")
|
||||
for dest in nodeDestinations:
|
||||
nodeArray[i].destinations_array.append(dest)
|
||||
print("For #" + str(i) + ": appended go to destination of: " + str(dest))
|
||||
print("Node array name for #" + str(i) + ": " + nodeArray[i].locale_name)
|
||||
i = i+1
|
||||
|
||||
current_text.show()
|
||||
option_one.show()
|
||||
|
||||
#Load character sheet:
|
||||
charSheet.text = pSingleton.pc.pcText
|
||||
|
||||
create_response(nodeArray[0].locale_description)
|
||||
#DKM TEMP: another that needs to be cleaned up:
|
||||
i = 0
|
||||
for option in nodeArray[0].options_array:
|
||||
var destArr = nodeArray[0].destinations_array
|
||||
add_option_to_game(option, destArr[i])
|
||||
i = i+1
|
||||
|
||||
#DKM TEMP: convert JSON file to dictionary for module import:
|
||||
func loadJSONToDict(filepath:String)->Dictionary:
|
||||
var file = File.new()
|
||||
#assert file.file_exists(filepath)
|
||||
file.open(filepath,file.READ)
|
||||
var moduleDict = parse_json(file.get_as_text())
|
||||
#assert moduleDict.size() > 0
|
||||
return moduleDict
|
||||
|
||||
|
||||
|
||||
#Below temporarily takes user selection and appends it to responses; adding new instances
|
||||
# of our input row with an input and response pair for each
|
||||
func handleUserInput(user_choice: String) -> void:
|
||||
var input_response = InputResponse.instance()
|
||||
var inputText = "User selected: " + user_choice
|
||||
var response = command_processor.process_command(user_choice)
|
||||
input_response.set_text(inputText, response)
|
||||
add_response_to_game(input_response)
|
||||
|
||||
#Handles input text
|
||||
func create_response(response_text: String):
|
||||
var response = TextOutput.instance()
|
||||
response.text = response_text
|
||||
add_response_to_game(response)
|
||||
|
||||
#Copies the response output to add to both current game output, and the
|
||||
# history array.
|
||||
func add_response_to_game(response: Control):
|
||||
add_response_to_history(response)
|
||||
if(current_text.get_child_count() > 0):
|
||||
current_text.remove_child(current_text.get_child(0))
|
||||
current_text.add_child(response)
|
||||
|
||||
func add_response_to_history(response: Control) -> void:
|
||||
#DKM TEMP: so here we
|
||||
#1. var response_history = response.duplicate()
|
||||
var response_for_history = response.duplicate()
|
||||
#2. get the history array from the singleton,
|
||||
#3. Add this to the history array
|
||||
history_source.output_history_array.append(response_for_history)
|
||||
|
||||
func add_option_to_game(option: String, dest: String) -> void:
|
||||
print("Received request to make option for label: " + option +"; and destination: " + dest)
|
||||
pass
|
||||
|
||||
#DKM TEMP: these need to be dynamically added with the options themselves
|
||||
#func _on_option1_button_down() -> void:
|
||||
# var option1 = get_node("Background/MarginContainer/Rows/InputArea/VBoxContainer/option1")
|
||||
# handleUserInput(option1.get_text())
|
||||
#
|
||||
#
|
||||
#func _on_option2_button_down() -> void:
|
||||
# var option2 = get_node("Background/MarginContainer/Rows/InputArea/VBoxContainer/option2")
|
||||
# handleUserInput(option2.get_text())
|
||||
#
|
||||
#
|
||||
#func _on_option3_button_down() -> void:
|
||||
# var option3 = get_node("Background/MarginContainer/Rows/InputArea/VBoxContainer/option3")
|
||||
# handleUserInput(option3.get_text())
|
||||
|
||||
|
||||
#func load_module():
|
||||
# var scene = load("user://save_01.tscn")
|
||||
# get_tree().change_scene_to(scene)
|
||||
|
||||
#DKM TEMP: saves the entire scene in one packed scene file
|
||||
func save_module():
|
||||
var scene = PackedScene.new()
|
||||
scene.pack(self)
|
||||
ResourceSaver.save("user://game_01.tscn", scene)
|
@ -0,0 +1,194 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://gamePlay/But_Option.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://gamePlay/Game.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/ui_controlNode_dark_theme.tres" type="Theme" id=3]
|
||||
[ext_resource path="res://gamePlay/CommandProcessor.gd" type="Script" id=4]
|
||||
[ext_resource path="res://gamePlay/But_MoreOptions.gd" type="Script" id=9]
|
||||
|
||||
[node name="Game" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 3 )
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CommandProcessor" type="Node" parent="."]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Background" type="PanelContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_right = -274.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Background"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 749.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 = 728.0
|
||||
margin_bottom = 578.0
|
||||
custom_constants/separation = 10
|
||||
|
||||
[node name="ItemList" type="ItemList" parent="Background/MarginContainer/Rows"]
|
||||
margin_right = 708.0
|
||||
margin_bottom = 40.0
|
||||
rect_min_size = Vector2( 0, 40 )
|
||||
|
||||
[node name="But_MoreOptions" type="Button" parent="Background/MarginContainer/Rows/ItemList"]
|
||||
margin_right = 197.0
|
||||
margin_bottom = 36.0
|
||||
text = "More Options"
|
||||
script = ExtResource( 9 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
next_scene_path = "res://Screens/MoreOptions.tscn"
|
||||
|
||||
[node name="GameInfo" type="PanelContainer" parent="Background/MarginContainer/Rows"]
|
||||
margin_top = 50.0
|
||||
margin_right = 708.0
|
||||
margin_bottom = 438.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="CurrentText" type="VBoxContainer" parent="Background/MarginContainer/Rows/GameInfo"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 707.0
|
||||
margin_bottom = 387.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 20
|
||||
|
||||
[node name="InputArea" type="PanelContainer" parent="Background/MarginContainer/Rows"]
|
||||
margin_top = 448.0
|
||||
margin_right = 708.0
|
||||
margin_bottom = 568.0
|
||||
rect_min_size = Vector2( 0, 120 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Background/MarginContainer/Rows/InputArea"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 707.0
|
||||
margin_bottom = 119.0
|
||||
custom_constants/separation = 5
|
||||
|
||||
[node name="option1" parent="Background/MarginContainer/Rows/InputArea/VBoxContainer" instance=ExtResource( 1 )]
|
||||
|
||||
[node name="Con_charSheet" type="PanelContainer" parent="."]
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
margin_left = -294.0
|
||||
margin_bottom = 406.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Con_charSheet"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 293.0
|
||||
margin_bottom = 405.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Con_charSheet/MarginContainer"]
|
||||
margin_right = 292.0
|
||||
margin_bottom = 404.0
|
||||
|
||||
[node name="IL_cs_label" type="ItemList" parent="Con_charSheet/MarginContainer/VBoxContainer"]
|
||||
margin_right = 292.0
|
||||
margin_bottom = 40.0
|
||||
rect_min_size = Vector2( 0, 40 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Con_charSheet/MarginContainer/VBoxContainer/IL_cs_label"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -141.0
|
||||
margin_right = 141.0
|
||||
margin_bottom = 43.0
|
||||
text = "Character Sheet"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CharacterSheet" type="TextEdit" parent="Con_charSheet/MarginContainer/VBoxContainer"]
|
||||
margin_top = 44.0
|
||||
margin_right = 292.0
|
||||
margin_bottom = 404.0
|
||||
size_flags_vertical = 3
|
||||
readonly = true
|
||||
wrap_enabled = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Con_chatScreen" type="PanelContainer" parent="."]
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -292.0
|
||||
margin_top = -196.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Con_chatScreen"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 291.0
|
||||
margin_bottom = 195.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="IL_cs_label" type="ItemList" parent="Con_chatScreen/VBoxContainer"]
|
||||
margin_right = 290.0
|
||||
margin_bottom = 40.0
|
||||
rect_min_size = Vector2( 0, 40 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Con_chatScreen/VBoxContainer/IL_cs_label"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -142.0
|
||||
margin_right = 142.0
|
||||
margin_bottom = 43.0
|
||||
text = "Chat"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ChatScreen" type="TextEdit" parent="Con_chatScreen/VBoxContainer"]
|
||||
margin_top = 44.0
|
||||
margin_right = 290.0
|
||||
margin_bottom = 194.0
|
||||
size_flags_vertical = 3
|
||||
text = "Nothing yet
|
||||
"
|
||||
readonly = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="button_up" from="Background/MarginContainer/Rows/ItemList/But_MoreOptions" to="Background/MarginContainer/Rows/ItemList/But_MoreOptions" method="_on_But_MoreOptions_button_up"]
|
@ -0,0 +1,18 @@
|
||||
#LOCALE MANAGER:
|
||||
# Temporary script holds connections between map items, using the two-way
|
||||
# connect_exit script available on Location class to wire up map.
|
||||
|
||||
extends Node
|
||||
|
||||
|
||||
#DKM TEMP: must load from toolset
|
||||
func _ready() -> void:
|
||||
#load_module()
|
||||
$Loc_Boat.connect_exit("east", $Loc_Shore)
|
||||
$Loc_Shore.connect_exit("north", $Loc_WoodsA1)
|
||||
$Loc_WoodsA1.connect_exit("north", $Loc_WoodsA2)
|
||||
$Loc_WoodsA2.connect_exit("east", $Loc_WoodsA3)
|
||||
$Loc_WoodsA3.connect_exit("north", $Loc_WoodsA4)
|
||||
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
#PLAYER CHARACTER:
|
||||
# Unique handler script for root PC singleton. May be adapted for
|
||||
# player loading and saving functionality
|
||||
|
||||
extends Node
|
||||
|
||||
var pc
|
||||
|
||||
func _ready() -> void:
|
||||
pc = playerCharacterTemplate.new()
|
||||
|
@ -0,0 +1,10 @@
|
||||
#gameCurrent:
|
||||
# Simple singleton script for storing persistent game cene paths.
|
||||
# These must then not be destroyed, but manually removed as a child of the
|
||||
# node and they can always be re-added as needed.
|
||||
|
||||
extends Node
|
||||
|
||||
var gameCurrent_scene
|
||||
|
||||
|
@ -0,0 +1,44 @@
|
||||
extends Node
|
||||
|
||||
# Declare new settings template object
|
||||
var settingsInstance = PlayerSettingsTemplate.new()
|
||||
var settings_file = "user://PlayerPreferences.cfg"
|
||||
|
||||
func _ready() -> void:
|
||||
load_settings_file()
|
||||
|
||||
#Config/ini:
|
||||
func load_settings_file():
|
||||
var config = ConfigFile.new()
|
||||
# Load data from a file.
|
||||
var err = config.load(settings_file)
|
||||
# If the file didn't load, ignore it.
|
||||
if err != OK:
|
||||
return
|
||||
#Preferences:
|
||||
settingsInstance.inputName = config.get_value("player_preferences", "player_name")
|
||||
settingsInstance.riskFactor = config.get_value("player_preferences", "risk_threshold")
|
||||
#Controls:
|
||||
settingsInstance.fontSize = config.get_value("visual_controls", "font_size")
|
||||
settingsInstance.brightness = config.get_value("visual_controls", "brightness")
|
||||
#General Settings:
|
||||
settingsInstance.volume = config.get_value("general_settings", "volume")
|
||||
settingsInstance.bClosedCaptions = config.get_value("general_settings", "closed_captions")
|
||||
settingsInstance.bdevConsole = config.get_value("general_settings", "dev_console")
|
||||
#Keyboard:
|
||||
settingsInstance.visualKeyboardLayout = config.get_value("virtual_keyboard", "keyboard_layout")
|
||||
#Theme:
|
||||
settingsInstance.themeChoiceInt = config.get_value("theme", "theme_selection")
|
||||
|
||||
load_themeFile()
|
||||
|
||||
#DKM TEMP: working
|
||||
print("Input name loaded as: " + str(settingsInstance.inputName))
|
||||
print("Theme loaded as: " + str(settingsInstance.themeFile))
|
||||
|
||||
func load_themeFile() -> void:
|
||||
#DKM TEMP: this shouldn't be hard-coded:
|
||||
if(settingsInstance.themeChoiceInt == 1):
|
||||
settingsInstance.themeFile = "res://assets/ui_controlNode_light_theme.tres"
|
||||
else:
|
||||
settingsInstance.themeFile = "res://assets/ui_controlNode_dark_theme.tres"
|
@ -0,0 +1,31 @@
|
||||
#HISTORY:
|
||||
# Unique handler script for root history singleton. May be adapted for
|
||||
# history loading and saving functionality
|
||||
|
||||
extends Node
|
||||
|
||||
|
||||
#DKM TEMP: not a cfg?
|
||||
var history_file = "user://history.tres"
|
||||
var historyScreensSingleton
|
||||
var testing = false
|
||||
|
||||
func _ready() -> void:
|
||||
if(testing):
|
||||
historyScreensSingleton = load_history_file()
|
||||
if (historyScreensSingleton == null):
|
||||
historyScreensSingleton = HistoryScreensTemplateSingleton.new()
|
||||
|
||||
#DKM temp:
|
||||
print("Loaded history array size is: " + str(historyScreensSingleton.output_history_array.size()))
|
||||
|
||||
#DKM TEMP: load using tres format:
|
||||
func load_history_file() -> HistoryScreensTemplateSingleton:
|
||||
if ResourceLoader.exists(history_file):
|
||||
var history = ResourceLoader.load(history_file)
|
||||
if history is HistoryScreensTemplateSingleton:
|
||||
return history
|
||||
else: return null
|
||||
else:
|
||||
return null
|
||||
|
@ -0,0 +1,8 @@
|
||||
#PLAYERSETTINGSTEMPLATE:
|
||||
# Class for holding history screens
|
||||
extends Resource
|
||||
|
||||
class_name HistoryScreensTemplateSingleton
|
||||
|
||||
var output_history_array = Array()
|
||||
|
@ -0,0 +1,8 @@
|
||||
#PLAYER CHARACTER TEMPLATE:
|
||||
# Template for holding loaded/current character
|
||||
|
||||
extends Resource
|
||||
|
||||
class_name playerCharacterTemplate
|
||||
|
||||
var pcText = ""
|
@ -0,0 +1,26 @@
|
||||
extends Node
|
||||
|
||||
class_name PlayerSettingsTemplate
|
||||
|
||||
# Declare Setting Options, to be used inside of the settings menu
|
||||
var inputName = "none"
|
||||
var riskFactor = 0
|
||||
var brightness = 3
|
||||
var fontSize = 11
|
||||
var volume = 6
|
||||
var bClosedCaptions = true
|
||||
var bdevConsole = false
|
||||
var bVirtualKeyboard = false
|
||||
|
||||
# Setting of 0 is Qwerty, Setting of 1 is Davorak, Setting of 2 is Alphabetical
|
||||
var visualKeyboardLayout = 0
|
||||
|
||||
# Setting of 0 is dark, setting of 1 is light, and so on
|
||||
var themeChoiceInt = 0
|
||||
var themeFile = "res://assets/ui_controlNode_dark_theme.tres"
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1,34 @@
|
||||
[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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -0,0 +1,58 @@
|
||||
; 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": "Resource",
|
||||
"class": "HistoryScreensTemplateSingleton",
|
||||
"language": "GDScript",
|
||||
"path": "res://globalScripts/historyScreensTemplate.gd"
|
||||
}, {
|
||||
"base": "PanelContainer",
|
||||
"class": "Locale",
|
||||
"language": "GDScript",
|
||||
"path": "res://userInterface/Locale.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "PlayerSettingsTemplate",
|
||||
"language": "GDScript",
|
||||
"path": "res://globalScripts/playerSettingsTemplate.gd"
|
||||
}, {
|
||||
"base": "Resource",
|
||||
"class": "playerCharacterTemplate",
|
||||
"language": "GDScript",
|
||||
"path": "res://globalScripts/playerCharacterTemplate.gd"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
"HistoryScreensTemplateSingleton": "",
|
||||
"Locale": "",
|
||||
"PlayerSettingsTemplate": "",
|
||||
"playerCharacterTemplate": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="BCIRPGR_mergedDemo_ExperimentJSON"
|
||||
run/main_scene="res://Screens/MenuScreen.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
History="*res://globalScripts/history.gd"
|
||||
PlayerCharacter="*res://globalScripts/PlayerCharacter.gd"
|
||||
GameCurrent="*res://globalScripts/gameCurrent.gd"
|
||||
GlobalSaveInstance="*res://globalScripts/globalSaveInstance.gd"
|
||||
|
||||
[physics]
|
||||
|
||||
common/enable_pause_aware_picking=true
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
@ -0,0 +1,13 @@
|
||||
#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()
|
||||
|
@ -0,0 +1,23 @@
|
||||
#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
|
@ -0,0 +1,68 @@
|
||||
[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
|
||||
__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 = "Create Character (temp)"
|
||||
|
||||
[node name="But_SaveChar" type="Button" parent="Title"]
|
||||
margin_right = 12.0
|
||||
margin_bottom = 20.0
|
||||
text = "Save Character"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[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"
|
||||
next_scene_path = "res://gamePlay/Game.tscn"
|
||||
|
||||
[node name="FileDialog" type="FileDialog" parent="Title"]
|
||||
margin_left = 164.0
|
||||
margin_top = 35.0
|
||||
margin_right = 741.0
|
||||
margin_bottom = 426.0
|
||||
access = 1
|
||||
current_dir = "user://characterFiles"
|
||||
current_file = "characterFiles"
|
||||
current_path = "user://characterFiles/characterFiles"
|
||||
|
||||
[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"]
|
@ -0,0 +1,24 @@
|
||||
#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
|
@ -0,0 +1,77 @@
|
||||
[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"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[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"
|
||||
next_scene_path = "res://gamePlay/Game.tscn"
|
||||
|
||||
[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 "
|
||||
next_scene_path = "res://Screens/MenuScreen.tscn"
|
||||
|
||||
[node name="LoadCharacter_FileDialog" type="FileDialog" parent="."]
|
||||
margin_left = 193.0
|
||||
margin_top = 33.0
|
||||
margin_right = 862.0
|
||||
margin_bottom = 409.0
|
||||
window_title = "Open a File"
|
||||
mode = 0
|
||||
access = 1
|
||||
current_dir = "user://characterFiles"
|
||||
current_file = "characterFiles"
|
||||
current_path = "user://characterFiles/characterFiles"
|
||||
__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"]
|
@ -0,0 +1,49 @@
|
||||
#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)
|
||||
|
||||
|
||||
|
@ -0,0 +1,100 @@
|
||||
[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"]
|
@ -0,0 +1,48 @@
|
||||
#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()
|
@ -0,0 +1,126 @@
|
||||
[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 = 1
|
||||
current_dir = "user://characterFiles"
|
||||
current_path = "user://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 = -336.0
|
||||
margin_top = -173.0
|
||||
margin_right = 432.0
|
||||
margin_bottom = 286.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"]
|
@ -0,0 +1,27 @@
|
||||
[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"
|
@ -0,0 +1,11 @@
|
||||
#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()
|
@ -0,0 +1,102 @@
|
||||
[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
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
#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()
|
@ -0,0 +1,82 @@
|
||||
[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 )
|
||||
__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_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"]
|
@ -0,0 +1,27 @@
|
||||
[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"
|
@ -0,0 +1,27 @@
|
||||
[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"
|
@ -0,0 +1,11 @@
|
||||
#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()
|
@ -0,0 +1,69 @@
|
||||
[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
|
||||
}
|
@ -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("user://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)
|
@ -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 = 99.0
|
||||
margin_bottom = 19.0
|
||||
|
||||
[node name="VisualControlsLabel" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls"]
|
||||
margin_right = 99.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 = 159.0
|
||||
margin_right = 276.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 = 336.0
|
||||
margin_right = 440.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 = 500.0
|
||||
margin_right = 599.0
|
||||
margin_bottom = 19.0
|
||||
|
||||
[node name="Label2" type="Label" parent="Panel/HBoxContainer/RootVboxVisualControls2"]
|
||||
margin_right = 99.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 = 111.0
|
||||
margin_bottom = 23.0
|
||||
text = "Virtual Keyboard"
|
||||
|
||||
[node name="VisualKeyboardCheckBox" type="CheckBox" parent="Panel/HBoxContainer/RootVboxVisualControls2/Label2/VBoxContainer/HBoxVirtualKeyboardEnabled"]
|
||||
margin_left = 115.0
|
||||
margin_right = 139.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"
|
@ -0,0 +1,17 @@
|
||||
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
|
@ -0,0 +1,7 @@
|
||||
extends Control
|
||||
|
||||
#GRAB FOCUS: simple script for temp files to grab focus
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$Title/But_ChangeScene.grab_focus()
|
@ -0,0 +1,18 @@
|
||||
#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():
|
||||
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 ""
|
||||
|
@ -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"]
|
@ -0,0 +1,39 @@
|
||||
#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
|
||||
|
@ -0,0 +1,21 @@
|
||||
#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])
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
#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 ""
|
||||
|
@ -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()))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user