diff --git a/project.godot b/project.godot index 70b6010..ed9090f 100644 --- a/project.godot +++ b/project.godot @@ -122,7 +122,7 @@ hotkey_fullscreen={ } console={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194334,"key_label":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194334,"key_label":0,"unicode":0,"echo":false,"script":null) ] } diff --git a/scenes/gui/console.tscn b/scenes/gui/console.tscn index 041ffff..f03ed4f 100644 --- a/scenes/gui/console.tscn +++ b/scenes/gui/console.tscn @@ -2,24 +2,26 @@ [ext_resource type="Script" path="res://src/scene-scripts/console.cs" id="1_c6bre"] -[node name="console" type="CanvasLayer"] +[node name="popup_panel" type="PopupPanel"] +transparent_bg = true +size = Vector2i(1537, 193) +visible = true script = ExtResource("1_c6bre") -[node name="panel_container" type="PanelContainer" parent="."] -anchors_preset = 10 -anchor_right = 1.0 -grow_horizontal = 2 +[node name="v_box_container" type="VBoxContainer" parent="."] +offset_left = 4.0 +offset_top = 4.0 +offset_right = 1533.0 +offset_bottom = 189.0 -[node name="v_box_container" type="VBoxContainer" parent="panel_container"] -layout_mode = 2 - -[node name="rich_text_label" type="RichTextLabel" parent="panel_container/v_box_container"] +[node name="rich_text_label" type="RichTextLabel" parent="v_box_container"] custom_minimum_size = Vector2(0, 150) layout_mode = 2 bbcode_enabled = true +text = "[color=red][b]USING CHEATS MAY DISABLE ACHIEVEMENTS[/b][/color]" scroll_following = true -[node name="line_edit" type="LineEdit" parent="panel_container/v_box_container"] +[node name="line_edit" type="LineEdit" parent="v_box_container"] layout_mode = 2 placeholder_text = "Type in cheat or command. Use \"help\" for help." max_length = 200 @@ -30,5 +32,3 @@ select_all_on_focus = true caret_blink = true caret_blink_interval = 0.5 caret_force_displayed = true - -[connection signal="text_submitted" from="panel_container/v_box_container/line_edit" to="." method="OnLineEditTextSubmitted"] diff --git a/scenes/player.tscn b/scenes/player.tscn index e19f96a..4f1edda 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -142,4 +142,3 @@ shape = SubResource("CapsuleShape2D_38v5o") metadata/_edit_lock_ = true [node name="console" parent="." instance=ExtResource("4_kw3hh")] -visible = false diff --git a/src/scene-scripts/console.cs b/src/scene-scripts/console.cs index db8a11c..5112e8f 100644 --- a/src/scene-scripts/console.cs +++ b/src/scene-scripts/console.cs @@ -1,14 +1,17 @@ using Godot; -public partial class console : CanvasLayer +public partial class console : PopupPanel { public RichTextLabel textblock; public LineEdit line; + public string error = "Not found! :("; + + //functions with capital letters can't be used inside the console public override void _Ready() { - textblock = GetNode("panel_container/v_box_container/rich_text_label"); - line = GetNode("panel_container/v_box_container/line_edit"); + textblock = GetNode("v_box_container/rich_text_label"); + line = GetNode("v_box_container/line_edit"); } public override void _Process(double delta) {