Skip to content

Commit

Permalink
Add property groups and fix "no logs" crash
Browse files Browse the repository at this point in the history
- fixes #1313
- fixes #1373
  • Loading branch information
Jowan-Spooner committed Mar 9, 2023
1 parent 1f5ac99 commit 7e0f85b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions addons/dialogic/Events/DefaultLayouts/ExampleHistoryScene.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ extends Control

## Example scene for viewing the History
## Implements most of the visual options from 1.x History mode

@export_group('Open &Close Button')
@export var show_open_button: bool = true
@export var show_close_button: bool = true

@export_group('Event visibility')
@export var show_all_choices: bool = true
@export var show_selected_choice: bool = true
@export var show_join_and_leave: bool = true

@export_group('Presentation')
@export var scroll_to_bottom: bool = true
@export var show_name_colors: bool = true
@export var oldest_items_first: bool = true
@export var name_delimeter: String = ": "

@export_group('Fonts')
@export var history_font_size: int
@export var history_font_normal: Font
@export var history_font_bold: Font
Expand All @@ -29,7 +32,7 @@ func _ready():


func _process(delta):
if scroll_to_bottom_flag and $HistoryBox.visible:
if scroll_to_bottom_flag and $HistoryBox.visible and %HistoryLog.get_child_count():
await get_tree().process_frame
%HistoryBox.ensure_control_visible(%HistoryLog.get_children()[-1])
scroll_to_bottom_flag = false
Expand Down

0 comments on commit 7e0f85b

Please sign in to comment.