Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to Alpha 15 #1210

Merged
merged 8 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/dialogic/Editor/Events/BranchEnd.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func set_indent(indent: int):
indent_node.custom_minimum_size = Vector2(indent_size * indent, 0)
indent_node.visible = indent != 0
current_indent_level = indent
update()
queue_redraw()

func parent_node_changed():
if parent_node:
Expand Down
8 changes: 4 additions & 4 deletions addons/dialogic/Editor/Events/EventNode/EventNode.gd
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ func load_data(data):

func set_warning(text):
warning.show()
warning.hint_tooltip = text
warning.tooltip_text = text


func remove_warning(text = ''):
if warning.hint_tooltip == text or text == '':
if warning.tooltip_text == text or text == '':
warning.hide()


func set_indent(indent: int):
indent_node.custom_minimum_size = Vector2(indent_size * indent, 0)
indent_node.visible = indent != 0
current_indent_level = indent
update()
queue_redraw()


## *****************************************************************************
Expand Down Expand Up @@ -374,7 +374,7 @@ func _on_ExpandButton_toggled(button_pressed):
%ExpandButton.set_pressed_no_signal(button_pressed)
expanded = button_pressed
body_container.visible = button_pressed
get_parent().get_parent().update()
get_parent().get_parent().queue_redraw()


func _on_EventNode_gui_input(event):
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Editor/Events/Fields/ComplexPicker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func set_value(value, text : String = '') -> void:
elif file_extension != "" && file_extension != ".dch" && file_extension != ".dtl":

$Search.text = value.resource_path
$Search.hint_tooltip = value.resource_path
$Search.tooltip_text = value.resource_path
elif value:
$Search.text = value
else:
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Editor/Events/Fields/FilePicker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func set_left_text(value:String):

func set_value(value):
%Field.text = value.get_file()
%Field.hint_tooltip = value
%Field.tooltip_text = value
%ClearButton.visible = !value.is_empty()

func _on_OpenButton_pressed() -> void:
Expand Down
12 changes: 6 additions & 6 deletions addons/dialogic/Editor/Settings/Settings_Translations.gd
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ func erase_translations():
if trans_path.ends_with('.csv'):
for x_file in DialogicUtil.listdir(trans_path.get_base_dir()):
if x_file.ends_with('.translation'):
trans_files.erase(trans_path.get_base_dir().plus_file(x_file))
dir.remove(trans_path.get_base_dir().plus_file(x_file))
trans_files.erase(trans_path.get_base_dir().path_join(x_file))
dir.remove(trans_path.get_base_dir().path_join(x_file))
dir.remove(DialogicUtil.get_project_setting('dialogic/translation_path', ''))

ProjectSettings.set_setting('dialogic/translation_path', null)
Expand All @@ -110,8 +110,8 @@ func erase_translations():
dir.remove(timeline_path.trim_suffix('.dtl')+'_translation.csv')
for x_file in DialogicUtil.listdir(timeline_path.get_base_dir()):
if x_file.ends_with('.translation'):
trans_files.erase(timeline_path.get_base_dir().plus_file(x_file))
dir.remove(timeline_path.get_base_dir().plus_file(x_file))
trans_files.erase(timeline_path.get_base_dir().path_join(x_file))
dir.remove(timeline_path.get_base_dir().path_join(x_file))

var tml:DialogicTimeline = load(timeline_path)
for event in tml.get_events():
Expand Down Expand Up @@ -141,7 +141,7 @@ func _on_TransUpdate_pressed():

if !mode:
for file in DialogicUtil.listdir(timeline_path.get_base_dir()):
file = timeline_path.get_base_dir().plus_file(file)
file = timeline_path.get_base_dir().path_join(file)
if file.ends_with('.translation'):
if not file in trans_files:
trans_files.append(file)
Expand All @@ -150,7 +150,7 @@ func _on_TransUpdate_pressed():
if mode:
var trans_folder = DialogicUtil.get_project_setting('dialogic/translation_path', '').get_base_dir()
for file in DialogicUtil.listdir(trans_folder):
file = trans_folder.plus_file(file)
file = trans_folder.path_join(file)
if file.ends_with('.translation'):
if not file in trans_files:
trans_files.append(file)
Expand Down
4 changes: 2 additions & 2 deletions addons/dialogic/Editor/VisualEditor/AddEventButton.gd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func _ready():
self_modulate = Color(1,1,1)
if visible_name != '':
text = ' ' + visible_name
#hint_tooltip = DTS.translate(hint_tooltip)
#tooltip_text = DTS.translate(tooltip_text)

var _scale = DialogicUtil.get_editor_scale()
custom_minimum_size = Vector2(30,30)* _scale
Expand Down Expand Up @@ -46,7 +46,7 @@ func set_color(color):
func _get_drag_data(position):
var preview_label = Label.new()

preview_label.text = 'Add Event %s' % [ hint_tooltip ]
preview_label.text = 'Add Event %s' % [ tooltip_text ]
if self.text != '':
preview_label.text = text

Expand Down
5 changes: 2 additions & 3 deletions addons/dialogic/Editor/VisualEditor/TimelineArea.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ func _ready():
mouse_exited.connect(_on_mouse_exited)
gui_input.connect(_on_gui_input)

set('theme_override_styles/bg', DCSS.inline({
'background': get_theme_color('dark_color_1', 'Editor')
}))

set('theme_override_styles/panel', get_theme_stylebox("Background", "EditorStyles"))


func _can_drop_data(position, data):
Expand Down
6 changes: 3 additions & 3 deletions addons/dialogic/Editor/VisualEditor/VisualEditor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -868,14 +868,14 @@ func get_index_under_cursor():
func move_block_up(block):
if block.get_index() < 1: return false
%Timeline.move_child(block, block.get_index() - 1)
%TimelineArea.update()
%TimelineArea.queue_redraw()
something_changed()
return true


func move_block_down(block):
%Timeline.move_child(block, block.get_index() + 1)
%TimelineArea.update()
%TimelineArea.queue_redraw()
something_changed()
return true

Expand Down Expand Up @@ -946,7 +946,7 @@ func indent_events() -> void:
event.set_indent(0)
indent += delayed_indent

%TimelineArea.update()
%TimelineArea.queue_redraw()


func add_extra_scroll_area_to_timeline():
Expand Down
Loading