Skip to content

Commit

Permalink
Merge pull request #1636 from zaknafean/choice-disabled-view
Browse files Browse the repository at this point in the history
Choice disabled view
  • Loading branch information
zaknafean authored Jul 20, 2023
2 parents ac656b6 + 093bd59 commit 3c7f776
Show file tree
Hide file tree
Showing 3 changed files with 729 additions and 669 deletions.
16 changes: 13 additions & 3 deletions addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ onready var n : Dictionary = {


# Choice Buttons

'show_disabled': $"VBoxContainer/TabContainer/Choice Buttons/Column/VBoxContainer/GridContainer/ChoiceShow",
'button_fixed': $"VBoxContainer/TabContainer/Choice Buttons/Column2/GridContainer/HBoxContainer2/FixedSize",
'button_fixed_x': $"VBoxContainer/TabContainer/Choice Buttons/Column2/GridContainer/HBoxContainer2/ButtonSizeX",
'button_fixed_y': $"VBoxContainer/TabContainer/Choice Buttons/Column2/GridContainer/HBoxContainer2/ButtonSizeY",
Expand Down Expand Up @@ -473,6 +473,9 @@ func load_theme(filename):

n['name_position'].select(theme.get_value('name', 'position', 0))

# Choice Buttons
n['show_disabled'].pressed = theme.get_value('disabled_choices', 'show', false)

# Audio
var default_audio_file = "res://addons/dialogic/Example Assets/Sound Effects/Beep.wav"
var default_audio_data = {
Expand Down Expand Up @@ -1021,6 +1024,15 @@ func _on_CustomButtonsButton_pressed():
editor_reference.godot_dialog_connect(self, "_on_custom_button_selected")


func _on_choice_show_toggled(button_pressed) -> void:
if loading:
return

DialogicResources.set_theme_value(current_theme, 'disabled_choices', 'show', button_pressed)
_on_PreviewButton_pressed() # Refreshing the preview
_update_name_fields_editable()


## ------------ GLOSSARY TAB ------------------------------------

## TITLE FONT
Expand Down Expand Up @@ -1132,5 +1144,3 @@ func _on_Glossary_BackgroundPanel_selected(path, target):
func _on_audio_data_updated(section):
DialogicResources.set_theme_value(current_theme, 'audio', section, n['audio_pickers'][section].get_data())
_on_PreviewButton_pressed()


Loading

0 comments on commit 3c7f776

Please sign in to comment.