Skip to content

Commit

Permalink
Remove whitespace before end of line (#2263)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohq authored Jun 4, 2024
1 parent ae18fa9 commit 0c3e2a2
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions addons/dialogic/Editor/Common/DCSS.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@tool
class_name DCSS

static func inline(style:Dictionary) -> StyleBoxFlat:
var scale:float = DialogicUtil.get_editor_scale()
var s := StyleBoxFlat.new()
Expand Down Expand Up @@ -45,7 +45,7 @@ static func inline(style:Dictionary) -> StyleBoxFlat:

static func style(node, style:Dictionary) -> StyleBoxFlat:
var s:StyleBoxFlat = inline(style)

node.set('theme_override_styles/normal', s)
node.set('theme_override_styles/focus', s)
node.set('theme_override_styles/read_only', s)
Expand Down
4 changes: 2 additions & 2 deletions addons/dialogic/Editor/Common/toolbar.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func _ready():
if owner.get_parent() is SubViewport:
return
%CustomButtons.custom_minimum_size.y = 33 * DialogicUtil.get_editor_scale()

for child in get_children():
if child is Button:
child.queue_free()
Expand All @@ -34,7 +34,7 @@ func add_custom_button(label:String, icon:Texture) -> Button:
button.text = label
button.icon = icon
# button.flat = true

button.size_flags_vertical = Control.SIZE_SHRINK_BEGIN
%CustomButtons.add_child(button)
# custom_minimum_size.y = button.size.y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ extends Button

func _ready() -> void:
tooltip_text = visible_name

custom_minimum_size = Vector2(get_theme_font("font", 'Label').get_string_size(text).x+35,30) * DialogicUtil.get_editor_scale()

add_theme_color_override("font_color", get_theme_color("font_color", "Editor"))
add_theme_color_override("font_color_hover", get_theme_color("accent_color", "Editor"))
apply_base_button_style()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extends DialogicAnimation
func animate():
var tween := (node.create_tween() as Tween)
tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE)

var strength :float = node.get_viewport().size.x/60
tween.tween_property(node, 'position:x', orig_pos.x+strength, time*0.2)
tween.tween_property(node, 'position:x', orig_pos.x-strength, time*0.1)
Expand All @@ -13,5 +13,5 @@ func animate():
tween.tween_property(node, 'position:x', orig_pos.x-strength, time*0.1)
tween.tween_property(node, 'position:x', orig_pos.x+strength, time*0.1)
tween.tween_property(node, 'position:x', orig_pos.x, time*0.2)

tween.finished.connect(emit_signal.bind('finished_once'))
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extends DialogicAnimation
func animate():
var tween := (node.create_tween() as Tween)
tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE)

var strength :float = node.get_viewport().size.y/40
tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.2)
tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1)
Expand All @@ -13,5 +13,5 @@ func animate():
tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y, time*0.2)

tween.finished.connect(emit_signal.bind('finished_once'))
6 changes: 3 additions & 3 deletions addons/dialogic/Modules/Character/DefaultAnimations/tada.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ extends DialogicAnimation
func animate():
var tween := (node.create_tween() as Tween)
tween.set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)

var strength :float = 0.01

tween.set_parallel(true)
tween.tween_property(node, 'scale', Vector2(1,1)*(1+strength), time*0.3)
tween.tween_property(node, 'rotation', -strength, time*0.1).set_delay(time*0.2)
Expand All @@ -15,5 +15,5 @@ func animate():
tween.tween_property(node, 'rotation', -strength, time*0.1).set_delay(time*0.6)
tween.chain().tween_property(node, 'scale', Vector2(1,1), time*0.3)
tween.parallel().tween_property(node, 'rotation', 0.0, time*0.3)

tween.finished.connect(emit_signal.bind('finished_once'))
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func load_info(text:String, character:String = "", character_color: Color =Color
name_label.show()
else:
name_label.hide()

var icon_node : TextureRect = get_icon()
if icon == null:
icon_node.hide()
Expand Down
4 changes: 2 additions & 2 deletions addons/dialogic/Resources/CharacterResourceLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ func _handles_type(typename: StringName) -> bool:
func _load(path: String, original_path: String, use_sub_threads: bool, cache_mode: int):
# print('[Dialogic] Reimporting character "' , path, '"')
var file := FileAccess.open(path, FileAccess.READ)

if not file:
# For now, just let editor know that for some reason you can't
# read the file.
print("[Dialogic] Error opening file:", FileAccess.get_open_error())
return FileAccess.get_open_error()

return dict_to_inst(str_to_var(file.get_as_text()))


Expand Down
8 changes: 4 additions & 4 deletions addons/dialogic/Resources/CharacterResourceSaver.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ func _get_recognized_extensions(resource: Resource) -> PackedStringArray:
func _recognize(resource: Resource) -> bool:
# Cast instead of using "is" keyword in case is a subclass
resource = resource as DialogicCharacter

if resource:
return true

return false


# Save the resource
func _save(resource: Resource, path: String = '', flags: int = 0):
var file := FileAccess.open(path, FileAccess.WRITE)

if not file:
# For now, just let editor know that for some reason you can't
# read the file.
print("[Dialogic] Error opening file:", FileAccess.get_open_error())
return FileAccess.get_open_error()

var result := var_to_str(inst_to_dict(resource))
file.store_string(result)
# print('[Dialogic] Saved character "' , path, '"')
Expand Down
4 changes: 2 additions & 2 deletions addons/dialogic/Resources/TimelineResourceLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ func _handles_type(typename: StringName) -> bool:
# parse the file and return a resource
func _load(path: String, original_path: String, use_sub_threads: bool, cache_mode: int):
var file := FileAccess.open(path, FileAccess.READ)

if not file:
# For now, just let editor know that for some reason you can't
# read the file.
print("[Dialogic] Error opening file:", FileAccess.get_open_error())
return FileAccess.get_open_error()

var tml := DialogicTimeline.new()
tml.from_text(file.get_as_text())
return tml

0 comments on commit 0c3e2a2

Please sign in to comment.