Skip to content

Commit d77db30

Browse files
committed
Make sure GDScriptCodeExample scene duplicates its highlighter
Fixes #1267
1 parent 1705a63 commit d77db30

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

course/common/GDScriptCodeExample.tscn

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[gd_scene format=3 uid="uid://doicj7hty5hyt"]
22

3-
[ext_resource type="StyleBox" path="res://ui/theme/panel_normal.tres" id="3"]
3+
[ext_resource type="StyleBox" uid="uid://lvuws1hlca6y" path="res://ui/theme/panel_normal.tres" id="3"]
44
[ext_resource type="CodeHighlighter" uid="uid://bwq3n4u078x4s" path="res://ui/theme/gdscript_syntax_highlighter.tres" id="3_l403w"]
5+
[ext_resource type="Script" uid="uid://28t36iv56iu2" path="res://ui/components/GDScriptCodeExample.gd" id="3_sh0af"]
56

67
[node name="GDScriptCodeExample" type="CodeEdit" unique_id=450119196]
78
custom_minimum_size = Vector2(600, 200)
@@ -13,7 +14,11 @@ offset_bottom = -880.0
1314
theme_override_styles/read_only = ExtResource("3")
1415
context_menu_enabled = false
1516
shortcut_keys_enabled = false
17+
scroll_smooth = true
18+
scroll_fit_content_width = true
1619
caret_blink = true
1720
syntax_highlighter = ExtResource("3_l403w")
1821
draw_tabs = true
1922
draw_spaces = true
23+
gutters_draw_line_numbers = true
24+
script = ExtResource("3_sh0af")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@tool
2+
extends CodeEdit
3+
4+
5+
func _ready() -> void:
6+
CodeEditorEnhancer.enhance(self)
7+
CodeEditorEnhancer.prevent_editable(self)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://28t36iv56iu2

0 commit comments

Comments
 (0)