diff --git a/course/common/GDScriptCodeExample.gd b/course/common/GDScriptCodeExample.gd index da1c1fb6..595e6588 100644 --- a/course/common/GDScriptCodeExample.gd +++ b/course/common/GDScriptCodeExample.gd @@ -4,10 +4,6 @@ extends CodeEdit const CODE_FONT := "res://ui/theme/fonts/font_code.tres" -@export var min_size := Vector2(600, 200): - set = set_min_size - - func _ready() -> void: if get_theme_font("font").resource_path != CODE_FONT: add_theme_font_override("font", load(CODE_FONT) as FontVariation) @@ -16,20 +12,4 @@ func _ready() -> void: wrap_mode = TextEdit.LINE_WRAPPING_NONE CodeEditorEnhancer.enhance(self) CodeEditorEnhancer.prevent_editable(self) - scroll_fit_content_height = true - - if not Engine.is_editor_hint(): - Events.font_size_scale_changed.connect(_update_size) - - -func set_min_size(new_size: Vector2) -> void: - min_size = new_size - custom_minimum_size = new_size - - -func _update_size(_new_font_scale: int) -> void: - # Forces the text wrapping to update. Without this, the code can overflow - # the container when changing the font size. - # TODO: There is some computation error in the TextEdit, it seems. Need to investigate it further. - pass diff --git a/course/common/GDScriptCodeExample.tscn b/course/common/GDScriptCodeExample.tscn index ae6c8586..b4ca2dde 100644 --- a/course/common/GDScriptCodeExample.tscn +++ b/course/common/GDScriptCodeExample.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cbxo4pmcdfrbf"] +[gd_scene format=3 uid="uid://db1b2noi66ypn"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_sh0af"] [ext_resource type="StyleBox" path="res://ui/theme/styles/panel_normal.tres" id="3"] @@ -6,7 +6,6 @@ [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="3_sh0af"] [node name="GDScriptCodeExample" type="CodeEdit" unique_id=450119196] -custom_minimum_size = Vector2(600, 200) anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -18,7 +17,6 @@ context_menu_enabled = false shortcut_keys_enabled = false scroll_smooth = true scroll_fit_content_height = true -scroll_fit_content_width = true caret_blink = true syntax_highlighter = ExtResource("3_l403w") draw_tabs = true diff --git a/course/common/inventory/DictInventory.tscn b/course/common/inventory/DictInventory.tscn index 50d88e80..125e95a4 100644 --- a/course/common/inventory/DictInventory.tscn +++ b/course/common/inventory/DictInventory.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://5565jgtxayff"] +[gd_scene format=3 uid="uid://do87gm8a66o5o"] [ext_resource type="Script" uid="uid://dcpcup5nppub7" path="res://ui/components/UnscaledLabel.gd" id="2_dwu3a"] [ext_resource type="Script" uid="uid://r14urqhc40oi" path="res://course/common/inventory/DictInventory.gd" id="3"] diff --git a/course/common/inventory/DictItem.tscn b/course/common/inventory/DictItem.tscn index 4495b1da..d35cbd6a 100644 --- a/course/common/inventory/DictItem.tscn +++ b/course/common/inventory/DictItem.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://ckbquvn7m4a6u"] +[gd_scene format=3 uid="uid://cbsp7q8fahfwj"] [ext_resource type="Texture2D" uid="uid://53p3lhsufh82" path="res://course/common/inventory/healing_heart.png" id="2"] [ext_resource type="Script" uid="uid://byafhjougrfbm" path="res://course/common/inventory/DictItem.gd" id="3"] diff --git a/course/lesson-1-what-code-is-like/ThreeCodeExamples.tscn b/course/lesson-1-what-code-is-like/ThreeCodeExamples.tscn index d2bec0d2..96bede78 100644 --- a/course/lesson-1-what-code-is-like/ThreeCodeExamples.tscn +++ b/course/lesson-1-what-code-is-like/ThreeCodeExamples.tscn @@ -1,6 +1,6 @@ -[gd_scene format=3 uid="uid://braa0tkip7xle"] +[gd_scene format=3 uid="uid://ditbyiv3pnmie"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [ext_resource type="Script" uid="uid://shwmuwkj6rho" path="res://course/lesson-1-what-code-is-like/ThreeCodeExamples.gd" id="2"] [ext_resource type="StyleBox" path="res://ui/theme/styles/panel_normal.tres" id="3"] diff --git a/course/lesson-10-the-game-loop/visuals/ExampleProcessFunction.tscn b/course/lesson-10-the-game-loop/visuals/ExampleProcessFunction.tscn index a881be57..4e491224 100644 --- a/course/lesson-10-the-game-loop/visuals/ExampleProcessFunction.tscn +++ b/course/lesson-10-the-game-loop/visuals/ExampleProcessFunction.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bjx27t7guxew4"] +[gd_scene format=3 uid="uid://d1gxihk5px0uc"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_uo855"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-12-using-variables/visuals/ErrorAccess.tscn b/course/lesson-12-using-variables/visuals/ErrorAccess.tscn index 85280286..a987adef 100644 --- a/course/lesson-12-using-variables/visuals/ErrorAccess.tscn +++ b/course/lesson-12-using-variables/visuals/ErrorAccess.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dxcnkjxe46pgy"] +[gd_scene format=3 uid="uid://cytbrg5vpqfxu"] [ext_resource type="PackedScene" path="res://ui/components/popups/ErrorOverlayPopup.tscn" id="1"] diff --git a/course/lesson-12-using-variables/visuals/ExampleFunctions.tscn b/course/lesson-12-using-variables/visuals/ExampleFunctions.tscn index ddae2262..d2ab62b5 100644 --- a/course/lesson-12-using-variables/visuals/ExampleFunctions.tscn +++ b/course/lesson-12-using-variables/visuals/ExampleFunctions.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://cg6v501gpsila"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=622919700] custom_minimum_size = Vector2(0, 140) diff --git a/course/lesson-12-using-variables/visuals/ExampleInFunction.tscn b/course/lesson-12-using-variables/visuals/ExampleInFunction.tscn index 48f4350d..b419fe81 100644 --- a/course/lesson-12-using-variables/visuals/ExampleInFunction.tscn +++ b/course/lesson-12-using-variables/visuals/ExampleInFunction.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://c7jl0ulsxblv2"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=1867007233] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-12-using-variables/visuals/ExampleScriptWide.tscn b/course/lesson-12-using-variables/visuals/ExampleScriptWide.tscn index f6d49142..6efa3a59 100644 --- a/course/lesson-12-using-variables/visuals/ExampleScriptWide.tscn +++ b/course/lesson-12-using-variables/visuals/ExampleScriptWide.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://chqhrrmxjpwb5"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=59600733] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-12-using-variables/visuals/ExampleUnclear.tscn b/course/lesson-12-using-variables/visuals/ExampleUnclear.tscn index dbedaaf1..c7eb893d 100644 --- a/course/lesson-12-using-variables/visuals/ExampleUnclear.tscn +++ b/course/lesson-12-using-variables/visuals/ExampleUnclear.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://dehhbadatfkkx"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=261845054] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-12-using-variables/visuals/ExampleUnclearImproved.tscn b/course/lesson-12-using-variables/visuals/ExampleUnclearImproved.tscn index 69e4f572..612bf938 100644 --- a/course/lesson-12-using-variables/visuals/ExampleUnclearImproved.tscn +++ b/course/lesson-12-using-variables/visuals/ExampleUnclearImproved.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://ds3v6x6qeaa2e"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=2137742672] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-12-using-variables/visuals/ExampleVariableGrouping.tscn b/course/lesson-12-using-variables/visuals/ExampleVariableGrouping.tscn index 0bc92fc6..234c28e1 100644 --- a/course/lesson-12-using-variables/visuals/ExampleVariableGrouping.tscn +++ b/course/lesson-12-using-variables/visuals/ExampleVariableGrouping.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://6eegrm35ff8u"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=1856726596] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-13-conditions/visuals/ExampleComparisons.tscn b/course/lesson-13-conditions/visuals/ExampleComparisons.tscn index bdef2309..daf9d9da 100644 --- a/course/lesson-13-conditions/visuals/ExampleComparisons.tscn +++ b/course/lesson-13-conditions/visuals/ExampleComparisons.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cgv2aafha7pwm"] +[gd_scene format=3 uid="uid://bbyxhxd0knirk"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_2nxnl"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-13-conditions/visuals/ExampleElse.tscn b/course/lesson-13-conditions/visuals/ExampleElse.tscn index 8598ec9d..ac22bb02 100644 --- a/course/lesson-13-conditions/visuals/ExampleElse.tscn +++ b/course/lesson-13-conditions/visuals/ExampleElse.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://crg1e4eimsv4p"] +[gd_scene format=3 uid="uid://csb2agp80pa04"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var speed = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -47,9 +47,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=571951309 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=2129553718 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["speed"] +monitored_variables = Array[String](["speed"]) diff --git a/course/lesson-13-conditions/visuals/ExampleHeal.tscn b/course/lesson-13-conditions/visuals/ExampleHeal.tscn index 3cae9f0d..8f640be2 100644 --- a/course/lesson-13-conditions/visuals/ExampleHeal.tscn +++ b/course/lesson-13-conditions/visuals/ExampleHeal.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bm7nm3lypp56h"] +[gd_scene format=3 uid="uid://cxoi5mrru8b6v"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="3"] @@ -44,10 +44,10 @@ layout_mode = 2 gdscript_code = "func heal(amount): health += amount" -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1055237080, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1055237080, 1323725507) index="1" unique_id=1248061364] text = "heal(50)" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(1055237080, 934997768) index="2" unique_id=175998401] visible = true text = "func heal(amount): health += amount" diff --git a/course/lesson-13-conditions/visuals/ExampleHealLimited.tscn b/course/lesson-13-conditions/visuals/ExampleHealLimited.tscn index c380b6ba..2f8a2e19 100644 --- a/course/lesson-13-conditions/visuals/ExampleHealLimited.tscn +++ b/course/lesson-13-conditions/visuals/ExampleHealLimited.tscn @@ -75,4 +75,4 @@ _health_bar = NodePath("HealthBar") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1312446814 instance=ExtResource("4")] layout_mode = 2 -monitored_variables = ["health"] +monitored_variables = Array[String](["health"]) diff --git a/course/lesson-13-conditions/visuals/ExampleHealthFunctions.tscn b/course/lesson-13-conditions/visuals/ExampleHealthFunctions.tscn index c547b4bb..a6ab2bc3 100644 --- a/course/lesson-13-conditions/visuals/ExampleHealthFunctions.tscn +++ b/course/lesson-13-conditions/visuals/ExampleHealthFunctions.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://wfhlg661g6rc"] +[gd_scene format=3 uid="uid://by3r8j3oldkfb"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_p6hej"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-13-conditions/visuals/ExampleHealthLimitUpper.tscn b/course/lesson-13-conditions/visuals/ExampleHealthLimitUpper.tscn index 2454ab6c..cb07fe95 100644 --- a/course/lesson-13-conditions/visuals/ExampleHealthLimitUpper.tscn +++ b/course/lesson-13-conditions/visuals/ExampleHealthLimitUpper.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cknuxbwy4hkix"] +[gd_scene format=3 uid="uid://dttejruueosmn"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_dlt4h"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-13-conditions/visuals/ExampleJump.tscn b/course/lesson-13-conditions/visuals/ExampleJump.tscn index 2c6c3b2b..3abeac81 100644 --- a/course/lesson-13-conditions/visuals/ExampleJump.tscn +++ b/course/lesson-13-conditions/visuals/ExampleJump.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cm5wrao3hley5"] +[gd_scene format=3 uid="uid://c4owvcmthb35e"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="2"] @@ -21,10 +21,10 @@ size_flags_horizontal = 3 [node name="RunnableCodeExample" parent="." unique_id=1624132670 instance=ExtResource("1")] layout_mode = 2 -[node name="ResetButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1624132670, 1323725507) index="0" unique_id=1494799076] +[node name="ResetButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1624132670, 1323725507) index="0" unique_id=1494799076] visible = false -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1624132670, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1624132670, 1323725507) index="1" unique_id=1248061364] text = "Jump" [node name="RobotJump" parent="RunnableCodeExample" unique_id=1011218082 instance=ExtResource("2")] diff --git a/course/lesson-14-multiplying/visuals/CodeLevelUpBasic.tscn b/course/lesson-14-multiplying/visuals/CodeLevelUpBasic.tscn index e7d37c18..bd449329 100644 --- a/course/lesson-14-multiplying/visuals/CodeLevelUpBasic.tscn +++ b/course/lesson-14-multiplying/visuals/CodeLevelUpBasic.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cjb6ja6xbmto0"] +[gd_scene format=3 uid="uid://s40ptipfkfg6"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_xfu3p"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-14-multiplying/visuals/CodeLevelUpExp.tscn b/course/lesson-14-multiplying/visuals/CodeLevelUpExp.tscn index b63bcaf3..d2d9290c 100644 --- a/course/lesson-14-multiplying/visuals/CodeLevelUpExp.tscn +++ b/course/lesson-14-multiplying/visuals/CodeLevelUpExp.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bcmu105sje7hr"] +[gd_scene format=3 uid="uid://da724ui7e1pn4"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_0m6b1"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-14-multiplying/visuals/CodeMaxHealth.tscn b/course/lesson-14-multiplying/visuals/CodeMaxHealth.tscn index da8feb07..01cdfba7 100644 --- a/course/lesson-14-multiplying/visuals/CodeMaxHealth.tscn +++ b/course/lesson-14-multiplying/visuals/CodeMaxHealth.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://rbwji6d7bly7"] +[gd_scene format=3 uid="uid://bami8rc5tr1bm"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_tt1pm"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-14-multiplying/visuals/CodeMaxHealthLinear.tscn b/course/lesson-14-multiplying/visuals/CodeMaxHealthLinear.tscn index 53740ed3..d564c48e 100644 --- a/course/lesson-14-multiplying/visuals/CodeMaxHealthLinear.tscn +++ b/course/lesson-14-multiplying/visuals/CodeMaxHealthLinear.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://c3eu8n5v0i66a"] +[gd_scene format=3 uid="uid://drrrs4x6d5s64"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_svr0u"] diff --git a/course/lesson-14-multiplying/visuals/CodeStats.tscn b/course/lesson-14-multiplying/visuals/CodeStats.tscn index 73196140..3d0cb82a 100644 --- a/course/lesson-14-multiplying/visuals/CodeStats.tscn +++ b/course/lesson-14-multiplying/visuals/CodeStats.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bvda7f1llkd6a"] +[gd_scene format=3 uid="uid://brir1f5lx8cn8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_d1dq1"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-14-multiplying/visuals/GraphExp.tscn b/course/lesson-14-multiplying/visuals/GraphExp.tscn index f319defc..1ba3574f 100644 --- a/course/lesson-14-multiplying/visuals/GraphExp.tscn +++ b/course/lesson-14-multiplying/visuals/GraphExp.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://npktnl2j3nlm"] +[gd_scene format=3 uid="uid://ckca6ans6edkp"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://ct75r36mr211y" path="res://course/lesson-14-multiplying/visuals/Graph.tscn" id="2"] @@ -18,10 +18,10 @@ offset_bottom = 14.0 [node name="RunnableCodeExample" parent="." unique_id=18372269 instance=ExtResource("1")] layout_mode = 2 -[node name="ResetButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(18372269, 1323725507) index="0" unique_id=1494799076] +[node name="ResetButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(18372269, 1323725507) index="0" unique_id=1494799076] visible = false -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(18372269, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(18372269, 1323725507) index="1" unique_id=1248061364] text = "Show Me" [node name="Graph" parent="RunnableCodeExample" unique_id=1234894201 instance=ExtResource("2")] diff --git a/course/lesson-14-multiplying/visuals/GraphLinear.tscn b/course/lesson-14-multiplying/visuals/GraphLinear.tscn index 3b80d8d2..ed536640 100644 --- a/course/lesson-14-multiplying/visuals/GraphLinear.tscn +++ b/course/lesson-14-multiplying/visuals/GraphLinear.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://c72e8wfwl3drd"] +[gd_scene format=3 uid="uid://bvoulropx7cps"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://ct75r36mr211y" path="res://course/lesson-14-multiplying/visuals/Graph.tscn" id="2"] @@ -19,10 +19,10 @@ offset_bottom = 14.0 custom_minimum_size = Vector2(400, 450) layout_mode = 2 -[node name="ResetButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1082971184, 1323725507) index="0" unique_id=1494799076] +[node name="ResetButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1082971184, 1323725507) index="0" unique_id=1494799076] visible = false -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1082971184, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1082971184, 1323725507) index="1" unique_id=1248061364] text = "Show Me" [node name="Graph" parent="RunnableCodeExample" unique_id=1389122925 instance=ExtResource("2")] diff --git a/course/lesson-14-multiplying/visuals/LevelUpVisual.tscn b/course/lesson-14-multiplying/visuals/LevelUpVisual.tscn index baa3d950..eb3870f1 100644 --- a/course/lesson-14-multiplying/visuals/LevelUpVisual.tscn +++ b/course/lesson-14-multiplying/visuals/LevelUpVisual.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://btlx7xajivlyy"] +[gd_scene format=3 uid="uid://b37xydoocfeub"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="2"] @@ -21,10 +21,10 @@ offset_bottom = 14.0 [node name="RunnableCodeExample" parent="." unique_id=2047557930 instance=ExtResource("1")] layout_mode = 2 -[node name="ResetButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(2047557930, 1323725507) index="0" unique_id=1494799076] +[node name="ResetButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(2047557930, 1323725507) index="0" unique_id=1494799076] visible = false -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(2047557930, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(2047557930, 1323725507) index="1" unique_id=1248061364] text = "Level Up!" [node name="RobotLevel" parent="RunnableCodeExample" unique_id=373006991 instance=ExtResource("2")] diff --git a/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScale.tscn b/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScale.tscn index 0d749f2b..f940ed32 100644 --- a/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScale.tscn +++ b/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScale.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dbud3q0k811xv"] +[gd_scene format=3 uid="uid://bl7pngayxgua5"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="2"] @@ -30,10 +30,10 @@ gdscript_code = "func level_up(): scale.y += 0.2 # ..." -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1665310658, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1665310658, 1323725507) index="1" unique_id=1248061364] text = "level_up()" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(1665310658, 934997768) index="2" unique_id=175998401] visible = true text = "func level_up(): scale.x += 0.2 diff --git a/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScaleVector.tscn b/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScaleVector.tscn index ebf13e99..43d88601 100644 --- a/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScaleVector.tscn +++ b/course/lesson-16-2d-vectors/visuals/ExampleIncreaseCharacterScaleVector.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://be3ngw585seuo"] +[gd_scene format=3 uid="uid://cuurni085rn8k"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="2"] @@ -29,10 +29,10 @@ gdscript_code = "func level_up(): scale += Vector2(0.2, 0.2) # ..." -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(907369061, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(907369061, 1323725507) index="1" unique_id=1248061364] text = "level_up()" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(907369061, 934997768) index="2" unique_id=175998401] visible = true text = "func level_up(): scale += Vector2(0.2, 0.2) diff --git a/course/lesson-16-2d-vectors/visuals/ExampleMoveSpriteVector.tscn b/course/lesson-16-2d-vectors/visuals/ExampleMoveSpriteVector.tscn index c9908ade..0b53fbb5 100644 --- a/course/lesson-16-2d-vectors/visuals/ExampleMoveSpriteVector.tscn +++ b/course/lesson-16-2d-vectors/visuals/ExampleMoveSpriteVector.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://duemfqc0e5ok3"] +[gd_scene format=3 uid="uid://b4dbr10jl4dut"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="2"] @@ -35,10 +35,10 @@ layout_mode = 2 gdscript_code = "func move(): position += Vector2(20, 20)" -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1915915466, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1915915466, 1323725507) index="1" unique_id=1248061364] text = "move()" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(1915915466, 934997768) index="2" unique_id=175998401] visible = true text = "func move(): position += Vector2(20, 20)" diff --git a/course/lesson-16-2d-vectors/visuals/ExampleVectorVisual.tscn b/course/lesson-16-2d-vectors/visuals/ExampleVectorVisual.tscn index 28f8f6d9..7681c42b 100644 --- a/course/lesson-16-2d-vectors/visuals/ExampleVectorVisual.tscn +++ b/course/lesson-16-2d-vectors/visuals/ExampleVectorVisual.tscn @@ -1,7 +1,8 @@ -[gd_scene format=3 uid="uid://crqp83ye71ipp"] +[gd_scene format=3 uid="uid://bmwtut2j81ebi"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" path="res://course/lesson-16-2d-vectors/visuals/VectorVisual.tscn" id="2"] +[ext_resource type="StyleBox" path="res://ui/theme/styles/runnable_example_variables_panel.tres" id="3_kcli1"] [node name="PanelContainer" type="PanelContainer" unique_id=88571010] custom_minimum_size = Vector2(800, 400) @@ -15,25 +16,28 @@ layout_mode = 2 mouse_filter = 2 scene = ExtResource("2") -[node name="Frame" parent="RunnableCodeExample" index="0" unique_id=1694077977] +[node name="Frame" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(291087061, 934997768) index="0" unique_id=1694077977] mouse_filter = 2 -[node name="FramePanel" parent="RunnableCodeExample/Frame" index="0" unique_id=209141511] +[node name="FramePanel" parent="RunnableCodeExample/Content/Frame" index="0" unique_id=209141511] mouse_filter = 2 -[node name="Sliders" parent="RunnableCodeExample/Frame" index="1" unique_id=133529752] +[node name="Sliders" parent="RunnableCodeExample/Content/Frame" index="1" unique_id=133529752] mouse_filter = 2 -[node name="ButtonsContainer" parent="RunnableCodeExample/Frame" index="2" unique_id=1323725507] +[node name="ButtonsContainer" parent="RunnableCodeExample/Content/Frame" index="2" unique_id=1323725507] mouse_filter = 2 -[node name="ResetButton" parent="RunnableCodeExample/Frame/ButtonsContainer" index="0" unique_id=1494799076] +[node name="ResetButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" index="0" unique_id=1494799076] visible = false -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" index="1" unique_id=1248061364] visible = false -[node name="StepButton" parent="RunnableCodeExample/Frame/ButtonsContainer" index="2" unique_id=864588792] +[node name="StepButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" index="2" unique_id=864588792] visible = false +[node name="Results" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(291087061, 934997768) index="1" unique_id=54752701] +theme_override_styles/panel = ExtResource("3_kcli1") + [editable path="RunnableCodeExample"] diff --git a/course/lesson-17-while-loops/visuals/CodeWhileLoop.tscn b/course/lesson-17-while-loops/visuals/CodeWhileLoop.tscn index 99d1d47c..4085b95e 100644 --- a/course/lesson-17-while-loops/visuals/CodeWhileLoop.tscn +++ b/course/lesson-17-while-loops/visuals/CodeWhileLoop.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cfsgaccp27vdr"] +[gd_scene format=3 uid="uid://bunbrnbri8pc4"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_12tna"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_oc17x"] diff --git a/course/lesson-17-while-loops/visuals/CodeWhileLoopInfinite.tscn b/course/lesson-17-while-loops/visuals/CodeWhileLoopInfinite.tscn index 5c09a17e..23954a75 100644 --- a/course/lesson-17-while-loops/visuals/CodeWhileLoopInfinite.tscn +++ b/course/lesson-17-while-loops/visuals/CodeWhileLoopInfinite.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cf8p262v8nybk"] +[gd_scene format=3 uid="uid://djnk7mchewv13"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_2icuh"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_p1guj"] diff --git a/course/lesson-17-while-loops/visuals/CodeWhileRobot.tscn b/course/lesson-17-while-loops/visuals/CodeWhileRobot.tscn index 8165e8b2..ef3621a1 100644 --- a/course/lesson-17-while-loops/visuals/CodeWhileRobot.tscn +++ b/course/lesson-17-while-loops/visuals/CodeWhileRobot.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://r0a7lr2imkbl"] +[gd_scene format=3 uid="uid://bxrras4xmn0i5"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_skrus"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_xynta"] diff --git a/course/lesson-17-while-loops/visuals/PrintWhileLoop.tscn b/course/lesson-17-while-loops/visuals/PrintWhileLoop.tscn index 58ef788b..1a732ceb 100644 --- a/course/lesson-17-while-loops/visuals/PrintWhileLoop.tscn +++ b/course/lesson-17-while-loops/visuals/PrintWhileLoop.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://b36adlc3f7d3"] +[gd_scene format=3 uid="uid://nm1bvvx2bade"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var number = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -48,9 +48,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1681988191 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=177226639 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["number"] +monitored_variables = Array[String](["number"]) diff --git a/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobot.tscn b/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobot.tscn index dd19c477..cf6c7421 100644 --- a/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobot.tscn +++ b/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobot.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cn0vyiit8jt1c"] +[gd_scene format=3 uid="uid://j3mnyltssfvv"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://cenbu4icsubte" path="res://course/common/turtle/DrawingTurtle.tscn" id="2"] @@ -58,10 +58,10 @@ gdscript_code = "func draw_wall(): jump(110, 0) draw_square()" -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(610665407, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(610665407, 1323725507) index="1" unique_id=1248061364] text = "draw_wall()" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(610665407, 934997768) index="2" unique_id=175998401] visible = true text = "func draw_wall(): draw_square() diff --git a/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobotWhile.tscn b/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobotWhile.tscn index f933b891..c7e03217 100644 --- a/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobotWhile.tscn +++ b/course/lesson-17-while-loops/visuals/old/ExampleTurtleMeetRobotWhile.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cdhk813rfvelv"] +[gd_scene format=3 uid="uid://cbvh4hh5e0ct2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="2"] @@ -58,10 +58,10 @@ gdscript_code = "func draw_wall(): jump(110, 0) number += 1" -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(2104900853, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(2104900853, 1323725507) index="1" unique_id=1248061364] text = "draw_wall()" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(2104900853, 934997768) index="2" unique_id=175998401] visible = true text = "func draw_wall(): var number = 0 diff --git a/course/lesson-18-for-loops/visuals/CodeForLoop.tscn b/course/lesson-18-for-loops/visuals/CodeForLoop.tscn index 2d873e19..347d67bf 100644 --- a/course/lesson-18-for-loops/visuals/CodeForLoop.tscn +++ b/course/lesson-18-for-loops/visuals/CodeForLoop.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://ck8theu8oxxgh"] +[gd_scene format=3 uid="uid://dnuokt6j32ewo"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_0tisa"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_cftn7"] diff --git a/course/lesson-18-for-loops/visuals/CodeForMove.tscn b/course/lesson-18-for-loops/visuals/CodeForMove.tscn index 21b0cd1a..54eb1963 100644 --- a/course/lesson-18-for-loops/visuals/CodeForMove.tscn +++ b/course/lesson-18-for-loops/visuals/CodeForMove.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cllmoc1lmdhsw"] +[gd_scene format=3 uid="uid://bd687d1i2j73i"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_dy6fi"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_vblo5"] diff --git a/course/lesson-18-for-loops/visuals/CodeWhileLoop.tscn b/course/lesson-18-for-loops/visuals/CodeWhileLoop.tscn index 77e43fce..5e349d38 100644 --- a/course/lesson-18-for-loops/visuals/CodeWhileLoop.tscn +++ b/course/lesson-18-for-loops/visuals/CodeWhileLoop.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://x5hha4ly34g7"] +[gd_scene format=3 uid="uid://d28edswkugesa"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_vufqw"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_wuvnw"] diff --git a/course/lesson-18-for-loops/visuals/CodeWhileMove.tscn b/course/lesson-18-for-loops/visuals/CodeWhileMove.tscn index cfafa8ac..0f2a3b3f 100644 --- a/course/lesson-18-for-loops/visuals/CodeWhileMove.tscn +++ b/course/lesson-18-for-loops/visuals/CodeWhileMove.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bop3t28gf87g3"] +[gd_scene format=3 uid="uid://dinhln4ioeseg"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_84ccl"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_jfuyq"] diff --git a/course/lesson-18-for-loops/visuals/PrintForLoop.tscn b/course/lesson-18-for-loops/visuals/PrintForLoop.tscn index e6af80f5..3da21b0b 100644 --- a/course/lesson-18-for-loops/visuals/PrintForLoop.tscn +++ b/course/lesson-18-for-loops/visuals/PrintForLoop.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://kkgcm7b4pxvk"] +[gd_scene format=3 uid="uid://chwm4wrbaecjo"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var number = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -41,9 +41,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=2014059849 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=2021278077 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["number"] +monitored_variables = Array[String](["number"]) diff --git a/course/lesson-18-for-loops/visuals/PrintForLoopArray.tscn b/course/lesson-18-for-loops/visuals/PrintForLoopArray.tscn index b8c96cec..41eb6c54 100644 --- a/course/lesson-18-for-loops/visuals/PrintForLoopArray.tscn +++ b/course/lesson-18-for-loops/visuals/PrintForLoopArray.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://bbu2c2e77tvrd"] +[gd_scene format=3 uid="uid://byqsichhdld6a"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var element = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -45,9 +45,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=769599742 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=430846689 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["element"] +monitored_variables = Array[String](["element"]) diff --git a/course/lesson-18-for-loops/visuals/PrintForLoopArrayUnwrapped.tscn b/course/lesson-18-for-loops/visuals/PrintForLoopArrayUnwrapped.tscn index d7f30a43..7b1eb937 100644 --- a/course/lesson-18-for-loops/visuals/PrintForLoopArrayUnwrapped.tscn +++ b/course/lesson-18-for-loops/visuals/PrintForLoopArrayUnwrapped.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://cstal8qp76734"] +[gd_scene format=3 uid="uid://dl6plavqkwic7"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var array = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -76,9 +76,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=384880879 instance=ExtResource("1")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=371663289 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["array", "element"] +monitored_variables = Array[String](["array", "element"]) diff --git a/course/lesson-19-creating-arrays/visuals/CodeArrays.tscn b/course/lesson-19-creating-arrays/visuals/CodeArrays.tscn index 5b1b5c30..098cfc67 100644 --- a/course/lesson-19-creating-arrays/visuals/CodeArrays.tscn +++ b/course/lesson-19-creating-arrays/visuals/CodeArrays.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://m0habi81jg58"] +[gd_scene format=3 uid="uid://is6a8vxjlwd3"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_eu4x8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_gnhme"] diff --git a/course/lesson-19-creating-arrays/visuals/CodeArraysInVar.tscn b/course/lesson-19-creating-arrays/visuals/CodeArraysInVar.tscn index 07973cb5..14b8bde7 100644 --- a/course/lesson-19-creating-arrays/visuals/CodeArraysInVar.tscn +++ b/course/lesson-19-creating-arrays/visuals/CodeArraysInVar.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://duvrcvvhwjk3y"] +[gd_scene format=3 uid="uid://b5an6ww5fqu7d"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_e0fo4"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_us326"] diff --git a/course/lesson-19-creating-arrays/visuals/CodePathArray.tscn b/course/lesson-19-creating-arrays/visuals/CodePathArray.tscn index 1c6f17ca..6befe12f 100644 --- a/course/lesson-19-creating-arrays/visuals/CodePathArray.tscn +++ b/course/lesson-19-creating-arrays/visuals/CodePathArray.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://o6fvm3hvam0t"] +[gd_scene format=3 uid="uid://bom1pr2n53qrf"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_2xl5g"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_cmphm"] diff --git a/course/lesson-19-creating-arrays/visuals/ExampleForArray.tscn b/course/lesson-19-creating-arrays/visuals/ExampleForArray.tscn index 84d597f6..187575a2 100644 --- a/course/lesson-19-creating-arrays/visuals/ExampleForArray.tscn +++ b/course/lesson-19-creating-arrays/visuals/ExampleForArray.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://bb77vlryb788p"] +[gd_scene format=3 uid="uid://xl00dy2fiqx2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var number = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -43,9 +43,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1361935705 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1460196964 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["number"] +monitored_variables = Array[String](["number"]) diff --git a/course/lesson-19-creating-arrays/visuals/ExampleForArrayDifferentName.tscn b/course/lesson-19-creating-arrays/visuals/ExampleForArrayDifferentName.tscn index a03b87de..5a5a6fe8 100644 --- a/course/lesson-19-creating-arrays/visuals/ExampleForArrayDifferentName.tscn +++ b/course/lesson-19-creating-arrays/visuals/ExampleForArrayDifferentName.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://dvemjao14moy0"] +[gd_scene format=3 uid="uid://d0k1nlmb4m51t"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var element = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -42,9 +42,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=2026306363 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1957296423 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["element"] +monitored_variables = Array[String](["element"]) diff --git a/course/lesson-19-creating-arrays/visuals/ExampleForArrayUnwrapped.tscn b/course/lesson-19-creating-arrays/visuals/ExampleForArrayUnwrapped.tscn index 6e3ddf1a..682adc6d 100644 --- a/course/lesson-19-creating-arrays/visuals/ExampleForArrayUnwrapped.tscn +++ b/course/lesson-19-creating-arrays/visuals/ExampleForArrayUnwrapped.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://dh7wfvah0qd63"] +[gd_scene format=3 uid="uid://qdcv4qlxbo5n"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var element = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -77,9 +77,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1681978658 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=804792424 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["element", "array"] +monitored_variables = Array[String](["element", "array"]) diff --git a/course/lesson-19-creating-arrays/visuals/ExampleForRange.tscn b/course/lesson-19-creating-arrays/visuals/ExampleForRange.tscn index fddaa894..fc7d6055 100644 --- a/course/lesson-19-creating-arrays/visuals/ExampleForRange.tscn +++ b/course/lesson-19-creating-arrays/visuals/ExampleForRange.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://bqjoj7lf1xkov"] +[gd_scene format=3 uid="uid://ctym5h58e2p7y"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var number = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -42,9 +42,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=132773403 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1388873579 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["number"] +monitored_variables = Array[String](["number"]) diff --git a/course/lesson-19-creating-arrays/visuals/ExamplePrint.tscn b/course/lesson-19-creating-arrays/visuals/ExamplePrint.tscn index d0698394..acff41f9 100644 --- a/course/lesson-19-creating-arrays/visuals/ExamplePrint.tscn +++ b/course/lesson-19-creating-arrays/visuals/ExamplePrint.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://dhxnhmkrjv43t"] +[gd_scene format=3 uid="uid://fjrt8y0ia6bw"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var number = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -41,9 +41,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1146292598 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=781772720 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["number"] +monitored_variables = Array[String](["number"]) diff --git a/course/lesson-20-looping-over-arrays/visuals/CodeSelectUnits.tscn b/course/lesson-20-looping-over-arrays/visuals/CodeSelectUnits.tscn index 0d64a609..f7cc77f6 100644 --- a/course/lesson-20-looping-over-arrays/visuals/CodeSelectUnits.tscn +++ b/course/lesson-20-looping-over-arrays/visuals/CodeSelectUnits.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://clw2foar8fyp6"] +[gd_scene format=3 uid="uid://b6soh5kl8kgex"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_bdwjr"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_vqthv"] diff --git a/course/lesson-20-looping-over-arrays/visuals/CodeStoreArrayInVar.tscn b/course/lesson-20-looping-over-arrays/visuals/CodeStoreArrayInVar.tscn index c370a814..c127fba0 100644 --- a/course/lesson-20-looping-over-arrays/visuals/CodeStoreArrayInVar.tscn +++ b/course/lesson-20-looping-over-arrays/visuals/CodeStoreArrayInVar.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bh1p3d1xvybcv"] +[gd_scene format=3 uid="uid://cx4rw7p6rtxf6"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_jcm0r"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_me07d"] diff --git a/course/lesson-20-looping-over-arrays/visuals/CodeTurtleMove.tscn b/course/lesson-20-looping-over-arrays/visuals/CodeTurtleMove.tscn index be705492..0b0d1c02 100644 --- a/course/lesson-20-looping-over-arrays/visuals/CodeTurtleMove.tscn +++ b/course/lesson-20-looping-over-arrays/visuals/CodeTurtleMove.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://drq0yyy8fe7hr"] +[gd_scene format=3 uid="uid://cxjgc1wgf5jjj"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_m3oen"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_qcwmy"] diff --git a/course/lesson-20-looping-over-arrays/visuals/ExamplePrintArray.tscn b/course/lesson-20-looping-over-arrays/visuals/ExamplePrintArray.tscn index 1a76d0e9..5e4ee38a 100644 --- a/course/lesson-20-looping-over-arrays/visuals/ExamplePrintArray.tscn +++ b/course/lesson-20-looping-over-arrays/visuals/ExamplePrintArray.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://beyfdopdtkm77"] +[gd_scene format=3 uid="uid://djsfcrd2so13u"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var number = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -43,9 +43,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1465326814 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1301566218 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["number"] +monitored_variables = Array[String](["number"]) diff --git a/course/lesson-21-strings/visuals/CodeAssignString.tscn b/course/lesson-21-strings/visuals/CodeAssignString.tscn index d5247053..20f180e7 100644 --- a/course/lesson-21-strings/visuals/CodeAssignString.tscn +++ b/course/lesson-21-strings/visuals/CodeAssignString.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://f86hkfkdoafb"] +[gd_scene format=3 uid="uid://b14dxgas3qp2t"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_7d8dx"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_y4xqd"] diff --git a/course/lesson-21-strings/visuals/CodeComboArray.tscn b/course/lesson-21-strings/visuals/CodeComboArray.tscn index 7979ad33..0f584b3d 100644 --- a/course/lesson-21-strings/visuals/CodeComboArray.tscn +++ b/course/lesson-21-strings/visuals/CodeComboArray.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://5h6d561042vp"] +[gd_scene format=3 uid="uid://blbfd1foghtp4"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_nedrw"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_pnou3"] diff --git a/course/lesson-21-strings/visuals/PrintCharactersInName.tscn b/course/lesson-21-strings/visuals/PrintCharactersInName.tscn index 939feea6..a9a1da39 100644 --- a/course/lesson-21-strings/visuals/PrintCharactersInName.tscn +++ b/course/lesson-21-strings/visuals/PrintCharactersInName.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://caqlyi74ocb6d"] +[gd_scene format=3 uid="uid://5pypx416i57n"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var character = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -45,9 +45,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1161240495 instance=ExtResource("1")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=232934324 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["character"] +monitored_variables = Array[String](["character"]) diff --git a/course/lesson-21-strings/visuals/PrintString.tscn b/course/lesson-21-strings/visuals/PrintString.tscn index 17146573..0345633b 100644 --- a/course/lesson-21-strings/visuals/PrintString.tscn +++ b/course/lesson-21-strings/visuals/PrintString.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://buv1ux1lrn5ls"] +[gd_scene format=3 uid="uid://5bf0v5p11iml"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var my_name = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -42,9 +42,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=415965351 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1686519040 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["my_name"] +monitored_variables = Array[String](["my_name"]) diff --git a/course/lesson-22-functions-return-values/visuals/CodeCallingCellToWorld.tscn b/course/lesson-22-functions-return-values/visuals/CodeCallingCellToWorld.tscn index 40b47762..f3ec836b 100644 --- a/course/lesson-22-functions-return-values/visuals/CodeCallingCellToWorld.tscn +++ b/course/lesson-22-functions-return-values/visuals/CodeCallingCellToWorld.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://v2mmfwr1dd2"] +[gd_scene format=3 uid="uid://dhhufflaqtev5"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_ryob6"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_s8jda"] diff --git a/course/lesson-22-functions-return-values/visuals/CodeCellToWorld.tscn b/course/lesson-22-functions-return-values/visuals/CodeCellToWorld.tscn index 96dd5b7e..61790cf4 100644 --- a/course/lesson-22-functions-return-values/visuals/CodeCellToWorld.tscn +++ b/course/lesson-22-functions-return-values/visuals/CodeCellToWorld.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://7l42e5qnffhk"] +[gd_scene format=3 uid="uid://dn86cj5qvxohl"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_4muc2"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_uyvtv"] diff --git a/course/lesson-22-functions-return-values/visuals/CodeLerpTurtlePosition.tscn b/course/lesson-22-functions-return-values/visuals/CodeLerpTurtlePosition.tscn index 714d5248..490557f2 100644 --- a/course/lesson-22-functions-return-values/visuals/CodeLerpTurtlePosition.tscn +++ b/course/lesson-22-functions-return-values/visuals/CodeLerpTurtlePosition.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://c1vsgnu77aglp"] +[gd_scene format=3 uid="uid://dotd7svumudab"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_0tnu8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_do0yx"] diff --git a/course/lesson-22-functions-return-values/visuals/CodeRoundingHealth2.tscn b/course/lesson-22-functions-return-values/visuals/CodeRoundingHealth2.tscn index fb0e0dfd..c76f2b9c 100644 --- a/course/lesson-22-functions-return-values/visuals/CodeRoundingHealth2.tscn +++ b/course/lesson-22-functions-return-values/visuals/CodeRoundingHealth2.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://f0oyqh5o78pv"] +[gd_scene format=3 uid="uid://domuby2m7k5n2"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_nk5xs"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_tjtsb"] diff --git a/course/lesson-22-functions-return-values/visuals/ExamplePrintRound.tscn b/course/lesson-22-functions-return-values/visuals/ExamplePrintRound.tscn index de4b4aba..d1eb2707 100644 --- a/course/lesson-22-functions-return-values/visuals/ExamplePrintRound.tscn +++ b/course/lesson-22-functions-return-values/visuals/ExamplePrintRound.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://xhu3q6edticu"] +[gd_scene format=3 uid="uid://biqctub01dy6"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): diff --git a/course/lesson-22-functions-return-values/visuals/ExamplePrintWorldCoordinates.tscn b/course/lesson-22-functions-return-values/visuals/ExamplePrintWorldCoordinates.tscn index bb11e2d8..a01a12c9 100644 --- a/course/lesson-22-functions-return-values/visuals/ExamplePrintWorldCoordinates.tscn +++ b/course/lesson-22-functions-return-values/visuals/ExamplePrintWorldCoordinates.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://d4g3yekw07v12"] +[gd_scene format=3 uid="uid://c2xiedxv2x61e"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput var cell_size = Vector2(120, 120) diff --git a/course/lesson-23-append-to-arrays/clearing-meals/ClearingMeals.tscn b/course/lesson-23-append-to-arrays/clearing-meals/ClearingMeals.tscn index 28d6207a..ea52c60b 100644 --- a/course/lesson-23-append-to-arrays/clearing-meals/ClearingMeals.tscn +++ b/course/lesson-23-append-to-arrays/clearing-meals/ClearingMeals.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://xtjk5ymmg0dj"] +[gd_scene format=3 uid="uid://crgl8uuu8wusq"] [ext_resource type="Script" uid="uid://b0dg5xvakrm1o" path="res://course/lesson-23-append-to-arrays/clearing-meals/ClearingMeals.gd" id="1"] [ext_resource type="Script" uid="uid://dcpcup5nppub7" path="res://ui/components/UnscaledLabel.gd" id="2_nfs45"] diff --git a/course/lesson-23-append-to-arrays/clearing-meals/Meal.tscn b/course/lesson-23-append-to-arrays/clearing-meals/Meal.tscn index ffe6727f..70732445 100644 --- a/course/lesson-23-append-to-arrays/clearing-meals/Meal.tscn +++ b/course/lesson-23-append-to-arrays/clearing-meals/Meal.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://j5bydhu5424w"] +[gd_scene format=3 uid="uid://c0p4rheo1ogbp"] [ext_resource type="Script" uid="uid://b77jbrlt6u5ym" path="res://course/lesson-23-append-to-arrays/clearing-meals/Meal.gd" id="1_meal"] [ext_resource type="Texture2D" uid="uid://cqdddd2njewww" path="res://ui/assets/icons/checkbox_empty.png" id="2_jqyuq"] diff --git a/course/lesson-23-append-to-arrays/visuals/CodeAddOrder.tscn b/course/lesson-23-append-to-arrays/visuals/CodeAddOrder.tscn index 9a93b1b1..203e45db 100644 --- a/course/lesson-23-append-to-arrays/visuals/CodeAddOrder.tscn +++ b/course/lesson-23-append-to-arrays/visuals/CodeAddOrder.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://usnlx8awkp13"] +[gd_scene format=3 uid="uid://d3g00k7hh2pk8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_1huw4"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_e5kht"] diff --git a/course/lesson-23-append-to-arrays/visuals/CodeAppendMeal.tscn b/course/lesson-23-append-to-arrays/visuals/CodeAppendMeal.tscn index d297a7b1..d379076d 100644 --- a/course/lesson-23-append-to-arrays/visuals/CodeAppendMeal.tscn +++ b/course/lesson-23-append-to-arrays/visuals/CodeAppendMeal.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://57h5meo7eua1"] +[gd_scene format=3 uid="uid://br87271bb7gb4"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_lab83"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_ml5bg"] diff --git a/course/lesson-23-append-to-arrays/visuals/CodeAppendToComplete.tscn b/course/lesson-23-append-to-arrays/visuals/CodeAppendToComplete.tscn index c0cc708b..a20905cb 100644 --- a/course/lesson-23-append-to-arrays/visuals/CodeAppendToComplete.tscn +++ b/course/lesson-23-append-to-arrays/visuals/CodeAppendToComplete.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://pjko17ijybjr"] +[gd_scene format=3 uid="uid://cfohrwdthgrjx"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_jfoxd"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_terw8"] diff --git a/course/lesson-23-append-to-arrays/visuals/CodeOrderMeals.tscn b/course/lesson-23-append-to-arrays/visuals/CodeOrderMeals.tscn index 74468238..f14d4757 100644 --- a/course/lesson-23-append-to-arrays/visuals/CodeOrderMeals.tscn +++ b/course/lesson-23-append-to-arrays/visuals/CodeOrderMeals.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cmtugltqij4x6"] +[gd_scene format=3 uid="uid://drjysj6fn5qti"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_a0ni1"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_k3boc"] diff --git a/course/lesson-23-append-to-arrays/visuals/CodePopOrder.tscn b/course/lesson-23-append-to-arrays/visuals/CodePopOrder.tscn index 1c632974..f1226cf2 100644 --- a/course/lesson-23-append-to-arrays/visuals/CodePopOrder.tscn +++ b/course/lesson-23-append-to-arrays/visuals/CodePopOrder.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://pcles4h34fdl"] +[gd_scene format=3 uid="uid://b8gatyge0lx3x"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_fy6ro"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_qruup"] diff --git a/course/lesson-23-append-to-arrays/visuals/Crate.tscn b/course/lesson-23-append-to-arrays/visuals/Crate.tscn index c3e443f5..59503595 100644 --- a/course/lesson-23-append-to-arrays/visuals/Crate.tscn +++ b/course/lesson-23-append-to-arrays/visuals/Crate.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bwrce1b73mmw3"] +[gd_scene format=3 uid="uid://cx60eorfe1cp6"] [ext_resource type="Texture2D" uid="uid://dc8srtagvqfdv" path="res://course/common/inventory/gems.png" id="1"] [ext_resource type="Script" uid="uid://co2f1t00ka4iq" path="res://course/lesson-23-append-to-arrays/visuals/Crate.gd" id="2"] diff --git a/course/lesson-23-append-to-arrays/visuals/CrateStack.tscn b/course/lesson-23-append-to-arrays/visuals/CrateStack.tscn index 5a49842b..828fa2a3 100644 --- a/course/lesson-23-append-to-arrays/visuals/CrateStack.tscn +++ b/course/lesson-23-append-to-arrays/visuals/CrateStack.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://bps55s2pqvx7h"] -[ext_resource type="PackedScene" uid="uid://bwrce1b73mmw3" path="res://course/lesson-23-append-to-arrays/visuals/Crate.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://cx60eorfe1cp6" path="res://course/lesson-23-append-to-arrays/visuals/Crate.tscn" id="1"] [ext_resource type="Script" uid="uid://j0wrx7dnduo5" path="res://course/lesson-23-append-to-arrays/visuals/CrateStack.gd" id="6"] [node name="PoppingCrates" type="MarginContainer" unique_id=567087216] diff --git a/course/lesson-23-append-to-arrays/visuals/ExamplePrintArrayPop.tscn b/course/lesson-23-append-to-arrays/visuals/ExamplePrintArrayPop.tscn index cf57fb64..772f2f3d 100644 --- a/course/lesson-23-append-to-arrays/visuals/ExamplePrintArrayPop.tscn +++ b/course/lesson-23-append-to-arrays/visuals/ExamplePrintArrayPop.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://ew1tuboa5vy5"] +[gd_scene format=3 uid="uid://csuw5cqt35wyn"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var crates = [\"sword\", \"shield\", \"gems\"] @@ -47,4 +47,4 @@ script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=2099807362 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["crates"] +monitored_variables = Array[String](["crates"]) diff --git a/course/lesson-24-access-array-indices/visuals/CodeForLoop.tscn b/course/lesson-24-access-array-indices/visuals/CodeForLoop.tscn index 64591bd2..a435d635 100644 --- a/course/lesson-24-access-array-indices/visuals/CodeForLoop.tscn +++ b/course/lesson-24-access-array-indices/visuals/CodeForLoop.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://djlt4gi4om8ox"] +[gd_scene format=3 uid="uid://8hfkph6wxva8"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_mli28"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_yj6of"] diff --git a/course/lesson-24-access-array-indices/visuals/ExamplePrintSize.tscn b/course/lesson-24-access-array-indices/visuals/ExamplePrintSize.tscn index b460964c..5f522fe1 100644 --- a/course/lesson-24-access-array-indices/visuals/ExamplePrintSize.tscn +++ b/course/lesson-24-access-array-indices/visuals/ExamplePrintSize.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://bww54evoqf1dt"] +[gd_scene format=3 uid="uid://bdhyfg5v58mxx"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput var inventory = [\"healing heart\", \"gems\", \"sword\", \"shield\"] diff --git a/course/lesson-24-access-array-indices/visuals/inventory/Item.tscn b/course/lesson-24-access-array-indices/visuals/inventory/Item.tscn index b979ac04..70b8efa8 100644 --- a/course/lesson-24-access-array-indices/visuals/inventory/Item.tscn +++ b/course/lesson-24-access-array-indices/visuals/inventory/Item.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://d20ra44sest77"] +[gd_scene format=3 uid="uid://bo1kqouktoidg"] [ext_resource type="Texture2D" uid="uid://dc8srtagvqfdv" path="res://course/common/inventory/gems.png" id="1"] [ext_resource type="Script" uid="uid://co2f1t00ka4iq" path="res://course/lesson-23-append-to-arrays/visuals/Crate.gd" id="2"] diff --git a/course/lesson-25-creating-dictionaries/adding-items/AddingItems.tscn b/course/lesson-25-creating-dictionaries/adding-items/AddingItems.tscn index f052b683..b0f5c245 100644 --- a/course/lesson-25-creating-dictionaries/adding-items/AddingItems.tscn +++ b/course/lesson-25-creating-dictionaries/adding-items/AddingItems.tscn @@ -1,8 +1,8 @@ -[gd_scene format=3 uid="uid://bhspv6k27uadc"] +[gd_scene format=3 uid="uid://dkq2efj1uclou"] [ext_resource type="Script" uid="uid://6uktlccc62bh" path="res://course/lesson-25-creating-dictionaries/adding-items/AddingItems.gd" id="1"] -[ext_resource type="PackedScene" uid="uid://5565jgtxayff" path="res://course/common/inventory/DictInventory.tscn" id="2"] -[ext_resource type="PackedScene" uid="uid://ckbquvn7m4a6u" path="res://course/common/inventory/DictItem.tscn" id="3"] +[ext_resource type="PackedScene" uid="uid://do87gm8a66o5o" path="res://course/common/inventory/DictInventory.tscn" id="2"] +[ext_resource type="PackedScene" uid="uid://cbsp7q8fahfwj" path="res://course/common/inventory/DictItem.tscn" id="3"] [ext_resource type="Texture2D" uid="uid://dc8srtagvqfdv" path="res://course/common/inventory/gems.png" id="4"] [ext_resource type="Texture2D" uid="uid://53p3lhsufh82" path="res://course/common/inventory/healing_heart.png" id="5"] [ext_resource type="Texture2D" uid="uid://c6frj5ufe0uri" path="res://course/common/inventory/sword.png" id="6"] diff --git a/course/lesson-25-creating-dictionaries/creating-inventory/CreatingInventory.tscn b/course/lesson-25-creating-dictionaries/creating-inventory/CreatingInventory.tscn index 0b8bfab6..94060d69 100644 --- a/course/lesson-25-creating-dictionaries/creating-inventory/CreatingInventory.tscn +++ b/course/lesson-25-creating-dictionaries/creating-inventory/CreatingInventory.tscn @@ -1,8 +1,8 @@ [gd_scene format=3 uid="uid://ddqyq5pt8pkkp"] [ext_resource type="Script" uid="uid://cdo0tah2cn51x" path="res://course/lesson-25-creating-dictionaries/creating-inventory/CreatingInventory.gd" id="1"] -[ext_resource type="PackedScene" uid="uid://5565jgtxayff" path="res://course/common/inventory/DictInventory.tscn" id="2"] -[ext_resource type="PackedScene" uid="uid://ckbquvn7m4a6u" path="res://course/common/inventory/DictItem.tscn" id="3"] +[ext_resource type="PackedScene" uid="uid://do87gm8a66o5o" path="res://course/common/inventory/DictInventory.tscn" id="2"] +[ext_resource type="PackedScene" uid="uid://cbsp7q8fahfwj" path="res://course/common/inventory/DictItem.tscn" id="3"] [ext_resource type="Texture2D" uid="uid://dc8srtagvqfdv" path="res://course/common/inventory/gems.png" id="4"] [ext_resource type="Texture2D" uid="uid://53p3lhsufh82" path="res://course/common/inventory/healing_heart.png" id="5"] [ext_resource type="Texture2D" uid="uid://c6frj5ufe0uri" path="res://course/common/inventory/sword.png" id="6"] diff --git a/course/lesson-25-creating-dictionaries/visuals/CodeAddValue.tscn b/course/lesson-25-creating-dictionaries/visuals/CodeAddValue.tscn index b503b7de..d6bd5d8b 100644 --- a/course/lesson-25-creating-dictionaries/visuals/CodeAddValue.tscn +++ b/course/lesson-25-creating-dictionaries/visuals/CodeAddValue.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dmt1aoeaguwib"] +[gd_scene format=3 uid="uid://dr61vwdtl5ik8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_7v76f"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_pyqhd"] diff --git a/course/lesson-25-creating-dictionaries/visuals/CodeDictionary.tscn b/course/lesson-25-creating-dictionaries/visuals/CodeDictionary.tscn index 41ae8242..7a6c0994 100644 --- a/course/lesson-25-creating-dictionaries/visuals/CodeDictionary.tscn +++ b/course/lesson-25-creating-dictionaries/visuals/CodeDictionary.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cxf8jvim3kmaq"] +[gd_scene format=3 uid="uid://bw33c1lufrl0j"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_fiyie"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_uynjx"] diff --git a/course/lesson-25-creating-dictionaries/visuals/CodeInventory.tscn b/course/lesson-25-creating-dictionaries/visuals/CodeInventory.tscn index 6486f6db..3d7e860b 100644 --- a/course/lesson-25-creating-dictionaries/visuals/CodeInventory.tscn +++ b/course/lesson-25-creating-dictionaries/visuals/CodeInventory.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://b1aveaewbk75x"] +[gd_scene format=3 uid="uid://bgrxgjnpq2ige"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_du2a6"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_kdit1"] diff --git a/course/lesson-25-creating-dictionaries/visuals/CodeInventoryError.tscn b/course/lesson-25-creating-dictionaries/visuals/CodeInventoryError.tscn index 62e50fa2..b15df75c 100644 --- a/course/lesson-25-creating-dictionaries/visuals/CodeInventoryError.tscn +++ b/course/lesson-25-creating-dictionaries/visuals/CodeInventoryError.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dqgpsnvhwldjw"] +[gd_scene format=3 uid="uid://cjgvxhdabs31b"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_7urmb"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_m86id"] diff --git a/course/lesson-25-creating-dictionaries/visuals/ExampleAddValue.tscn b/course/lesson-25-creating-dictionaries/visuals/ExampleAddValue.tscn index fab59e00..ffa1eb1f 100644 --- a/course/lesson-25-creating-dictionaries/visuals/ExampleAddValue.tscn +++ b/course/lesson-25-creating-dictionaries/visuals/ExampleAddValue.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://dxqm84o1bmoho"] -[ext_resource type="PackedScene" uid="uid://5565jgtxayff" path="res://course/common/inventory/DictInventory.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://do87gm8a66o5o" path="res://course/common/inventory/DictInventory.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [sub_resource type="GDScript" id="1"] diff --git a/course/lesson-26-looping-over-dictionaries/CodeDisplayInventory.tscn b/course/lesson-26-looping-over-dictionaries/CodeDisplayInventory.tscn index 22287485..713d4b6c 100644 --- a/course/lesson-26-looping-over-dictionaries/CodeDisplayInventory.tscn +++ b/course/lesson-26-looping-over-dictionaries/CodeDisplayInventory.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://mb8dh21ef3v6"] +[gd_scene format=3 uid="uid://ibac8bbns2si"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_1fjcb"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_gwu14"] diff --git a/course/lesson-26-looping-over-dictionaries/CodeLoopOverDictionary.tscn b/course/lesson-26-looping-over-dictionaries/CodeLoopOverDictionary.tscn index 2408ecd7..8334fa84 100644 --- a/course/lesson-26-looping-over-dictionaries/CodeLoopOverDictionary.tscn +++ b/course/lesson-26-looping-over-dictionaries/CodeLoopOverDictionary.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bixjexvnvlm06"] +[gd_scene format=3 uid="uid://dcy0aqnyfmpet"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_46f1v"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_5686j"] diff --git a/course/lesson-26-looping-over-dictionaries/CodePrintKeyValues.tscn b/course/lesson-26-looping-over-dictionaries/CodePrintKeyValues.tscn index 29dc23fc..f024b94d 100644 --- a/course/lesson-26-looping-over-dictionaries/CodePrintKeyValues.tscn +++ b/course/lesson-26-looping-over-dictionaries/CodePrintKeyValues.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://c5qh577vrc1d2"] +[gd_scene format=3 uid="uid://cq6b7at6l8qvs"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_7dwtq"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_qwhno"] diff --git a/course/lesson-26-looping-over-dictionaries/CodeUnitsDict.tscn b/course/lesson-26-looping-over-dictionaries/CodeUnitsDict.tscn index e30e736d..f4a25aea 100644 --- a/course/lesson-26-looping-over-dictionaries/CodeUnitsDict.tscn +++ b/course/lesson-26-looping-over-dictionaries/CodeUnitsDict.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dts31fst5lnfc"] +[gd_scene format=3 uid="uid://c5pcx1mshaxub"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_cef1o"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_yed6i"] diff --git a/course/lesson-26-looping-over-dictionaries/CodeUnitsDictForLoop.tscn b/course/lesson-26-looping-over-dictionaries/CodeUnitsDictForLoop.tscn index abb1ac2d..ef56b58b 100644 --- a/course/lesson-26-looping-over-dictionaries/CodeUnitsDictForLoop.tscn +++ b/course/lesson-26-looping-over-dictionaries/CodeUnitsDictForLoop.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cjnu8adwa0e6w"] +[gd_scene format=3 uid="uid://ddt8am4hvxw1k"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_8bhqp"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_il4b1"] diff --git a/course/lesson-26-looping-over-dictionaries/ExampleDisplayInventory.tscn b/course/lesson-26-looping-over-dictionaries/ExampleDisplayInventory.tscn index 0e4de33e..8b7d44f2 100644 --- a/course/lesson-26-looping-over-dictionaries/ExampleDisplayInventory.tscn +++ b/course/lesson-26-looping-over-dictionaries/ExampleDisplayInventory.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://ke8g27uj02nm"] -[ext_resource type="PackedScene" uid="uid://5565jgtxayff" path="res://course/common/inventory/DictInventory.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://do87gm8a66o5o" path="res://course/common/inventory/DictInventory.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [sub_resource type="StyleBoxFlat" id="2"] diff --git a/course/lesson-26-looping-over-dictionaries/ExamplePrintKeyValues.tscn b/course/lesson-26-looping-over-dictionaries/ExamplePrintKeyValues.tscn index 9e7e2d7f..919cb29b 100644 --- a/course/lesson-26-looping-over-dictionaries/ExamplePrintKeyValues.tscn +++ b/course/lesson-26-looping-over-dictionaries/ExamplePrintKeyValues.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://bwtihelmbum2d"] +[gd_scene format=3 uid="uid://kh8pwu2d3700"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput var inventory = { \"healing heart\": 3, diff --git a/course/lesson-26-looping-over-dictionaries/ExamplePrintKeys.tscn b/course/lesson-26-looping-over-dictionaries/ExamplePrintKeys.tscn index b72eea7d..032f8c7b 100644 --- a/course/lesson-26-looping-over-dictionaries/ExamplePrintKeys.tscn +++ b/course/lesson-26-looping-over-dictionaries/ExamplePrintKeys.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://c41kic1ebs6ck"] +[gd_scene format=3 uid="uid://dtk0tjhdd8rxc"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput var inventory = { \"healing heart\": 3, diff --git a/course/lesson-26-looping-over-dictionaries/display-inventory/DisplayInventory.tscn b/course/lesson-26-looping-over-dictionaries/display-inventory/DisplayInventory.tscn index 1102d111..2b7818b5 100644 --- a/course/lesson-26-looping-over-dictionaries/display-inventory/DisplayInventory.tscn +++ b/course/lesson-26-looping-over-dictionaries/display-inventory/DisplayInventory.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://buyuwtymvedi7"] +[gd_scene format=3 uid="uid://dvk2depoy12xf"] [ext_resource type="Script" uid="uid://dcpcup5nppub7" path="res://ui/components/UnscaledLabel.gd" id="2_ma6lu"] [ext_resource type="Script" uid="uid://n5cmi0tlair1" path="res://course/lesson-26-looping-over-dictionaries/display-inventory/DisplayInventory.gd" id="3"] diff --git a/course/lesson-27-value-types/visuals/CodeAddIntToString.tscn b/course/lesson-27-value-types/visuals/CodeAddIntToString.tscn index 416c34a4..162bdf83 100644 --- a/course/lesson-27-value-types/visuals/CodeAddIntToString.tscn +++ b/course/lesson-27-value-types/visuals/CodeAddIntToString.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://gib8hp4w84oa"] +[gd_scene format=3 uid="uid://calr0o5dwnhgw"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_d8e1q"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_ji0n0"] diff --git a/course/lesson-27-value-types/visuals/CodeHealthVar.tscn b/course/lesson-27-value-types/visuals/CodeHealthVar.tscn index f3a740df..947d23a1 100644 --- a/course/lesson-27-value-types/visuals/CodeHealthVar.tscn +++ b/course/lesson-27-value-types/visuals/CodeHealthVar.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dtidn8wjrnkeg"] +[gd_scene format=3 uid="uid://be85dq2nndopu"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_6mjei"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_qyb6h"] diff --git a/course/lesson-27-value-types/visuals/ExampleHelloThere.tscn b/course/lesson-27-value-types/visuals/ExampleHelloThere.tscn index 4cc0a2b0..b811429d 100644 --- a/course/lesson-27-value-types/visuals/ExampleHelloThere.tscn +++ b/course/lesson-27-value-types/visuals/ExampleHelloThere.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://4uvsjxewtvqb"] +[gd_scene format=3 uid="uid://cim575mqflnmr"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): clear_messages() diff --git a/course/lesson-27-value-types/visuals/ExamplePrintFloatDivision.tscn b/course/lesson-27-value-types/visuals/ExamplePrintFloatDivision.tscn index 2afb260e..ccaab8a7 100644 --- a/course/lesson-27-value-types/visuals/ExamplePrintFloatDivision.tscn +++ b/course/lesson-27-value-types/visuals/ExamplePrintFloatDivision.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://c6ar3v2hi8ifw"] +[gd_scene format=3 uid="uid://r5e2uss822ks"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): clear_messages() diff --git a/course/lesson-27-value-types/visuals/ExamplePrintHealth.tscn b/course/lesson-27-value-types/visuals/ExamplePrintHealth.tscn index 05f8bf0c..b46445cd 100644 --- a/course/lesson-27-value-types/visuals/ExamplePrintHealth.tscn +++ b/course/lesson-27-value-types/visuals/ExamplePrintHealth.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://b5tlq6q5cpgvj"] +[gd_scene format=3 uid="uid://brch4efl5317w"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput var health = 100 diff --git a/course/lesson-27-value-types/visuals/ExamplePrintIntDivision.tscn b/course/lesson-27-value-types/visuals/ExamplePrintIntDivision.tscn index 25bfadf2..1955145c 100644 --- a/course/lesson-27-value-types/visuals/ExamplePrintIntDivision.tscn +++ b/course/lesson-27-value-types/visuals/ExamplePrintIntDivision.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://cl3xo60axw3qh"] +[gd_scene format=3 uid="uid://cf1hnh0f65so2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): clear_messages() diff --git a/course/lesson-27-value-types/visuals/ExamplePrintVectorMult.tscn b/course/lesson-27-value-types/visuals/ExamplePrintVectorMult.tscn index bfdfef7d..3d8f80ac 100644 --- a/course/lesson-27-value-types/visuals/ExamplePrintVectorMult.tscn +++ b/course/lesson-27-value-types/visuals/ExamplePrintVectorMult.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://dtiwa4654r51s"] +[gd_scene format=3 uid="uid://bnucmc2jo2y3p"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): clear_messages() diff --git a/course/lesson-28-specifying-types/CodeCellSize.tscn b/course/lesson-28-specifying-types/CodeCellSize.tscn index ce5f480f..a2c3382d 100644 --- a/course/lesson-28-specifying-types/CodeCellSize.tscn +++ b/course/lesson-28-specifying-types/CodeCellSize.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://gte471bk4puy"] +[gd_scene format=3 uid="uid://r5y2w41i8hj6"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_2188q"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_f4onh"] diff --git a/course/lesson-28-specifying-types/CodeCellSizeInferType.tscn b/course/lesson-28-specifying-types/CodeCellSizeInferType.tscn index 167f0440..f2aa5edd 100644 --- a/course/lesson-28-specifying-types/CodeCellSizeInferType.tscn +++ b/course/lesson-28-specifying-types/CodeCellSizeInferType.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cxtxo33cnhu7a"] +[gd_scene format=3 uid="uid://dy5dxngykc8m7"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_r6nwf"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_t1n0u"] diff --git a/course/lesson-28-specifying-types/CodeGridToWorld.tscn b/course/lesson-28-specifying-types/CodeGridToWorld.tscn index 4d1cb9a3..392da1b9 100644 --- a/course/lesson-28-specifying-types/CodeGridToWorld.tscn +++ b/course/lesson-28-specifying-types/CodeGridToWorld.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dnth4utd2uxih"] +[gd_scene format=3 uid="uid://h3ij2i8l5nfe"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_0785v"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_wthp3"] diff --git a/course/lesson-28-specifying-types/CodeGridToWorldFloatError.tscn b/course/lesson-28-specifying-types/CodeGridToWorldFloatError.tscn index de55ff41..faf0fc98 100644 --- a/course/lesson-28-specifying-types/CodeGridToWorldFloatError.tscn +++ b/course/lesson-28-specifying-types/CodeGridToWorldFloatError.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://ctkjd6gy3dts6"] +[gd_scene format=3 uid="uid://bg8stl2d7dylj"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_jtuu0"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_qgql6"] diff --git a/course/lesson-28-specifying-types/CodeTryReplaceCellSize.tscn b/course/lesson-28-specifying-types/CodeTryReplaceCellSize.tscn index 1a62558b..cbae46d0 100644 --- a/course/lesson-28-specifying-types/CodeTryReplaceCellSize.tscn +++ b/course/lesson-28-specifying-types/CodeTryReplaceCellSize.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bhy66lg8ff8nn"] +[gd_scene format=3 uid="uid://c01eq20k1kqw8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_bjcta"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="1_d2p82"] diff --git a/course/lesson-28-specifying-types/ExamplePrintHealth2.tscn b/course/lesson-28-specifying-types/ExamplePrintHealth2.tscn index 98cffbf9..5fbe044b 100644 --- a/course/lesson-28-specifying-types/ExamplePrintHealth2.tscn +++ b/course/lesson-28-specifying-types/ExamplePrintHealth2.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://c3bwc2g013cxt"] +[gd_scene format=3 uid="uid://qf0wxj3kbyf"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var health = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -56,4 +56,4 @@ script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1651393930 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["health"] +monitored_variables = Array[String](["health"]) diff --git a/course/lesson-5-your-first-function/ExampleFunctionBody.tscn b/course/lesson-5-your-first-function/ExampleFunctionBody.tscn index c34312af..cdfc249a 100644 --- a/course/lesson-5-your-first-function/ExampleFunctionBody.tscn +++ b/course/lesson-5-your-first-function/ExampleFunctionBody.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://ck1u74hjo873d"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="ExampleFunctionBody" type="PanelContainer" unique_id=1658180022] custom_minimum_size = Vector2(320, 200) diff --git a/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition1.tscn b/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition1.tscn index f9e9fda5..7e95b606 100644 --- a/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition1.tscn +++ b/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition1.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://ctgrea0mhvfok"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=1137440494] custom_minimum_size = Vector2(0, 120) diff --git a/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition2.tscn b/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition2.tscn index 503245ae..ae796321 100644 --- a/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition2.tscn +++ b/course/lesson-6-multiple-function-parameters/visuals/ExampleDrawSquareDefinition2.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://cofiop4n6pyjg"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=266067210] custom_minimum_size = Vector2(0, 120) diff --git a/course/lesson-6-multiple-function-parameters/visuals/ExampleFunctionWithTwoParameters.tscn b/course/lesson-6-multiple-function-parameters/visuals/ExampleFunctionWithTwoParameters.tscn index 98627346..3144dac4 100644 --- a/course/lesson-6-multiple-function-parameters/visuals/ExampleFunctionWithTwoParameters.tscn +++ b/course/lesson-6-multiple-function-parameters/visuals/ExampleFunctionWithTwoParameters.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://cg55k1im5i8ki"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=146388912] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-6-multiple-function-parameters/visuals/ExampleRotate.tscn b/course/lesson-6-multiple-function-parameters/visuals/ExampleRotate.tscn index e818e11c..63945d07 100644 --- a/course/lesson-6-multiple-function-parameters/visuals/ExampleRotate.tscn +++ b/course/lesson-6-multiple-function-parameters/visuals/ExampleRotate.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://ddpdrr5dj7ktd"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="Control" type="PanelContainer" unique_id=800129033] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-6-multiple-function-parameters/visuals/ExampleRotateFunction.tscn b/course/lesson-6-multiple-function-parameters/visuals/ExampleRotateFunction.tscn index a70aeb9b..3b776048 100644 --- a/course/lesson-6-multiple-function-parameters/visuals/ExampleRotateFunction.tscn +++ b/course/lesson-6-multiple-function-parameters/visuals/ExampleRotateFunction.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bw7d5cgr284gd"] +[gd_scene format=3 uid="uid://dxcnoj2rakr4t"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_ltotu"] [ext_resource type="StyleBox" path="res://ui/theme/styles/panel_normal.tres" id="2"] diff --git a/course/lesson-7-member-variables/ExampleHealthVariableDefinition.tscn b/course/lesson-7-member-variables/ExampleHealthVariableDefinition.tscn index ff78dd77..a6799ae5 100644 --- a/course/lesson-7-member-variables/ExampleHealthVariableDefinition.tscn +++ b/course/lesson-7-member-variables/ExampleHealthVariableDefinition.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://c3ii0n5dqpn8q"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="ExampleHealthVariableDefinition" type="PanelContainer" unique_id=1883794814] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-8-defining-variables/ExampleHealthAssign.tscn b/course/lesson-8-defining-variables/ExampleHealthAssign.tscn index d6c41c81..005494ea 100644 --- a/course/lesson-8-defining-variables/ExampleHealthAssign.tscn +++ b/course/lesson-8-defining-variables/ExampleHealthAssign.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://25rcualymgx6"] +[gd_scene format=3 uid="uid://boidxgbh8efx8"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_iota1"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-8-defining-variables/ExampleHealthCode.tscn b/course/lesson-8-defining-variables/ExampleHealthCode.tscn index 883ff59e..d2c42e94 100644 --- a/course/lesson-8-defining-variables/ExampleHealthCode.tscn +++ b/course/lesson-8-defining-variables/ExampleHealthCode.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://doruj6ibxsmyq"] +[gd_scene format=3 uid="uid://calf85u1qyxrs"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_8o62k"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-8-defining-variables/ExampleHealthReplaceWithString.tscn b/course/lesson-8-defining-variables/ExampleHealthReplaceWithString.tscn index 8314bc55..a338d2d6 100644 --- a/course/lesson-8-defining-variables/ExampleHealthReplaceWithString.tscn +++ b/course/lesson-8-defining-variables/ExampleHealthReplaceWithString.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://crcorko4k2mio"] +[gd_scene format=3 uid="uid://dn235fynkscaj"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_xpgwp"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-8-defining-variables/ExampleHealthVariableDefinitionError.tscn b/course/lesson-8-defining-variables/ExampleHealthVariableDefinitionError.tscn index 59fbdbf8..484610f8 100644 --- a/course/lesson-8-defining-variables/ExampleHealthVariableDefinitionError.tscn +++ b/course/lesson-8-defining-variables/ExampleHealthVariableDefinitionError.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://d21xlak2oxd2a"] -[ext_resource type="PackedScene" uid="uid://cbxo4pmcdfrbf" path="res://course/common/GDScriptCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://db1b2noi66ypn" path="res://course/common/GDScriptCodeExample.tscn" id="1"] [node name="ExampleHealthVariableDefinitionError" type="PanelContainer" unique_id=1635011489] custom_minimum_size = Vector2(0, 100) diff --git a/course/lesson-8-defining-variables/ExampleVarHealth.tscn b/course/lesson-8-defining-variables/ExampleVarHealth.tscn index 5334f4f5..ef699373 100644 --- a/course/lesson-8-defining-variables/ExampleVarHealth.tscn +++ b/course/lesson-8-defining-variables/ExampleVarHealth.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://c8mxtbheanlas"] +[gd_scene format=3 uid="uid://cdfig1hhfn242"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="1_2rr3b"] [ext_resource type="Script" uid="uid://ch5qpoqookmfv" path="res://course/common/GDScriptCodeExample.gd" id="2"] diff --git a/course/lesson-8-defining-variables/RunPrintMessage.tscn b/course/lesson-8-defining-variables/RunPrintMessage.tscn index 48e8009c..4d56d16d 100644 --- a/course/lesson-8-defining-variables/RunPrintMessage.tscn +++ b/course/lesson-8-defining-variables/RunPrintMessage.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://cr6osk01c2xsr"] +[gd_scene format=3 uid="uid://ccvflysvmu3lo"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): @@ -24,5 +24,4 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1091834733 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") diff --git a/course/lesson-8-defining-variables/RunPrintVarHealth.tscn b/course/lesson-8-defining-variables/RunPrintVarHealth.tscn index 73abd726..921cabf9 100644 --- a/course/lesson-8-defining-variables/RunPrintVarHealth.tscn +++ b/course/lesson-8-defining-variables/RunPrintVarHealth.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://bd2kiwj2gyw38"] +[gd_scene format=3 uid="uid://bmywt56ttmcfe"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var health = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -44,9 +44,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=214940111 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=1590221436 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["health"] +monitored_variables = Array[String](["health"]) diff --git a/course/lesson-8-defining-variables/RunPrintVarHealth2.tscn b/course/lesson-8-defining-variables/RunPrintVarHealth2.tscn index 18cdafbb..6b032796 100644 --- a/course/lesson-8-defining-variables/RunPrintVarHealth2.tscn +++ b/course/lesson-8-defining-variables/RunPrintVarHealth2.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://c5ojlubxfaffq"] +[gd_scene format=3 uid="uid://c6u6fde8lmir2"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput func run(): @@ -26,5 +26,4 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1339162155 instance=ExtResource("1")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") diff --git a/course/lesson-8-defining-variables/RunPrintVarString.tscn b/course/lesson-8-defining-variables/RunPrintVarString.tscn index d2b19d09..66018714 100644 --- a/course/lesson-8-defining-variables/RunPrintVarString.tscn +++ b/course/lesson-8-defining-variables/RunPrintVarString.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://c1ma5f67e6mpj"] +[gd_scene format=3 uid="uid://c4drhn4vjn5na"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="1"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="2"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var health = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -45,9 +45,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=349545345 instance=ExtResource("2")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=285588178 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["health"] +monitored_variables = Array[String](["health"]) diff --git a/course/lesson-8-defining-variables/RunSetVarHealth.tscn b/course/lesson-8-defining-variables/RunSetVarHealth.tscn index d26a898d..d4685e34 100644 --- a/course/lesson-8-defining-variables/RunSetVarHealth.tscn +++ b/course/lesson-8-defining-variables/RunSetVarHealth.tscn @@ -1,11 +1,11 @@ -[gd_scene format=3 uid="uid://bw8pagmjqxknk"] +[gd_scene format=3 uid="uid://c5r8fd3bml013"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutput.tscn" id="1"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExampleDebugger.tscn" id="3"] [sub_resource type="GDScript" id="1"] -script/source = "extends OutputConsole +script/source = "extends RunnableExampleOutput @onready var health = RunnableCodeExampleDebugger.UNINITIALIZED_VARIABLE_VALUE @@ -45,9 +45,8 @@ gdscript_code = "func run(): [node name="OutputConsole" parent="RunnableCodeExample" unique_id=1990000959 instance=ExtResource("1")] layout_mode = 2 -size_flags_horizontal = 3 script = SubResource("1") [node name="RunnableCodeExampleDebugger" parent="." unique_id=434264047 instance=ExtResource("3")] layout_mode = 2 -monitored_variables = ["health"] +monitored_variables = Array[String](["health"]) diff --git a/course/lesson-9-adding-and-subtracting/visuals/ExampleDamage.tscn b/course/lesson-9-adding-and-subtracting/visuals/ExampleDamage.tscn index 2554c336..d993c170 100644 --- a/course/lesson-9-adding-and-subtracting/visuals/ExampleDamage.tscn +++ b/course/lesson-9-adding-and-subtracting/visuals/ExampleDamage.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://rws2gldpotla"] +[gd_scene format=3 uid="uid://dd5l23k1e0bhl"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="3"] @@ -41,10 +41,10 @@ layout_mode = 2 gdscript_code = "func take_damage(amount): health -= amount" -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(367294789, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(367294789, 1323725507) index="1" unique_id=1248061364] text = "take_damage(25)" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(367294789, 934997768) index="2" unique_id=175998401] visible = true text = "func take_damage(amount): health -= amount" diff --git a/course/lesson-9-adding-and-subtracting/visuals/ExampleHeal.tscn b/course/lesson-9-adding-and-subtracting/visuals/ExampleHeal.tscn index 7f4ae6ad..a3d7fd87 100644 --- a/course/lesson-9-adding-and-subtracting/visuals/ExampleHeal.tscn +++ b/course/lesson-9-adding-and-subtracting/visuals/ExampleHeal.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://c5bn2txow0ibo"] +[gd_scene format=3 uid="uid://cb077a83yafhs"] [ext_resource type="PackedScene" path="res://ui/components/RunnableCodeExample.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://dnivj2puspmd7" path="res://course/common/Robot.tscn" id="3"] @@ -41,10 +41,10 @@ layout_mode = 2 gdscript_code = "func heal(amount): health += amount" -[node name="RunButton" parent="RunnableCodeExample/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1139832377, 1323725507) index="1" unique_id=1248061364] +[node name="RunButton" parent="RunnableCodeExample/Content/Frame/ButtonsContainer" parent_id_path=PackedInt32Array(1139832377, 1323725507) index="1" unique_id=1248061364] text = "heal(25)" -[node name="GDScriptCode" parent="RunnableCodeExample" index="1" unique_id=175998401] +[node name="GDScriptCode" parent="RunnableCodeExample/Content" parent_id_path=PackedInt32Array(1139832377, 934997768) index="2" unique_id=175998401] visible = true text = "func heal(amount): health += amount" diff --git a/project.godot b/project.godot index 92c14db0..250c5aad 100644 --- a/project.godot +++ b/project.godot @@ -56,7 +56,7 @@ enabled=PackedStringArray("res://addons/color_picker_presets/plugin.cfg", "res:/ [gui] -theme/custom="uid://bty2e3jp6i1sj" +theme/custom="uid://d1lnwn2k8utlb" [input] diff --git a/tests/validate_translated_lessons.tscn b/tests/validate_translated_lessons.tscn index ba94d6fc..4b5f3abb 100644 --- a/tests/validate_translated_lessons.tscn +++ b/tests/validate_translated_lessons.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dcppvb1na0mdc"] +[gd_scene format=3 uid="uid://bcqdph7lb5c2y"] [ext_resource type="Script" uid="uid://c6uot0yi82nn2" path="res://tests/validate_translated_lessons.gd" id="1"] diff --git a/ui/UIPractice.gd b/ui/UIPractice.gd index 690d95f9..447e8ecc 100644 --- a/ui/UIPractice.gd +++ b/ui/UIPractice.gd @@ -61,7 +61,7 @@ var _scene_tween: Tween @onready var _layout_container: HBoxContainer = %LayoutContainer @onready var _game_container: Container = %GameContainer @onready var _game_view: GameView = %GameView -@onready var _output_console: OutputConsole = %Console +@onready var _output_console: UIPracticeOutputConsole = %Console @onready var _output_anchors: Control = %OutputAnchors @onready var _solution_panel: Control = %SolutionContainer @onready var _use_solution_button: Button = %UseSolutionButton diff --git a/ui/UIPractice.tscn b/ui/UIPractice.tscn index 6e5b63ed..84b9d15e 100644 --- a/ui/UIPractice.tscn +++ b/ui/UIPractice.tscn @@ -1,10 +1,10 @@ -[gd_scene format=3 uid="uid://d1wli2hhmbpa5"] +[gd_scene format=3 uid="uid://c53mvmvt56f1u"] [ext_resource type="PackedScene" path="res://ui/components/CodeEditor.tscn" id="1"] [ext_resource type="StyleBox" path="res://ui/theme/styles/panel_course_page.tres" id="2"] [ext_resource type="PackedScene" path="res://ui/screens/practice/PracticeInfoPanel.tscn" id="3"] [ext_resource type="PackedScene" path="res://ui/components/GameView.tscn" id="4"] -[ext_resource type="PackedScene" path="res://ui/components/OutputConsole.tscn" id="5"] +[ext_resource type="PackedScene" path="res://ui/components/UIPracticeOutputConsole.tscn" id="5"] [ext_resource type="PackedScene" path="res://ui/components/popups/PracticeListPopup.tscn" id="6"] [ext_resource type="StyleBox" path="res://ui/theme/styles/gdquestboy_frame.tres" id="7"] [ext_resource type="Script" uid="uid://krmqdqhmup2m" path="res://ui/UIPractice.gd" id="8"] diff --git a/ui/components/DebuggerConsoleMonitoredVariable.gd b/ui/components/DebuggerConsoleMonitoredVariable.gd index b47638da..38b35715 100644 --- a/ui/components/DebuggerConsoleMonitoredVariable.gd +++ b/ui/components/DebuggerConsoleMonitoredVariable.gd @@ -1,21 +1,41 @@ -extends PanelContainer +extends Control -@onready var _label: Label = %Label -var values := []: - set = set_values +var variable_name := "" +var _highlight_tween: Tween -func set_values(new_values: Array) -> void: - values = new_values - if not is_inside_tree(): - await self.ready +@onready var _name_label: Label = %Name +@onready var _value_label: Label = %Value - var message = " ".join(PackedStringArray(new_values)) - if _label.text == message: - return +func _ready() -> void: + _name_label.text = variable_name - _label.text = message - var tween = create_tween() - tween.tween_property(self, "self_modulate:a", 0.25, 1.5).from(1.0) +func get_name_width() -> float: + return _name_label.get_combined_minimum_size().x + + +func set_name_width(width: float) -> void: + _name_label.custom_minimum_size.x = width + + +func set_value(value: String, highlight_change := false) -> void: + var has_changed := _value_label.text != value + _value_label.text = value + + if not highlight_change: + clear_highlight() + elif has_changed: + clear_highlight() + _value_label.add_theme_color_override("font_color", Color(1, 0.96, 0.25)) + _highlight_tween = create_tween() + _highlight_tween.tween_interval(0.8) + _highlight_tween.tween_callback(clear_highlight) + + +func clear_highlight() -> void: + if _highlight_tween != null: + _highlight_tween.kill() + _highlight_tween = null + _value_label.remove_theme_color_override("font_color") diff --git a/ui/components/DebuggerConsoleMonitoredVariable.tscn b/ui/components/DebuggerConsoleMonitoredVariable.tscn index 76e2df49..e444917e 100644 --- a/ui/components/DebuggerConsoleMonitoredVariable.tscn +++ b/ui/components/DebuggerConsoleMonitoredVariable.tscn @@ -1,17 +1,31 @@ -[gd_scene format=3 uid="uid://qt6g4yiimopm"] +[gd_scene format=3 uid="uid://dcya1c3pvqb3t"] [ext_resource type="Script" uid="uid://b4npto03hit85" path="res://ui/components/DebuggerConsoleMonitoredVariable.gd" id="2"] -[ext_resource type="StyleBox" path="res://ui/theme/styles/panel_error_log.tres" id="3"] +[ext_resource type="FontVariation" path="res://ui/theme/fonts/font_code.tres" id="3"] +[ext_resource type="FontVariation" path="res://ui/theme/fonts/font_text.tres" id="4"] -[node name="DebuggerConsoleMonitoredVariable" type="PanelContainer" unique_id=2006603270] +[node name="DebuggerConsoleMonitoredVariable" type="HBoxContainer" unique_id=2006603270] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -theme_override_styles/panel = ExtResource("3") +theme_override_constants/separation = 16 script = ExtResource("2") -[node name="Label" type="Label" parent="." unique_id=713413045] +[node name="Name" type="Label" parent="." unique_id=2075433696] unique_name_in_owner = true +custom_minimum_size = Vector2(100, 0) layout_mode = 2 +theme_override_colors/font_color = Color(0.572549, 0.560784, 0.721569, 1) +theme_override_fonts/font = ExtResource("3") +theme_override_font_sizes/font_size = 18 +text = "Variable" + +[node name="Value" type="Label" parent="." unique_id=713413045] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 size_flags_vertical = 0 +theme_override_fonts/font = ExtResource("4") +theme_override_font_sizes/font_size = 20 text = "Value" +autowrap_mode = 3 diff --git a/ui/components/OutputConsole.gd b/ui/components/OutputConsole.gd index 0ebfc1b7..1644dcb1 100644 --- a/ui/components/OutputConsole.gd +++ b/ui/components/OutputConsole.gd @@ -1,140 +1,47 @@ -# This console displays messages. It adds new lines automatically +## This is the base class for the different output consoles that print messages +## to the user, both in the practice and in the lessons. +## +## This script itself does not do much. See the classes that extend it. class_name OutputConsole -extends PanelContainer +extends Control -signal reference_clicked(file_name, line_nb, character) -signal line_highlight_requested(line_number) -signal animate_arrow_requested(chars1, chars2) +signal messages_changed -const OutputConsoleErrorMessage := preload("./OutputConsoleErrorMessage.gd") -const OutputConsoleErrorMessageScene := preload("./OutputConsoleErrorMessage.tscn") -const OutputConsolePrintMessage := preload("./OutputConsolePrintMessage.gd") -const OutputConsolePrintMessageScene := preload("./OutputConsolePrintMessage.tscn") - -var _slice_properties: ScriptSlice = null +@export var print_message_scene: PackedScene @onready var _scroll_container: ScrollContainer = %ScrollContainer -@onready var _message_list: Control = %MessageList -@onready var _error_popup: Control = %ErrorPopup -@onready var _error_overlay_popup: ErrorOverlayPopup = %ErrorOverlayPopup -@onready var _external_error_popup: Control = %ExternalErrorPopup - - -func _ready() -> void: - _external_error_popup.set_as_top_level(true) - _error_popup.set_as_top_level(true) - _error_overlay_popup.hidden.connect(_error_popup.hide) - resized.connect(_on_resized) - - MessageBus.print_requested.connect(print_bus_message) - - -func setup(slice: ScriptSlice) -> void: - _slice_properties = slice - - -# Adds a message related to a specific line in a specific file -func print_bus_message( - type: int, - text: String, - file_name: String, - line: int, - character: int, - code: int, -) -> void: - if not is_inside_tree(): - return - - if type in [ - MessageBus.MESSAGE_TYPE.ASSERT, - MessageBus.MESSAGE_TYPE.ERROR, - MessageBus.MESSAGE_TYPE.WARNING, - ]: - print_error(type, text, file_name, line, character, code) - return +@onready var _message_list: VBoxContainer = %MessageList - print_output([text]) - -# Removes all children func clear_messages() -> void: if not is_inside_tree(): return - for message_node in _message_list.get_children(): - if message_node is OutputConsoleErrorMessage: - var console_message_node := message_node as OutputConsoleErrorMessage - console_message_node.external_explain_requested.disconnect(_on_external_requested) - console_message_node.show_code_requested.disconnect(_on_code_requested) - console_message_node.explain_error_requested.disconnect(_on_explain_requested) - - _message_list.remove_child(message_node) - message_node.queue_free() + for message in _message_list.get_children(): + _message_list.remove_child(message) + message.queue_free() + messages_changed.emit() -# Prints plain text output. Use this when you want to display the output of a -# print statement. func print_output(values: Array) -> void: if not is_inside_tree(): return - var message_node: OutputConsolePrintMessage = OutputConsolePrintMessageScene.instantiate() - message_node.values = values - _message_list.add_child(message_node) - - await get_tree().process_frame - _scroll_container.ensure_control_visible(message_node) + var message := print_message_scene.instantiate() as Control + message.get_node("Label").text = " ".join(PackedStringArray(values)) + _add_message(message) -func print_error(type: int, text: String, file_name: String, line: int, character: int, code: int) -> void: - if not is_inside_tree(): - return - - # We need to adjust the reported range to show the lines as the student sees them - # in the slice editor. - var show_lines_from := _slice_properties.get_start_offset() - var show_lines_to := _slice_properties.get_end_offset() - var character_offset := _slice_properties.leading_spaces - - var message_node := OutputConsoleErrorMessageScene.instantiate() as OutputConsoleErrorMessage - message_node.message_severity = type - message_node.message_text = text - message_node.message_code = code - - if line >= show_lines_from and line <= show_lines_to: - message_node.origin_file = file_name - message_node.origin_line = line - show_lines_from - message_node.origin_char = character - character_offset - else: - message_node.external_error = true - - _message_list.add_child(message_node) - message_node.external_explain_requested.connect(_on_external_requested) - message_node.show_code_requested.connect(_on_code_requested) - message_node.explain_error_requested.connect(_on_explain_requested) - +func _add_message(message: Control) -> void: + _message_list.add_child(message) + messages_changed.emit() + # TODO: Verify if we need to keep this. await get_tree().process_frame - _scroll_container.ensure_control_visible(message_node) - - -func _on_external_requested() -> void: - _external_error_popup.show() - - -func _on_code_requested(file_name: String, line: int, character: int) -> void: - reference_clicked.emit(file_name, line, character) - - -func _on_explain_requested(error_code: int, error_message: String) -> void: - _error_overlay_popup.error_code = error_code - _error_overlay_popup.error_message = error_message - _error_overlay_popup.show() - _error_popup.show() - - -func _on_resized() -> void: - _error_popup.set_offsets_preset(Control.PRESET_FULL_RECT) + if is_instance_valid(message) and message.get_parent() == _message_list: + _scroll_container.ensure_control_visible(message) -func reset(): +# TODO: unnecessary indirection? Check and if so, remove this in favor of +# calling clear messages directly. +func reset() -> void: clear_messages() diff --git a/ui/components/OutputConsolePrintMessage.gd b/ui/components/OutputConsolePrintMessage.gd index d98108b5..f3eb0b2e 100644 --- a/ui/components/OutputConsolePrintMessage.gd +++ b/ui/components/OutputConsolePrintMessage.gd @@ -1,19 +1,6 @@ extends PanelContainer -var values := []: - set = set_values - -@onready var _label: Label = %Label - func _ready() -> void: - var tween := create_tween() - tween.tween_property(self, "self_modulate:a", 0.25, 1.5).from(1.0) - - -func set_values(new_values: Array) -> void: - values = new_values - if not is_inside_tree(): - await self.ready - - _label.text = " ".join(PackedStringArray(new_values)) + var fade := create_tween() + fade.tween_property(self, "self_modulate:a", 0.25, 1.5).from(1.0) diff --git a/ui/components/RunnableCodeExample.gd b/ui/components/RunnableCodeExample.gd index 58efe3bd..16bf0838 100644 --- a/ui/components/RunnableCodeExample.gd +++ b/ui/components/RunnableCodeExample.gd @@ -1,18 +1,23 @@ @tool -# Displays a scene with a GDScript code example. If the scene's root has a -# `run()` function, pressing the run button will call the function. class_name RunnableCodeExample -extends HBoxContainer +extends Control +## Displays a scene with a GDScript code example. If the scene's root has a +## `run()` function, pressing the run button will call the function. signal scene_instance_set signal code_updated const ConsoleArrowAnimationScene := preload("res://ui/components/ConsoleArrowAnimation.tscn") -const CodeExampleVariableUnderlineScene := preload("res://ui/components/CodeExampleVariableUnderline.tscn") +const CodeExampleVariableUnderlineScene := preload( + "res://ui/components/CodeExampleVariableUnderline.tscn" +) const ERROR_NO_RUN_FUNCTION := "Scene %s doesn't have a run() function. The Run button won't work." const ERROR_MULTIPLE_RUN_FUNCTION := "Scene %s has both run() and run_coroutine() functions. It must only have one. The Run button won't work." -const HSLIDER_GRABBER_HIGHLIGHT: StyleBoxFlat = preload("res://ui/theme/styles/hslider_grabber_highlight.tres") +const HSLIDER_GRABBER_HIGHLIGHT: StyleBoxFlat = preload( + "res://ui/theme/styles/hslider_grabber_highlight.tres" +) +const VARIABLES_PANEL := preload("res://ui/theme/styles/runnable_example_variables_panel.tres") @onready var _gdscript_text_edit: CodeEdit = %GDScriptCode @onready var _run_button: Button = %RunButton @@ -21,6 +26,18 @@ const HSLIDER_GRABBER_HIGHLIGHT: StyleBoxFlat = preload("res://ui/theme/styles/h @onready var _frame_container: Control = %FramePanel @onready var _sliders: VBoxContainer = %Sliders @onready var _buttons_container: HBoxContainer = %ButtonsContainer +@onready var _content: VBoxContainer = %Content +@onready var _frame: Control = %Frame +@onready var _results: PanelContainer = %Results +@onready var _results_layout: VBoxContainer = %ResultsLayout +@onready var _results_body: VBoxContainer = %ResultsBody +@onready var _output_panel: StyleBox = _results.get_theme_stylebox("panel") +@onready var _demo_button_offsets: Array[float] = [ + _buttons_container.offset_left, + _buttons_container.offset_top, + _buttons_container.offset_right, + _buttons_container.offset_bottom, +] ## The scene to display and run in the example frame. @export var scene: PackedScene: @@ -47,46 +64,61 @@ const HSLIDER_GRABBER_HIGHLIGHT: StyleBoxFlat = preload("res://ui/theme/styles/h var _scene_instance: CanvasItem: set = _set_scene_instance -var _base_text_font_size := preload("res://ui/theme/fonts/font_text.tres").base_font.msdf_size var _current_coroutine: CoroutineController = null @onready var _debugger: RunnableCodeExampleDebugger @onready var _console_arrow_animation: ConsoleArrowAnimation @onready var _monitored_variable_highlights := [] -@onready var _start_code_example_height := _gdscript_text_edit.size.y - func _ready() -> void: if not Engine.is_editor_hint(): Events.font_size_scale_changed.connect(_on_Events_font_size_scale_changed) - _update_gdscript_text_edit_width(UserProfiles.get_profile().font_size_scale) - _run_button.pressed.connect(run) _step_button.pressed.connect(step) _reset_button.pressed.connect(reset) _frame_container.resized.connect(_center_scene_instance) + _gdscript_text_edit.item_rect_changed.connect(_on_ScrollBar_scrolled) CodeEditorEnhancer.enhance(_gdscript_text_edit) CodeEditorEnhancer.prevent_editable(_gdscript_text_edit) - if not (_gdscript_text_edit.syntax_highlighter as CodeHighlighter).has_color_region("[="): - (_gdscript_text_edit.syntax_highlighter as CodeHighlighter).add_color_region("[=", "]", CodeEditorEnhancer.COLOR_COMMENTS) _gdscript_text_edit.visible = not gdscript_code.is_empty() + # Adding the optional debugger + # TODO: Refactor the runnable code example to Have a setting for the + # debugger and not need this kind of manipulation. favor grouping settings + # and using a single approach consistently in the inspector instead. If I + # recall correctly, we did stuff like that because we wanted control over + # the properties of instantiated components. + var candidates := get_parent().find_children("", "RunnableCodeExampleDebugger") + if not candidates.is_empty(): + _debugger = candidates[0] + _debugger.setup(self) + # If there's no scene but there's an instance as a child of # RunnableCodeExample, we use this as the scene instance. # # This simplifies the process of creating code examples. - if not Engine.is_editor_hint() and not scene and get_child_count() > 1: - var last_child := get_child(get_child_count() - 1) - assert(last_child != _gdscript_text_edit and last_child != _frame_container) - remove_child(last_child) - _set_scene_instance(last_child as CanvasItem) - - # Godot doesn't allow changing Control nodes z-index in the inspector, - # so a workaround with the VisualServer is needed + # TODO: Get rid of this option if possible? The reason we do this is + # probably that we want to customize the properties of some scene instances + # to reuse them across multiple runnable examples. If so, we should use an + # exported node reference consistently + configuration warnings. + if not Engine.is_editor_hint() and not scene: + for child in get_children(): + if child != _content and child != _debugger and child is CanvasItem: + remove_child(child) + _set_scene_instance(child as CanvasItem) + break + + # TODO: This is not true anymore I think. Remove the workaround if possible. + # Also, setting the Z index to 10 is probably what caused some issues in the + # past that I patched, but that needed adding canvas layers for rendering + # overlays. + # + # Original comment: Godot doesn't allow changing Control nodes z-index in + # the inspector, so a workaround with the VisualServer is needed var canvas_item := _buttons_container.get_canvas_item() RenderingServer.canvas_item_set_z_index(canvas_item, 10) @@ -146,6 +178,8 @@ func run() -> void: _current_coroutine.step_requested.emit() _gdscript_text_edit.highlight_current_line = false + if _debugger != null: + _debugger.set_stepping_active(false) code_updated.emit() _clear_animated_arrows() @@ -181,6 +215,8 @@ func step() -> void: _current_coroutine.step_requested.emit() if not _current_coroutine: _gdscript_text_edit.highlight_current_line = false + if _debugger != null: + _debugger.set_stepping_active(_current_coroutine != null) code_updated.emit() @@ -195,6 +231,8 @@ func reset() -> void: if _scene_instance.has_method("reset"): _scene_instance.call("reset") _center_scene_instance() + if _debugger != null: + _debugger.set_stepping_active(false) code_updated.emit() @@ -203,6 +241,7 @@ func set_code(new_gdscript_code: String) -> void: if not _gdscript_text_edit: await self.ready _gdscript_text_edit.text = new_gdscript_code + _gdscript_text_edit.visible = not new_gdscript_code.is_empty() func set_scene(new_scene: PackedScene) -> void: @@ -237,11 +276,11 @@ func set_run_button_label(new_text: String) -> void: func create_slider_for( - property_name: StringName, - min_value := 0.0, - max_value := 100.0, - slider_step := 1.0, - color := Color.BLACK, + property_name: StringName, + min_value := 0.0, + max_value := 100.0, + slider_step := 1.0, + color := Color.BLACK, ) -> HSlider: if not _scene_instance: await self.scene_instance_set @@ -307,13 +346,14 @@ func _set_scene_instance(new_scene_instance: CanvasItem) -> void: _scene_instance = new_scene_instance scene_instance_set.emit() - _scene_instance.show_behind_parent = true + _scene_instance.show_behind_parent = false _frame_container.add_child(_scene_instance) _center_scene_instance() # Skip a frame to allow all nodes to be ready. # Avoids overwriting text via yield(node, "ready"). await get_tree().process_frame + _update_layout() if not Engine.is_editor_hint() and _scene_instance.has_method("get_code"): @warning_ignore("unsafe_method_access") @@ -331,18 +371,53 @@ func _set_scene_instance(new_scene_instance: CanvasItem) -> void: if not _run_button.visible: printerr(ERROR_NO_RUN_FUNCTION % [_scene_instance.scene_file_path]) - # Setting up our fake debugger when it's there to allow executing the code line-by-line - _debugger = null - for node in get_parent().get_children(): - if node is RunnableCodeExampleDebugger: - _debugger = node - _debugger.setup(self, _scene_instance) - if _scene_instance.has_signal("code_updated"): - _scene_instance.connect("code_updated", code_updated.emit) + # Setting up our fake debugger when it's there to allow executing the code + # line-by-line + if _debugger != null: + _debugger.bind_scene_to_debug(_scene_instance) + if _scene_instance.has_signal("code_updated"): + _scene_instance.connect("code_updated", code_updated.emit) _reset_monitored_variable_highlights() +func _update_layout() -> void: + var scene_instance_has_output := _scene_instance is RunnableExampleOutput + _frame.visible = not scene_instance_has_output + _results.visible = scene_instance_has_output or _debugger != null + _results.add_theme_stylebox_override( + "panel", + _output_panel if scene_instance_has_output else VARIABLES_PANEL, + ) + + # TODO: A bit hacky perhaps, notably on the layout part, I'm doing this with + # backward compat for visualizing the new layout and verifying the UX works, + # but if we can I'd like to figure out a more centralized way to lay things + # down + centralize styling ops for all runnable example components and see + # if we can't get rid of the reparenting (I don't think we can fully if we + # want to keep the option of reusing arbitrary scenes and customizing their + # props). + # + # Maybe the output part, instead of being sometimes slotted as a scene + # instance, could just be a property of the node. But gotta verify why + # things were the way they were. + if scene_instance_has_output: + var console: RunnableExampleOutput = _scene_instance + console.reparent(_results_body, false) + _buttons_container.reparent(_results_layout, false) + elif _buttons_container.get_parent() != _frame: + _buttons_container.reparent(_frame, false) + _buttons_container.set_anchors_preset(Control.PRESET_BOTTOM_RIGHT) + _buttons_container.offset_left = _demo_button_offsets[0] + _buttons_container.offset_top = _demo_button_offsets[1] + _buttons_container.offset_right = _demo_button_offsets[2] + _buttons_container.offset_bottom = _demo_button_offsets[3] + + if _debugger != null: + _debugger.reparent(_results_body, false) + _results_body.move_child(_debugger, 0) + + func _reset_monitored_variable_highlights(): if not _debugger: return @@ -371,7 +446,7 @@ func _reset_monitored_variable_highlights(): # Create widgets that underline a variable and display a variable's value # when hovering with the mouse. var monitored_variables := _debugger.monitored_variables - var offset := Vector2i(_gdscript_text_edit.position.x as int, 0) + var offset := Vector2i(_gdscript_text_edit.global_position - global_position) for variable_name: StringName in monitored_variables: var last_line := 0 @@ -385,10 +460,7 @@ func _reset_monitored_variable_highlights(): if result != Vector2i(-1, -1): is_result_in_line_before = result.y < last_line - is_result_in_column_before = ( - result.x < last_column - and result.y <= last_line - ) + is_result_in_column_before = (result.x < last_column and result.y <= last_line) if result == Vector2i(-1, -1): last_line = -1 @@ -451,11 +523,15 @@ func _on_arrow_animation(chars1: Array, chars2: Array, immediate := false) -> vo var current_line := _gdscript_text_edit.get_caret_line() - var offset := Vector2i.ZERO - offset.x = floori(_gdscript_text_edit.position.x - 2) + var offset := Vector2i((_gdscript_text_edit.global_position - global_position).floor()) + offset.x -= 2 - var rect1 := Rect2i(_gdscript_text_edit.get_rect_at_line_column(current_line, (chars1[0] as int)+1)) - var rect2 := Rect2i(_gdscript_text_edit.get_rect_at_line_column(current_line, (chars2[0] as int)+1)) + var rect1 := Rect2i( + _gdscript_text_edit.get_rect_at_line_column(current_line, (chars1[0] as int) + 1) + ) + var rect2 := Rect2i( + _gdscript_text_edit.get_rect_at_line_column(current_line, (chars2[0] as int) + 1) + ) if rect1.position == Vector2i(-1, -1) and rect2.position == Vector2i(-1, -1): # fully off screen, don't draw anything @@ -477,26 +553,20 @@ func _on_arrow_animation(chars1: Array, chars2: Array, immediate := false) -> vo var rects := [rect1, rect2] _console_arrow_animation.highlight_rects = rects - _console_arrow_animation.initial_point = rect1.position + Vector2i(floori(rect1.size.x / 2.0), -5) + _console_arrow_animation.initial_point = rect1.position + Vector2i( + floori(rect1.size.x / 2.0), + -5, + ) _console_arrow_animation.end_point = rect2.position + Vector2i(floori(rect2.size.x / 2.0), -5) _console_arrow_animation.draw_curve(immediate) -func _update_gdscript_text_edit_width(new_font_scale: int) -> void: - var font_size_multiplier := ( - float(_base_text_font_size + new_font_scale * 2) - / _base_text_font_size - ) - _gdscript_text_edit.custom_minimum_size.y = _start_code_example_height * font_size_multiplier - - func _clear_animated_arrows() -> void: if _console_arrow_animation: _console_arrow_animation.highlight_rects = [] _console_arrow_animation.reset_curve() -func _on_Events_font_size_scale_changed(new_font_scale: int) -> void: +func _on_Events_font_size_scale_changed(_new_font_scale: int) -> void: _clear_animated_arrows() _reset_monitored_variable_highlights() - _update_gdscript_text_edit_width(new_font_scale) diff --git a/ui/components/RunnableCodeExample.tscn b/ui/components/RunnableCodeExample.tscn index 1f83a3f7..c06d3cbb 100644 --- a/ui/components/RunnableCodeExample.tscn +++ b/ui/components/RunnableCodeExample.tscn @@ -1,7 +1,6 @@ -[gd_scene format=3 uid="uid://cloqb8kbudf4b"] +[gd_scene format=3 uid="uid://clo06io77w2kp"] [ext_resource type="Script" uid="uid://cpp48of71pbfr" path="res://ui/components/RunnableCodeExample.gd" id="2"] -[ext_resource type="StyleBox" path="res://ui/theme/styles/textedit_stylebox.tres" id="3"] [ext_resource type="StyleBox" path="res://ui/theme/styles/runnable_example_panel_outline.tres" id="5"] [ext_resource type="StyleBox" path="res://ui/theme/styles/button_outline_normal.tres" id="6"] [ext_resource type="StyleBox" path="res://ui/theme/styles/button_outline_hover.tres" id="7"] @@ -11,34 +10,57 @@ [ext_resource type="CodeHighlighter" path="res://ui/theme/gdscript_syntax_highlighter.tres" id="10_y8wym"] [ext_resource type="Texture2D" uid="uid://b086kmokcu8qu" path="res://ui/assets/examples_background.svg" id="11"] -[node name="RunnableCodeExample" type="HBoxContainer" unique_id=1350260712] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_frame"] +bg_color = Color(0.0784314, 0.0823529, 0.164706, 1) +corner_radius_top_left = 12 +corner_radius_top_right = 12 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_code"] +content_margin_left = 28.0 +content_margin_top = 16.0 +content_margin_right = 28.0 +content_margin_bottom = 32.0 +bg_color = Color(0.0352941, 0.0392157, 0.12549, 1) +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_focus"] + +[node name="RunnableCodeExample" type="PanelContainer" unique_id=1350260712] offset_right = 1030.0 offset_bottom = 278.0 size_flags_horizontal = 3 +theme_override_styles/panel = ExtResource("5") script = ExtResource("2") -[node name="Frame" type="Control" parent="." unique_id=1694077977] +[node name="Content" type="VBoxContainer" parent="." unique_id=934997768] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 + +[node name="Frame" type="Control" parent="Content" unique_id=1694077977] unique_name_in_owner = true clip_contents = true custom_minimum_size = Vector2(240, 220) layout_mode = 2 size_flags_horizontal = 3 +size_flags_vertical = 3 -[node name="FramePanel" type="PanelContainer" parent="Frame" unique_id=209141511] +[node name="FramePanel" type="PanelContainer" parent="Content/Frame" unique_id=209141511] unique_name_in_owner = true +clip_children = 2 layout_mode = 0 anchor_right = 1.0 anchor_bottom = 1.0 -theme_override_styles/panel = ExtResource("5") +theme_override_styles/panel = SubResource("StyleBoxFlat_frame") -[node name="TextureRect" type="TextureRect" parent="Frame/FramePanel" unique_id=1998497125] -show_behind_parent = true +[node name="TextureRect" type="TextureRect" parent="Content/Frame/FramePanel" unique_id=1998497125] layout_mode = 2 texture = ExtResource("11") expand_mode = 1 stretch_mode = 1 -[node name="Sliders" type="VBoxContainer" parent="Frame" unique_id=133529752] +[node name="Sliders" type="VBoxContainer" parent="Content/Frame" unique_id=133529752] unique_name_in_owner = true layout_mode = 0 offset_left = 10.0 @@ -46,7 +68,7 @@ offset_top = 10.0 offset_right = 50.0 offset_bottom = 50.0 -[node name="ButtonsContainer" type="HBoxContainer" parent="Frame" unique_id=1323725507] +[node name="ButtonsContainer" type="HBoxContainer" parent="Content/Frame" unique_id=1323725507] unique_name_in_owner = true custom_minimum_size = Vector2(100, 40) layout_mode = 0 @@ -65,7 +87,7 @@ mouse_filter = 0 theme_override_constants/separation = 8 alignment = 2 -[node name="ResetButton" type="Button" parent="Frame/ButtonsContainer" unique_id=1494799076] +[node name="ResetButton" type="Button" parent="Content/Frame/ButtonsContainer" unique_id=1494799076] unique_name_in_owner = true custom_minimum_size = Vector2(80, 40) layout_mode = 2 @@ -78,7 +100,7 @@ theme_override_styles/hover = ExtResource("7") theme_override_styles/focus = ExtResource("10") text = "Reset" -[node name="RunButton" type="Button" parent="Frame/ButtonsContainer" unique_id=1248061364] +[node name="RunButton" type="Button" parent="Content/Frame/ButtonsContainer" unique_id=1248061364] unique_name_in_owner = true custom_minimum_size = Vector2(80, 40) layout_mode = 2 @@ -90,7 +112,7 @@ theme_override_styles/hover = ExtResource("7") theme_override_styles/focus = ExtResource("10") text = "run()" -[node name="StepButton" type="Button" parent="Frame/ButtonsContainer" unique_id=864588792] +[node name="StepButton" type="Button" parent="Content/Frame/ButtonsContainer" unique_id=864588792] unique_name_in_owner = true custom_minimum_size = Vector2(80, 40) layout_mode = 2 @@ -102,15 +124,42 @@ theme_override_styles/hover = ExtResource("7") theme_override_styles/focus = ExtResource("10") text = "step" -[node name="GDScriptCode" type="CodeEdit" parent="." unique_id=175998401] +[node name="Results" type="PanelContainer" parent="Content" unique_id=54752701] unique_name_in_owner = true visible = false -custom_minimum_size = Vector2(400, 260) layout_mode = 2 -size_flags_horizontal = 3 -theme_override_styles/read_only = ExtResource("3") +theme_override_styles/panel = SubResource("StyleBoxFlat_frame") + +[node name="MarginContainer" type="MarginContainer" parent="Content/Results" unique_id=1658356691] +layout_mode = 2 +theme_override_constants/margin_left = 16 +theme_override_constants/margin_top = 16 +theme_override_constants/margin_right = 16 +theme_override_constants/margin_bottom = 16 + +[node name="ResultsLayout" type="VBoxContainer" parent="Content/Results/MarginContainer" unique_id=259501926] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 16 + +[node name="ResultsBody" type="VBoxContainer" parent="Content/Results/MarginContainer/ResultsLayout" unique_id=401122970] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 24 + +[node name="GDScriptCode" type="CodeEdit" parent="Content" unique_id=175998401] +unique_name_in_owner = true +visible = false +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxFlat_code") +theme_override_styles/focus = SubResource("StyleBoxEmpty_focus") +theme_override_styles/read_only = SubResource("StyleBoxFlat_code") context_menu_enabled = false +emoji_menu_enabled = false shortcut_keys_enabled = false +drag_and_drop_selection_enabled = false +middle_mouse_paste_enabled = false +virtual_keyboard_enabled = false scroll_smooth = true scroll_fit_content_height = true caret_blink = true diff --git a/ui/components/RunnableCodeExampleDebugger.gd b/ui/components/RunnableCodeExampleDebugger.gd index 54cbf22a..8d8edbd8 100644 --- a/ui/components/RunnableCodeExampleDebugger.gd +++ b/ui/components/RunnableCodeExampleDebugger.gd @@ -1,37 +1,59 @@ class_name RunnableCodeExampleDebugger -extends PanelContainer - -const DebuggerConsoleMonitoredVariable := preload("res://ui/components/DebuggerConsoleMonitoredVariable.gd") -const DebuggerConsoleMonitoredVariableScene := preload("res://ui/components/DebuggerConsoleMonitoredVariable.tscn") +extends Control + +const DebuggerConsoleMonitoredVariable := preload( + "res://ui/components/DebuggerConsoleMonitoredVariable.gd" +) +const DebuggerConsoleMonitoredVariableScene := preload( + "res://ui/components/DebuggerConsoleMonitoredVariable.tscn" +) const UNINITIALIZED_VARIABLE_VALUE := "uninitialized" -@export var monitored_variables: Array # (Array, String) +@export var monitored_variables: Array[String] = [] -@export var variables_container: VBoxContainer +var _scene_instance: Node +var _console_variables: Array[DebuggerConsoleMonitoredVariable] = [] -@onready var _scene_instance: Node = null -@onready var _console_variables: Array[DebuggerConsoleMonitoredVariable] = [] +var _is_stepping_active := false +@onready var _variables_container: VBoxContainer = %VariablesContainer -func setup(runnable_code: Node, scene_instance) -> void: - assert(runnable_code.has_signal("code_updated")) - runnable_code.connect("code_updated", _on_code_updated) - _scene_instance = scene_instance +func _ready() -> void: for variable in monitored_variables: var console_variable := DebuggerConsoleMonitoredVariableScene.instantiate() - variables_container.add_child(console_variable) + console_variable.variable_name = variable + _variables_container.add_child(console_variable) _console_variables.append(console_variable) - if not is_inside_tree(): - await self.ready + var name_width := 0.0 + for console_variable in _console_variables: + name_width = maxf(name_width, console_variable.get_name_width()) + for console_variable in _console_variables: + console_variable.set_name_width(name_width) + + +func setup(runnable_code: RunnableCodeExample) -> void: + runnable_code.code_updated.connect(_on_code_updated) + + +func bind_scene_to_debug(scene_instance: Node) -> void: + _scene_instance = scene_instance + _is_stepping_active = false _on_code_updated() -func _on_code_updated(): +func set_stepping_active(active: bool) -> void: + _is_stepping_active = active + + +func _on_code_updated() -> void: for i in range(monitored_variables.size()): var variable_name: String = monitored_variables[i] var variable_value: String = str(_scene_instance.get(variable_name)) - _console_variables[i].set_values(["%s:" % variable_name, variable_value]) - _console_variables[i].visible = variable_value != UNINITIALIZED_VARIABLE_VALUE + var is_initialized := variable_value != UNINITIALIZED_VARIABLE_VALUE + _console_variables[i].set_value( + variable_value if is_initialized else tr("Not set"), + _is_stepping_active and is_initialized, + ) diff --git a/ui/components/RunnableCodeExampleDebugger.tscn b/ui/components/RunnableCodeExampleDebugger.tscn index a5be611d..4337d892 100644 --- a/ui/components/RunnableCodeExampleDebugger.tscn +++ b/ui/components/RunnableCodeExampleDebugger.tscn @@ -1,35 +1,25 @@ -[gd_scene format=3 uid="uid://b3a8d63ucpxwl"] +[gd_scene format=3 uid="uid://d4ffrpt5q6dig"] -[ext_resource type="StyleBox" path="res://ui/theme/styles/panel_normal.tres" id="2"] -[ext_resource type="StyleBox" path="res://ui/theme/styles/runnable_example_panel_outline.tres" id="4"] [ext_resource type="Script" uid="uid://dxpopecv0bw82" path="res://ui/components/RunnableCodeExampleDebugger.gd" id="5"] +[ext_resource type="FontVariation" path="res://ui/theme/fonts/font_text_bold.tres" id="6"] -[node name="RunnableCodeExampleDebugger" type="PanelContainer" unique_id=392901046 node_paths=PackedStringArray("variables_container")] +[node name="RunnableCodeExampleDebugger" type="VBoxContainer" unique_id=392901046] offset_right = 781.0 offset_bottom = 117.0 size_flags_horizontal = 3 +theme_override_constants/separation = 8 script = ExtResource("5") -variables_container = NodePath("MarginContainer/VariablesContainer") -[node name="Panel" type="Panel" parent="." unique_id=1367350711] +[node name="Label" type="Label" parent="." unique_id=1827394277] layout_mode = 2 -theme_override_styles/panel = ExtResource("2") +theme_override_colors/font_color = Color(0.717647, 0.701961, 0.847059, 1) +theme_override_fonts/font = ExtResource("6") +theme_override_font_sizes/font_size = 18 +text = "Variables" -[node name="Outline" type="Panel" parent="." unique_id=1252201656] -layout_mode = 2 -theme_override_styles/panel = ExtResource("4") - -[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1434405081] -layout_mode = 2 - -[node name="VariablesContainer" type="VBoxContainer" parent="MarginContainer" unique_id=643220917] +[node name="VariablesContainer" type="VBoxContainer" parent="." unique_id=643220917] +unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 0 -theme_override_constants/separation = 5 - -[node name="Label" type="Label" parent="MarginContainer/VariablesContainer" unique_id=1827394277] -layout_mode = 2 -theme_type_variation = &"LabelSmallTitle" -theme_override_colors/font_color = Color(0.572549, 0.560784, 0.721569, 1) -text = "Debugger" +theme_override_constants/separation = 8 diff --git a/ui/components/RunnableExampleOutput.gd b/ui/components/RunnableExampleOutput.gd new file mode 100644 index 00000000..08840996 --- /dev/null +++ b/ui/components/RunnableExampleOutput.gd @@ -0,0 +1,25 @@ +class_name RunnableExampleOutput +extends OutputConsole + +signal line_highlight_requested(line_number) +signal animate_arrow_requested(chars1, chars2) + +const MAX_OUTPUT_HEIGHT := 180.0 + +@onready var _empty_output: Label = %EmptyOutput + + +func _ready() -> void: + messages_changed.connect(_update_output_height) + _message_list.minimum_size_changed.connect(_update_output_height) + _update_output_height() + + +func _update_output_height() -> void: + var has_messages := _message_list.get_child_count() > 0 + _empty_output.visible = not has_messages + _scroll_container.visible = has_messages + _scroll_container.custom_minimum_size.y = minf( + _message_list.get_combined_minimum_size().y, + MAX_OUTPUT_HEIGHT, + ) diff --git a/ui/components/RunnableExampleOutput.gd.uid b/ui/components/RunnableExampleOutput.gd.uid new file mode 100644 index 00000000..2e3fe29b --- /dev/null +++ b/ui/components/RunnableExampleOutput.gd.uid @@ -0,0 +1 @@ +uid://cbunv1mnuiv43 diff --git a/ui/components/RunnableExampleOutput.tscn b/ui/components/RunnableExampleOutput.tscn new file mode 100644 index 00000000..43595960 --- /dev/null +++ b/ui/components/RunnableExampleOutput.tscn @@ -0,0 +1,41 @@ +[gd_scene format=3 uid="uid://caergpnn0bt0b"] + +[ext_resource type="Script" uid="uid://cbunv1mnuiv43" path="res://ui/components/RunnableExampleOutput.gd" id="1"] +[ext_resource type="PackedScene" path="res://ui/components/RunnableExampleOutputPrintMessage.tscn" id="2"] +[ext_resource type="FontVariation" path="res://ui/theme/fonts/font_text_bold.tres" id="3"] +[ext_resource type="FontVariation" path="res://ui/theme/fonts/font_text.tres" id="4"] +[ext_resource type="Script" uid="uid://dmptnpr0crwmq" path="res://ui/components/SmoothScrollContainer.gd" id="5"] + +[node name="RunnableExampleOutput" type="VBoxContainer" unique_id=283904819] +size_flags_horizontal = 3 +theme_override_constants/separation = 8 +script = ExtResource("1") +print_message_scene = ExtResource("2") + +[node name="Heading" type="Label" parent="." unique_id=222465686] +layout_mode = 2 +theme_override_colors/font_color = Color(0.717647, 0.701961, 0.847059, 1) +theme_override_fonts/font = ExtResource("3") +theme_override_font_sizes/font_size = 18 +text = "Output" + +[node name="EmptyOutput" type="Label" parent="." unique_id=1623323735] +unique_name_in_owner = true +layout_mode = 2 +theme_override_colors/font_color = Color(0.572549, 0.560784, 0.721569, 1) +theme_override_fonts/font = ExtResource("4") +theme_override_font_sizes/font_size = 18 +text = "Nothing printed yet" + +[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=1035322262] +unique_name_in_owner = true +visible = false +layout_mode = 2 +horizontal_scroll_mode = 0 +script = ExtResource("5") + +[node name="MessageList" type="VBoxContainer" parent="ScrollContainer" unique_id=200165217] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 diff --git a/ui/components/RunnableExampleOutputPrintMessage.tscn b/ui/components/RunnableExampleOutputPrintMessage.tscn new file mode 100644 index 00000000..a0d7d51e --- /dev/null +++ b/ui/components/RunnableExampleOutputPrintMessage.tscn @@ -0,0 +1,13 @@ +[gd_scene format=3 uid="uid://dtghypb6lgmil"] + +[ext_resource type="FontVariation" path="res://ui/theme/fonts/font_text.tres" id="1"] + +[node name="RunnableExampleOutputPrintMessage" type="HBoxContainer" unique_id=1014068938] +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="." unique_id=66602635] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_fonts/font = ExtResource("1") +theme_override_font_sizes/font_size = 20 +autowrap_mode = 3 diff --git a/ui/components/UIPracticeOutputConsole.gd b/ui/components/UIPracticeOutputConsole.gd new file mode 100644 index 00000000..65c7b44b --- /dev/null +++ b/ui/components/UIPracticeOutputConsole.gd @@ -0,0 +1,91 @@ +class_name UIPracticeOutputConsole +extends OutputConsole + +signal reference_clicked(file_name, line_nb, character) + +const OutputConsoleErrorMessage := preload("./OutputConsoleErrorMessage.gd") +const OutputConsoleErrorMessageScene := preload("./OutputConsoleErrorMessage.tscn") + +var _slice_properties: ScriptSlice + +@onready var _error_popup: Control = %ErrorPopup +@onready var _error_overlay_popup: ErrorOverlayPopup = %ErrorOverlayPopup +@onready var _external_error_popup: Control = %ExternalErrorPopup + + +func _ready() -> void: + _external_error_popup.set_as_top_level(true) + _error_popup.set_as_top_level(true) + _error_overlay_popup.hidden.connect(_error_popup.hide) + resized.connect(_on_resized) + MessageBus.print_requested.connect(print_bus_message) + + +func setup(slice: ScriptSlice) -> void: + _slice_properties = slice + + +func print_bus_message( + type: int, + text: String, + file_name: String, + line: int, + character: int, + code: int, +) -> void: + if not is_inside_tree(): + return + + if type in [ + MessageBus.MESSAGE_TYPE.ASSERT, + MessageBus.MESSAGE_TYPE.ERROR, + MessageBus.MESSAGE_TYPE.WARNING, + ]: + print_error(type, text, file_name, line, character, code) + else: + print_output([text]) + + +func print_error(type: int, text: String, file_name: String, line: int, character: int, code: int) -> void: + if not is_inside_tree(): + return + + # Map engine line numbers to the student's editable script slice. + var show_lines_from := _slice_properties.get_start_offset() + var show_lines_to := _slice_properties.get_end_offset() + var character_offset := _slice_properties.leading_spaces + var message := OutputConsoleErrorMessageScene.instantiate() as OutputConsoleErrorMessage + message.message_severity = type + message.message_text = text + message.message_code = code + + if line >= show_lines_from and line <= show_lines_to: + message.origin_file = file_name + message.origin_line = line - show_lines_from + message.origin_char = character - character_offset + else: + message.external_error = true + + message.external_explain_requested.connect(_on_external_requested) + message.show_code_requested.connect(_on_code_requested) + message.explain_error_requested.connect(_on_explain_requested) + _add_message(message) + + +func _on_external_requested() -> void: + _external_error_popup.show() + + +func _on_code_requested(file_name: String, line: int, character: int) -> void: + reference_clicked.emit(file_name, line, character) + + +func _on_explain_requested(error_code: int, error_message: String) -> void: + _error_overlay_popup.error_code = error_code + _error_overlay_popup.error_message = error_message + _error_overlay_popup.show() + _error_popup.show() + + +func _on_resized() -> void: + _error_popup.set_offsets_preset(Control.PRESET_FULL_RECT) diff --git a/ui/components/UIPracticeOutputConsole.gd.uid b/ui/components/UIPracticeOutputConsole.gd.uid new file mode 100644 index 00000000..2fd37ea3 --- /dev/null +++ b/ui/components/UIPracticeOutputConsole.gd.uid @@ -0,0 +1 @@ +uid://cmkcogay8rpdx diff --git a/ui/components/OutputConsole.tscn b/ui/components/UIPracticeOutputConsole.tscn similarity index 85% rename from ui/components/OutputConsole.tscn rename to ui/components/UIPracticeOutputConsole.tscn index 00bfda02..5763ebe1 100644 --- a/ui/components/OutputConsole.tscn +++ b/ui/components/UIPracticeOutputConsole.tscn @@ -1,17 +1,19 @@ -[gd_scene format=3 uid="uid://csvdvacbgm85x"] +[gd_scene format=3 uid="uid://biookgldcfjrg"] -[ext_resource type="Script" uid="uid://cbc5bjsaovefy" path="res://ui/components/OutputConsole.gd" id="2"] +[ext_resource type="Script" uid="uid://cmkcogay8rpdx" path="res://ui/components/UIPracticeOutputConsole.gd" id="2"] +[ext_resource type="PackedScene" uid="uid://ck4738mmjjgat" path="res://ui/components/OutputConsolePrintMessage.tscn" id="3"] [ext_resource type="PackedScene" path="res://ui/components/popups/ExternalErrorPopup.tscn" id="4"] [ext_resource type="PackedScene" path="res://ui/components/popups/ErrorOverlayPopup.tscn" id="5"] [ext_resource type="StyleBox" path="res://ui/theme/styles/panel_normal.tres" id="6"] [ext_resource type="Script" uid="uid://dmptnpr0crwmq" path="res://ui/components/SmoothScrollContainer.gd" id="7"] -[node name="OutputConsole" type="PanelContainer" unique_id=1277880461] +[node name="UIPracticeOutputConsole" type="PanelContainer" unique_id=1277880461] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 size_flags_vertical = 3 script = ExtResource("2") +print_message_scene = ExtResource("3") [node name="Panel" type="Panel" parent="." unique_id=554613429] layout_mode = 2 diff --git a/ui/components/popups/ConfirmPopup.tscn b/ui/components/popups/ConfirmPopup.tscn index d83d31ea..1189f003 100644 --- a/ui/components/popups/ConfirmPopup.tscn +++ b/ui/components/popups/ConfirmPopup.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://b3mhn551rchk6"] +[gd_scene format=3 uid="uid://bv2hvysshfyb2"] [ext_resource type="Script" uid="uid://250i3m14c23m" path="res://ui/components/popups/ConfirmPopup.gd" id="1"] [ext_resource type="StyleBox" uid="uid://w1loq40elk8g" path="res://ui/theme/styles/button_outline_large_pressed.tres" id="3"] diff --git a/ui/components/popups/PracticeDonePopup.tscn b/ui/components/popups/PracticeDonePopup.tscn index 0c8fb903..280eab5b 100644 --- a/ui/components/popups/PracticeDonePopup.tscn +++ b/ui/components/popups/PracticeDonePopup.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bpfgy6cihy6xg"] +[gd_scene format=3 uid="uid://60bdr80ynmws"] [ext_resource type="Script" uid="uid://d00fibhej2dlw" path="res://ui/components/popups/PracticeDonePopup.gd" id="2"] [ext_resource type="Script" uid="uid://bqtsv6kpc77fd" path="res://ui/components/RichTextLabelRTL.gd" id="3_63afv"] diff --git a/ui/components/popups/PracticeLeaveUnfinishedPopup.tscn b/ui/components/popups/PracticeLeaveUnfinishedPopup.tscn index d5b75232..ddaa95c5 100644 --- a/ui/components/popups/PracticeLeaveUnfinishedPopup.tscn +++ b/ui/components/popups/PracticeLeaveUnfinishedPopup.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://bwyulvatfvqvp"] +[gd_scene format=3 uid="uid://ef45rt3dl6vi"] [ext_resource type="Script" uid="uid://cmcy46dsgw1yi" path="res://ui/components/popups/PracticeLeaveUnfinishedPopup.gd" id="1"] [ext_resource type="StyleBox" uid="uid://w1loq40elk8g" path="res://ui/theme/styles/button_outline_large_pressed.tres" id="3"] diff --git a/ui/screens/course_outliner/CourseOutliner.tscn b/ui/screens/course_outliner/CourseOutliner.tscn index 5eae420c..fdb9ac6e 100644 --- a/ui/screens/course_outliner/CourseOutliner.tscn +++ b/ui/screens/course_outliner/CourseOutliner.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://bfpid7jc46r62" path="res://ui/screens/course_outliner/CourseOutliner.gd" id="1"] [ext_resource type="PackedScene" uid="uid://bgmk3s68qov2" path="res://ui/screens/course_outliner/CourseLessonList.tscn" id="4"] [ext_resource type="PackedScene" uid="uid://e7swcfscuvmu" path="res://ui/screens/course_outliner/CourseLessonDetails.tscn" id="6"] -[ext_resource type="PackedScene" uid="uid://b3mhn551rchk6" path="res://ui/components/popups/ConfirmPopup.tscn" id="7"] +[ext_resource type="PackedScene" uid="uid://bv2hvysshfyb2" path="res://ui/components/popups/ConfirmPopup.tscn" id="7"] [node name="CourseOutliner" type="PanelContainer" unique_id=695105099] anchors_preset = 15 diff --git a/ui/screens/lesson/quizzes/QuizAnswerButton.tscn b/ui/screens/lesson/quizzes/QuizAnswerButton.tscn index 33fe984c..7399a36c 100644 --- a/ui/screens/lesson/quizzes/QuizAnswerButton.tscn +++ b/ui/screens/lesson/quizzes/QuizAnswerButton.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://dhrggtdgmiyh2"] +[gd_scene format=3 uid="uid://ctn8tjc3ikigq"] [ext_resource type="Script" uid="uid://cnem3bl8gmw68" path="res://ui/screens/lesson/quizzes/QuizAnswerButton.gd" id="3"] [ext_resource type="StyleBox" path="res://ui/theme/styles/quiz_answer_normal.tres" id="4"] diff --git a/ui/screens/lesson/quizzes/UIQuizChoice.tscn b/ui/screens/lesson/quizzes/UIQuizChoice.tscn index 668e205d..7ee7f938 100644 --- a/ui/screens/lesson/quizzes/UIQuizChoice.tscn +++ b/ui/screens/lesson/quizzes/UIQuizChoice.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://rfgflfitkd1s"] +[gd_scene format=3 uid="uid://cuc2w12ac2a4x"] [ext_resource type="PackedScene" uid="uid://dfpckgv8i4c3a" path="res://ui/screens/lesson/UIBaseQuiz.tscn" id="1"] [ext_resource type="Script" uid="uid://bh0llkg6ael4e" path="res://ui/screens/lesson/quizzes/UIQuizChoice.gd" id="2"] diff --git a/ui/screens/welcome_screen/RunDrawSquareIntro.tscn b/ui/screens/welcome_screen/RunDrawSquareIntro.tscn index 1df485f4..e79c53b1 100644 --- a/ui/screens/welcome_screen/RunDrawSquareIntro.tscn +++ b/ui/screens/welcome_screen/RunDrawSquareIntro.tscn @@ -1,6 +1,6 @@ [gd_scene format=3 uid="uid://cs7a0kna18mbq"] -[ext_resource type="PackedScene" uid="uid://cloqb8kbudf4b" path="res://ui/components/RunnableCodeExample.tscn" id="1"] +[ext_resource type="PackedScene" uid="uid://clo06io77w2kp" path="res://ui/components/RunnableCodeExample.tscn" id="1"] [ext_resource type="PackedScene" uid="uid://du3140jooy8eh" path="res://course/lesson-5-your-first-function/ExampleTurtleSquare.tscn" id="2"] [node name="ExampleMoveAndRotate" type="PanelContainer" unique_id=1859448814] diff --git a/ui/theme/gdscript_syntax_highlighter.tres b/ui/theme/gdscript_syntax_highlighter.tres index 84cf7952..8ee774fc 100644 --- a/ui/theme/gdscript_syntax_highlighter.tres +++ b/ui/theme/gdscript_syntax_highlighter.tres @@ -1,4 +1,4 @@ -[gd_resource type="CodeHighlighter" format=3 uid="uid://bwq3n4u078x4s"] +[gd_resource type="CodeHighlighter" format=3 uid="uid://ch285bdl3ntjm"] [resource] number_color = Color(0.922, 0.58, 0.2, 1) @@ -5075,5 +5075,6 @@ member_keyword_colors = { color_regions = { "\" \"": Color(1, 0.960784, 0.25098, 1), "#": Color(0.290196, 0.294118, 0.388235, 1), -"' '": Color(1, 0.960784, 0.25098, 1) +"' '": Color(1, 0.960784, 0.25098, 1), +"[= ]": Color(0.290196, 0.294118, 0.388235, 1) } diff --git a/ui/theme/project_theme.tres b/ui/theme/project_theme.tres index 69332b1b..5063ff8e 100644 --- a/ui/theme/project_theme.tres +++ b/ui/theme/project_theme.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" format=3 uid="uid://bty2e3jp6i1sj"] +[gd_resource type="Theme" format=3 uid="uid://d1lnwn2k8utlb"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_text.tres" id="1"] [ext_resource type="FontVariation" path="res://ui/theme/fonts/font_title_big.tres" id="1_lsh2h"] @@ -276,7 +276,7 @@ TextEdit/colors/completion_existing_color = Color(0.87, 0.87, 0.87, 0.13) TextEdit/colors/completion_font_color = Color(0.67, 0.67, 0.67, 1) TextEdit/colors/completion_scroll_color = Color(1, 1, 1, 1) TextEdit/colors/completion_selected_color = Color(0.26, 0.26, 0.27, 1) -TextEdit/colors/current_line_color = Color(0.25, 0.25, 0.26, 0.8) +TextEdit/colors/current_line_color = Color(0.27451, 0.25098, 0.368627, 0.85) TextEdit/colors/executing_line_color = Color(0.2, 0.8, 0.2, 0.4) TextEdit/colors/font_color = Color(0.878431, 0.878431, 0.878431, 1) TextEdit/colors/font_color_readonly = Color(0.878431, 0.878431, 0.878431, 1) diff --git a/ui/theme/styles/runnable_example_panel_outline.tres b/ui/theme/styles/runnable_example_panel_outline.tres index a27517ce..c4c48f70 100644 --- a/ui/theme/styles/runnable_example_panel_outline.tres +++ b/ui/theme/styles/runnable_example_panel_outline.tres @@ -1,4 +1,4 @@ -[gd_resource type="StyleBoxFlat" format=3 uid="uid://duoufsoqvve3v"] +[gd_resource type="StyleBoxFlat" format=3 uid="uid://sk4t83xmxa5x"] [resource] draw_center = false @@ -6,8 +6,8 @@ border_width_left = 4 border_width_top = 4 border_width_right = 4 border_width_bottom = 4 -border_color = Color(0.4, 0.384314, 0.564706, 1) -corner_radius_top_left = 12 -corner_radius_top_right = 12 -corner_radius_bottom_right = 12 -corner_radius_bottom_left = 12 +border_color = Color(0.572549, 0.560784, 0.721569, 1) +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 diff --git a/ui/theme/styles/runnable_example_variables_panel.tres b/ui/theme/styles/runnable_example_variables_panel.tres new file mode 100644 index 00000000..bf3ff473 --- /dev/null +++ b/ui/theme/styles/runnable_example_variables_panel.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://cjntbgluckn0o"] + +[resource] +bg_color = Color(0.18, 0.18, 0.26, 1)