Skip to content

Commit

Permalink
Version 0.1.1
Browse files Browse the repository at this point in the history
* Updated version number to 0.1.1. Added .x86_64 files, (Linux executable files,) to .gitignore.
* Fixed bug in load functions for storyworlds made in versions 0.0.07 through 0.0.15. Personality model now loads correctly.
* Changed export presets to use version number 0.1.1.0.
* Fixed a bug on the encounter editing screen. Sorting encounters elsewhere in the editor will no longer break the encounter selection menu on the encounters tab. Selecting an encounter should now load the correct encounter.
* Changed Clarity theme to make it easier to tell the difference between active and inactive tabs. Set encounter list on Encounters tab to be visible by default. Changed drag and drop lists to display more text. Fixed bugs with encounter duplicate and delete buttons on Encounters tab.
  • Loading branch information
FrobozzWaxwing committed Jun 8, 2023
1 parent 07947cc commit 4f09bfb
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 76 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ godot/custom_resources/rotate-cw.svg
godot/custom_resources/rotate-cw.svg.import
godot/custom_resources/edit-3.svg
godot/custom_resources/edit-3.svg.import
*.x86_64
*.exe
*.pck

Expand Down
4 changes: 2 additions & 2 deletions godot/DragAndDropList.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func _ready():

func list_item(item):
var branch = create_item(get_root())
branch.set_text(0, item.get_listable_text())
branch.set_tooltip(0, item.get_listable_text(70))
branch.set_text(0, item.get_listable_text(100))
branch.set_tooltip(0, item.get_listable_text(100))
var meta = {}
meta["index"] = item_count
meta["listed_object"] = item
Expand Down
23 changes: 14 additions & 9 deletions godot/EncounterEditScreen.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var current_encounter = null
var current_option = null
var current_reaction = null
var storyworld = null
var node_scene = preload("res://graphview_node.tscn")
#var node_scene = preload("res://graphview_node.tscn")
#Track items to delete.
var items_to_delete = []
#Clipboard system variables:
Expand All @@ -21,11 +21,14 @@ func refresh_encounter_list():
var sort_method_id = $Column1/SortMenu.get_selected_id()
var sort_method = $Column1/SortMenu.get_popup().get_item_text(sort_method_id)
storyworld.sort_encounters(sort_method)
var index = 0
for entry in storyworld.encounters:
if ("" == entry.title):
$Column1/VScroll/EncountersList.add_item("[Untitled]")
else:
$Column1/VScroll/EncountersList.add_item(entry.title)
$Column1/VScroll/EncountersList.set_item_metadata(index, entry)
index += 1
if (0 == storyworld.encounters.size()):
Clear_Encounter_Editing_Screen()

Expand Down Expand Up @@ -288,15 +291,16 @@ func _on_AddButton_pressed():
$Column1/VScroll/EncountersList.select(storyworld.encounters.find(new_encounter))

func _on_EncountersList_multi_selected(index, selected):
var encounter_to_edit = storyworld.encounters[index]
var encounter_to_edit = $Column1/VScroll/EncountersList.get_item_metadata(index)
load_Encounter(encounter_to_edit)

func _on_Duplicate_pressed():
if ($Column1/VScroll/EncountersList.is_anything_selected()):
var selection = $Column1/VScroll/EncountersList.get_selected_items()
var selected_indices = $Column1/VScroll/EncountersList.get_selected_items()
var encounters_to_duplicate = []
for entry in selection:
encounters_to_duplicate.append(storyworld.encounters[entry])
for index in selected_indices:
var encounter = $Column1/VScroll/EncountersList.get_item_metadata(index)
encounters_to_duplicate.append(encounter)
var encounter_to_edit = null
for entry in encounters_to_duplicate:
var new_encounter = storyworld.duplicate_encounter(entry)
Expand Down Expand Up @@ -387,12 +391,13 @@ func _on_ConfirmDeletion_confirmed():

func _on_DeleteButton_pressed():
if ($Column1/VScroll/EncountersList.is_anything_selected()):
var selection = $Column1/VScroll/EncountersList.get_selected_items()
var selected_indices = $Column1/VScroll/EncountersList.get_selected_items()
items_to_delete.clear()
$ConfirmDeletion/ItemsToDelete.clear()
for each in selection:
items_to_delete.append(storyworld.encounters[each])
$ConfirmDeletion/ItemsToDelete.add_item(each.title)
for index in selected_indices:
var encounter = $Column1/VScroll/EncountersList.get_item_metadata(index)
items_to_delete.append(encounter)
$ConfirmDeletion/ItemsToDelete.add_item(encounter.title)
if (!items_to_delete.empty()):
if (1 == items_to_delete.size()):
$ConfirmDeletion.dialog_text = "Are you sure you wish to delete the following encounter?"
Expand Down
Loading

0 comments on commit 4f09bfb

Please sign in to comment.