Skip to content

Commit

Permalink
Rename NextIndicator class to fit all other names (#2102)
Browse files Browse the repository at this point in the history
- Also removes some whitespace
  • Loading branch information
Jowan-Spooner authored Feb 19, 2024
1 parent d7233bc commit dd52844
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions addons/dialogic/Editor/Events/EventBlock/event_block.gd
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func build_editor(build_header:bool = true, build_body:bool = false) -> void:
# Only set the value if the field is visible
#
# This prevents events with varied value types (event_setting, event_variable)
# from injecting incorrect types into hidden fields, which then throw errors
# from injecting incorrect types into hidden fields, which then throw errors
# in the console.
if p.has('condition') and not p.condition.is_empty():
if _evaluate_visibility_condition(p):
Expand Down Expand Up @@ -351,7 +351,7 @@ func _on_resource_ui_update_needed() -> void:
# Only set the value if the field is visible
#
# This prevents events with varied value types (event_setting, event_variable)
# from injecting incorrect types into hidden fields, which then throw errors
# from injecting incorrect types into hidden fields, which then throw errors
# in the console.
if node_info.has('condition') and not node_info.condition.is_empty():
if _evaluate_visibility_condition(node_info):
Expand Down
14 changes: 7 additions & 7 deletions addons/dialogic/Editor/Events/Fields/field_options_dynamic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ func _on_Search_text_changed(new_text:String, just_update:bool = false) -> void:
curr_line_length += %Suggestions.fixed_icon_size.x * %Suggestions.get_icon_scale() + _icon_margin * 2 + _h_separation

line_length = max(line_length, curr_line_length)

%Suggestions.set_item_tooltip(idx, suggestions[element].get('tooltip', ''))
%Suggestions.set_item_metadata(idx, suggestions[element].value)
idx += 1

if not %Suggestions.visible:
%Suggestions.show()
%Suggestions.global_position = $PanelContainer.global_position+Vector2(0,1)*$PanelContainer.size.y
Expand All @@ -160,22 +160,22 @@ func _on_Search_text_changed(new_text:String, just_update:bool = false) -> void:
else:
current_selected = -1
%Search.grab_focus()

var total_height: int = 0
for item in %Suggestions.item_count:
total_height += _line_height * DialogicUtil.get_editor_scale() + _v_separation
total_height += _v_separation * 2
if total_height > _max_height:
line_length += %Suggestions.get_v_scroll_bar().get_minimum_size().x

%Suggestions.size.x = max(%PanelContainer.size.x, line_length)
%Suggestions.size.y = min(total_height, _max_height)
# Defer setting width to give PanelContainer

# Defer setting width to give PanelContainer
# time to update it's size
await get_tree().process_frame
await get_tree().process_frame

%Suggestions.size.x = max(%PanelContainer.size.x, line_length)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func _apply_export_overrides() -> void:
name_label_panel.grow_horizontal = [1, 2, 0][name_label_alignment]

## NEXT INDICATOR SETTINGS
var next_indicator: DNextIndicator = %NextIndicator
var next_indicator: DialogicNode_NextIndicator = %NextIndicator
next_indicator.enabled = next_indicator_enabled

if next_indicator_enabled:
Expand Down
4 changes: 2 additions & 2 deletions addons/dialogic/Modules/Text/index.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func _get_settings_pages() -> Array:


func _get_character_editor_sections() -> Array:
return [this_folder.path_join('character_settings/character_moods_settings.tscn'),
this_folder.path_join('character_settings/character_portrait_mood_settings.tscn'),
return [this_folder.path_join('character_settings/character_moods_settings.tscn'),
this_folder.path_join('character_settings/character_portrait_mood_settings.tscn'),
]


Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Modules/Text/node_name_label.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func _ready():
if hide_when_empty:
name_label_root.visible = false
text = ""

func _set(property, what):
if property == 'text' and typeof(what) == TYPE_STRING:
text = what
Expand Down
8 changes: 4 additions & 4 deletions addons/dialogic/Modules/Text/node_next_indicator.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@icon("node_next_indicator_icon.svg")
class_name DNextIndicator
class_name DialogicNode_NextIndicator
extends Control

## Node that is shown when the text is fully revealed.
Expand Down Expand Up @@ -37,7 +37,7 @@ var tween: Tween

func _ready():
add_to_group('dialogic_next_indicator')

# Creating TextureRect if missing
if not texture_rect:
var icon := TextureRect.new()
Expand All @@ -48,9 +48,9 @@ func _ready():
icon.position = -icon.size
add_child(icon)
texture_rect = icon

texture_rect.texture = texture

hide()
visibility_changed.connect(_on_visibility_changed)

Expand Down

0 comments on commit dd52844

Please sign in to comment.