mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
loading for grammar should work now
This commit is contained in:
parent
7f88a823d8
commit
1d00c9c1f1
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@ dock_5="Inspector,Node,History"
|
||||
|
||||
[EditorNode]
|
||||
|
||||
open_scenes=["res://top_toolbar/TopToolbar.tscn", "res://genre_dialog_container.tscn", "res://new_genre.tscn", "res://term_container.tscn"]
|
||||
open_scenes=["res://top_toolbar/TopToolbar.tscn", "res://genre_dialog_container.tscn", "res://term_container.tscn", "res://new_genre.tscn"]
|
||||
|
||||
[ScriptEditor]
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
2a60927148abd1d33b818b535e306557
|
||||
::res://::1705255721
|
||||
Cabin-VariableFont_wdth,wght.ttf::FontFile::6071708341937432371::1691361083::1691361083::1::::<><>::
|
||||
default_env.tres::Environment::-1::1691361083::0::1::::<><>::
|
||||
GenreSettings.gd::GDScript::-1::1699512452::0::1::::<>Node<>::
|
||||
genre_dialog_container.gd::GDScript::-1::1693701895::0::1::::<>ScrollContainer<>::
|
||||
genre_dialog_container.tscn::PackedScene::153944638127573795::1699812762::0::1::::<><>::uid://cl7q0snsncynm<>res://genre_dialog_container.gd
|
||||
icon.png::CompressedTexture2D::6683631437730026850::1691361083::1691361083::1::::<><>::
|
||||
MenuManager.gd::GDScript::-1::1691944901::0::1::::<>Node<>::
|
||||
new_genre.tscn::PackedScene::4691503272014395181::1699812762::0::1::::<><>::
|
||||
README.md::TextFile::-1::1691361083::0::1::::<><>::
|
||||
term_container.tscn::PackedScene::5611995818604433798::1699817594::0::1::::<><>::
|
||||
::res://index_screen/::1691361083
|
||||
index.tscn::PackedScene::1801527253264693182::1691361083::0::1::::<><>::
|
||||
::res://top_toolbar/::1701632118
|
||||
CharacterMenu.gd::GDScript::-1::1701632118::0::1::::<>Label<>::
|
||||
DialogMenu.gd::GDScript::-1::1699817594::0::1::::<>Label<>::
|
||||
GenreDialogManager.gd::GDScript::-1::1693443126::0::1::::<>OptionButton<>::
|
||||
TopToolbar.tscn::PackedScene::5079673781919012116::1701632118::0::1::::<><>::res://MenuManager.gd<>res://GenreSettings.gd<>res://top_toolbar/DialogMenu.gd<>res://top_toolbar/GenreDialogManager.gd<>uid://cgtpfhy1ler0<>res://top_toolbar/CharacterMenu.gd
|
||||
::res://::1712510277
|
||||
Cabin-VariableFont_wdth,wght.ttf::FontFile::6071708341937432371::1691364683::1691364683::1::::<><>::
|
||||
default_env.tres::Environment::-1::1691364683::0::1::::<><>::
|
||||
GenreSettings.gd::GDScript::-1::1699516052::0::1::::<>Node<>::
|
||||
genre_dialog_container.gd::GDScript::-1::1693705495::0::1::::<>ScrollContainer<>::
|
||||
genre_dialog_container.tscn::PackedScene::153944638127573795::1706469530::0::1::::<><>::uid://cl7q0snsncynm<>res://genre_dialog_container.gd
|
||||
icon.png::CompressedTexture2D::6683631437730026850::1691364683::1691364683::1::::<><>::
|
||||
MenuManager.gd::GDScript::-1::1707680580::0::1::::<>Node<>::
|
||||
new_genre.tscn::PackedScene::4691503272014395181::1707680580::0::1::::<><>::
|
||||
README.md::TextFile::-1::1691364683::0::1::::<><>::
|
||||
term_container.tscn::PackedScene::5611995818604433798::1706469530::0::1::::<><>::
|
||||
::res://index_screen/::1691364683
|
||||
index.tscn::PackedScene::1801527253264693182::1691364683::0::1::::<><>::
|
||||
::res://top_toolbar/::1706475281
|
||||
CharacterMenu.gd::GDScript::-1::1705288580::0::1::::<>Label<>::
|
||||
DialogMenu.gd::GDScript::-1::1699821194::0::1::::<>Label<>::
|
||||
GenreDialogManager.gd::GDScript::-1::1693446726::0::1::::<>OptionButton<>::
|
||||
TopToolbar.tscn::PackedScene::5079673781919012116::1706475281::0::1::::<><>::res://MenuManager.gd<>res://GenreSettings.gd<>res://top_toolbar/DialogMenu.gd<>res://top_toolbar/GenreDialogManager.gd<>uid://cgtpfhy1ler0<>res://top_toolbar/CharacterMenu.gd
|
||||
|
@ -1,2 +1,4 @@
|
||||
res://genre_dialog_container.tscn
|
||||
res://MenuManager.gd
|
||||
res://top_toolbar/TopToolbar.tscn
|
||||
res://top_toolbar/CharacterMenu.gd
|
||||
res://term_container.tscn
|
||||
|
@ -10,7 +10,7 @@ run_reload_scripts=true
|
||||
|
||||
[recent_files]
|
||||
|
||||
scenes=["res://term_container.tscn", "res://new_genre.tscn", "res://genre_dialog_container.tscn", "res://top_toolbar/TopToolbar.tscn", "res://index_screen/index.tscn", "res://toolset_test_tabbed_merged/tabbed_merged_test_interface.tscn", "res://toolset_test_tabbed_merged/draggable_assets.tscn", "res://toolset_test/drag_and_drop_demo_final.tscn"]
|
||||
scenes=["res://new_genre.tscn", "res://term_container.tscn", "res://genre_dialog_container.tscn", "res://top_toolbar/TopToolbar.tscn", "res://index_screen/index.tscn", "res://toolset_test_tabbed_merged/tabbed_merged_test_interface.tscn", "res://toolset_test_tabbed_merged/draggable_assets.tscn", "res://toolset_test/drag_and_drop_demo_final.tscn"]
|
||||
scripts=["res://top_toolbar/CharacterMenu.gd", "res://genre_dialog_container.gd", "res://top_toolbar/GenreDialogManager.gd", "res://top_toolbar/DialogMenu.gd", "res://GenreSettings.gd", "res://RadioButtonManager.gd", "res://MenuManager.gd", "res://toolset_test_tabbed_merged/target_container_final.gd", "res://toolset_test_tabbed_merged/toolset_test_tabbed_merged.gd", "res://toolset_test/draggable_final.gd"]
|
||||
|
||||
[dialog_bounds]
|
||||
|
@ -3,11 +3,11 @@
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 22,
|
||||
"column": 117,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 29,
|
||||
"scroll_position": 0.0,
|
||||
"h_scroll_position": 343,
|
||||
"row": 84,
|
||||
"scroll_position": 51.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
@ -17,12 +17,16 @@ state={
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 32,
|
||||
"column": 0,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 35,
|
||||
"scroll_position": 2.0,
|
||||
"selection": false,
|
||||
"row": 2,
|
||||
"scroll_position": 0.0,
|
||||
"selection": true,
|
||||
"selection_from_column": 0,
|
||||
"selection_from_line": 2,
|
||||
"selection_to_column": 43,
|
||||
"selection_to_line": 2,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
||||
@ -31,16 +35,12 @@ state={
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 76,
|
||||
"column": 333,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 16,
|
||||
"scroll_position": 3.0,
|
||||
"selection": true,
|
||||
"selection_from_column": 1,
|
||||
"selection_from_line": 15,
|
||||
"selection_to_column": 76,
|
||||
"selection_to_line": 16,
|
||||
"h_scroll_position": 2044,
|
||||
"row": 24,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
||||
@ -63,12 +63,16 @@ state={
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 64,
|
||||
"column": 87,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 16,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"selection": true,
|
||||
"selection_from_column": 1,
|
||||
"selection_from_line": 15,
|
||||
"selection_to_column": 87,
|
||||
"selection_to_line": 16,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
||||
@ -77,11 +81,11 @@ state={
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 76,
|
||||
"column": 61,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 100,
|
||||
"scroll_position": 69.0,
|
||||
"row": 15,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
@ -15,15 +15,74 @@ func _process(delta):
|
||||
|
||||
|
||||
func _on_option_button_wizards_item_selected(index):
|
||||
var newGenre = load("res://new_genre.tscn")
|
||||
var toLoad
|
||||
var data
|
||||
var parser = XMLParser.new()
|
||||
match index:
|
||||
0:
|
||||
$GenreMenu.show()
|
||||
$DialogMenu.hide()
|
||||
$CharacterMenu.hide()
|
||||
parser.open("user://GenreSettings.xml")
|
||||
var loaded_name = ""
|
||||
var name_loaded = false
|
||||
var loaded_def = false
|
||||
var def_loaded = false
|
||||
var loadedBase
|
||||
var base_loaded = false
|
||||
while parser.read() != ERR_FILE_EOF:
|
||||
if parser.get_node_type() == XMLParser.NODE_ELEMENT:
|
||||
var node_name = parser.get_node_name()
|
||||
if node_name == "default":
|
||||
var node_data = parser.get_node_data()
|
||||
if node_data == "true":
|
||||
loaded_def = true
|
||||
else:
|
||||
loaded_def = false
|
||||
def_loaded = true
|
||||
|
||||
elif node_name == "name":
|
||||
loaded_name = parser.get_node_data()
|
||||
if loaded_name != "Fantasy" and loaded_name != "Science Fiction" and loaded_name != "Modern Day":
|
||||
name_loaded = true
|
||||
elif node_name == "basedOn":
|
||||
base_loaded = true
|
||||
loadedBase = parser.get_node_data()
|
||||
if def_loaded and name_loaded and base_loaded:
|
||||
pass
|
||||
var genreInstance = newGenre.instantiate()
|
||||
genreInstance.GetChild(0).GetChild(0).Pressed = loaded_def
|
||||
genreInstance.GetChild(0).GetChild(1).text = loaded_name
|
||||
if loadedBase == "Modern Day":
|
||||
genreInstance.getChild(0).GetChild(3).Selected = 0
|
||||
elif loadedBase == "Sci Fi":
|
||||
genreInstance.getChild(0).GetChild(3).Selected = 1
|
||||
elif loadedBase == "Fantasy":
|
||||
genreInstance.getChild(0).GetChild(3).Selected = 2
|
||||
$GenreMenu/HBoxContainer/Default/ScrollContainer/GenreContainer.add_child(genreInstance)
|
||||
$GenreMenu/HBoxContainer/Default/ScrollContainer/GenreContainer.move_child($GenreMenu/HBoxContainer/Default/ScrollContainer/GenreContainer/NewGenre, $GenreMenu/HBoxContainer/Default/ScrollContainer/GenreContainer.get_child_count() - 1)
|
||||
def_loaded = false
|
||||
name_loaded = false
|
||||
1:
|
||||
$GenreMenu.hide()
|
||||
$DialogMenu.show()
|
||||
$CharacterMenu.hide()
|
||||
var newTerm = load("res://term_container.tscn")
|
||||
parser.open("user://DialougeSettings.xml")
|
||||
var unselected = true
|
||||
while parser.read() != ERR_FILE_EOF:
|
||||
if parser.get_node_type() == XMLParser.NODE_ELEMENT:
|
||||
if $DialogMenu/VBoxContainer.get_child($VBoxContainer.get_child_count() - 1).get_child(0).get_child(0).get_child(1).text == "":
|
||||
var termInstance = newTerm.instantiate()
|
||||
unselected = true
|
||||
termInstance.get_child(0).get_child(0).get_child(1).text = parser.get_node_data()
|
||||
$DialogMenu/VBoxContainer.add_child(termInstance)
|
||||
$DialogMenu/VBoxContainer.move_child($VBoxContainer/Button, $VBoxContainer.get_child_count() - 1)
|
||||
elif $DialogMenu/VBoxContainer.get_child($VBoxContainer.get_child_count() - 1).get_child(0).get_child(1).get_child(1).text == "":
|
||||
$DialogMenu/VBoxContainer.get_child($VBoxContainer.get_child_count() - 1).get_child(0).get_child(1).get_child(1).text = parser.get_node_data()
|
||||
elif unselected:
|
||||
$DialogMenu/VBoxContainer.get_child($VBoxContainer.get_child_count() - 1).get_child(1).get_child(1).Selected = parser.get_node_data()
|
||||
2:
|
||||
$GenreMenu.hide()
|
||||
$DialogMenu.hide()
|
||||
|
@ -80,7 +80,6 @@ layout_mode = 2
|
||||
script = ExtResource("1_l6hds")
|
||||
|
||||
[node name="GenreMenu" type="Label" parent="HBoxContainer/VBoxContainer3"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Genre Menu"
|
||||
script = ExtResource("2_kvqsl")
|
||||
@ -209,6 +208,7 @@ offset_bottom = 60.0
|
||||
text = "Save"
|
||||
|
||||
[node name="CharacterMenu" type="Label" parent="HBoxContainer/VBoxContainer3"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Character Menu"
|
||||
script = ExtResource("6_bxipl")
|
||||
|
Loading…
Reference in New Issue
Block a user