diff --git a/DungeonShooting_Godot/editor/ide_cn_font_8.tres b/DungeonShooting_Godot/editor/ide_cn_font_8.tres deleted file mode 100644 index 3797db3..0000000 --- a/DungeonShooting_Godot/editor/ide_cn_font_8.tres +++ /dev/null @@ -1,10 +0,0 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] - -[ext_resource path="res://SourceHanSerifCN-SemiBold.otf" type="DynamicFontData" id=1] - -[resource] -size = 4 -use_mipmaps = true -use_filter = true -extra_spacing_space = 2 -font_data = ExtResource( 1 ) diff --git a/DungeonShooting_Godot/editor/prefabs/CodeHintItem.tscn b/DungeonShooting_Godot/editor/prefabs/CodeHintItem.tscn new file mode 100644 index 0000000..83874f2 --- /dev/null +++ b/DungeonShooting_Godot/editor/prefabs/CodeHintItem.tscn @@ -0,0 +1,63 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://editor/src/CodeHintItem.cs" type="Script" id=1] +[ext_resource path="res://editor/ide_cn_font_6.tres" type="DynamicFont" id=2] +[ext_resource path="res://addons/dungeonShooting_plugin/ActivityObject.svg" type="Texture" id=3] + +[sub_resource type="StyleBoxFlat" id=3] +bg_color = Color( 1, 1, 1, 0.0784314 ) + +[sub_resource type="StyleBoxFlat" id=1] +bg_color = Color( 0, 0, 0, 0 ) + +[node name="CodeHintItem" type="Button"] +margin_right = 271.0 +margin_bottom = 20.0 +rect_min_size = Vector2( 0, 20 ) +mouse_default_cursor_shape = 2 +custom_constants/hseparation = 0 +custom_styles/hover = SubResource( 3 ) +custom_styles/pressed = SubResource( 1 ) +custom_styles/focus = SubResource( 1 ) +custom_styles/disabled = SubResource( 1 ) +custom_styles/normal = SubResource( 1 ) +align = 0 +expand_icon = true +script = ExtResource( 1 ) + +[node name="BgColor" type="ColorRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 +input_pass_on_modal_close_click = false +color = Color( 0, 0, 0, 0 ) + +[node name="Icon" type="TextureRect" parent="."] +margin_left = 2.0 +margin_top = 2.0 +margin_right = 17.0 +margin_bottom = 17.0 +rect_min_size = Vector2( 16, 16 ) +mouse_filter = 2 +texture = ExtResource( 3 ) +expand = true + +[node name="Text" type="RichTextLabel" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 20.0 +margin_right = -2.0 +margin_bottom = -1.0 +rect_min_size = Vector2( 0, 19 ) +mouse_filter = 2 +custom_colors/default_color = Color( 0.752941, 0.752941, 0.776471, 1 ) +custom_colors/selection_color = Color( 0.752941, 0.752941, 0.776471, 1 ) +custom_colors/font_color_selected = Color( 0.752941, 0.752941, 0.776471, 1 ) +custom_fonts/normal_font = ExtResource( 2 ) +bbcode_enabled = true +bbcode_text = "[color=#42AAFD]st[/color]ring" +text = "string" +fit_content_height = true +scroll_active = false + +[connection signal="pressed" from="." to="." method="_on_click"] diff --git a/DungeonShooting_Godot/editor/prefabs/CodeHintPanel.tscn b/DungeonShooting_Godot/editor/prefabs/CodeHintPanel.tscn new file mode 100644 index 0000000..3acd025 --- /dev/null +++ b/DungeonShooting_Godot/editor/prefabs/CodeHintPanel.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://editor/prefabs/CodeHintItem.tscn" type="PackedScene" id=1] +[ext_resource path="res://editor/src/CodeHintPanel.cs" type="Script" id=2] + +[sub_resource type="StyleBoxFlat" id=4] +bg_color = Color( 0.145098, 0.145098, 0.14902, 1 ) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.270588, 0.270588, 0.270588, 1 ) + +[node name="CodeHintPanel" type="PopupPanel"] +visible = true +margin_right = 273.0 +margin_bottom = 130.0 +custom_styles/panel = SubResource( 4 ) +script = ExtResource( 2 ) +CodeHintItem = ExtResource( 1 ) + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 1.0 +margin_top = 1.0 +margin_right = -1.0 +margin_bottom = -1.0 +scroll_horizontal_enabled = false + +[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] +margin_right = 271.0 +size_flags_horizontal = 3 +custom_constants/separation = 0 diff --git a/DungeonShooting_Godot/editor/prefabs/CodePanel.tscn b/DungeonShooting_Godot/editor/prefabs/CodePanel.tscn index f88cee3..423ae3a 100644 --- a/DungeonShooting_Godot/editor/prefabs/CodePanel.tscn +++ b/DungeonShooting_Godot/editor/prefabs/CodePanel.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://editor/src/CodeTextEditor.cs" type="Script" id=1] [ext_resource path="res://editor/ide_cn_font_6.tres" type="DynamicFont" id=2] [ext_resource path="res://editor/src/CodePanel.cs" type="Script" id=3] [ext_resource path="res://editor/src/TextEditPainter.cs" type="Script" id=4] -[ext_resource path="res://editor/prefabs/HintPanel.tscn" type="PackedScene" id=5] [node name="CodePanel" type="Control"] anchor_right = 1.0 @@ -40,11 +39,5 @@ [node name="TextEditPainter" type="Node2D" parent="ScalePanel/TextEdit"] script = ExtResource( 4 ) -[node name="Popup" parent="ScalePanel/TextEdit" instance=ExtResource( 5 )] -margin_left = 155.556 -margin_top = 115.556 -margin_right = 286.556 -margin_bottom = 209.556 - [connection signal="resized" from="ScalePanel" to="." method="_on_ScalePanel_resized"] [connection signal="text_changed" from="ScalePanel/TextEdit" to="ScalePanel/TextEdit" method="_on_TextEdit_text_changed"] diff --git a/DungeonShooting_Godot/editor/prefabs/HintPanel.tscn b/DungeonShooting_Godot/editor/prefabs/HintPanel.tscn deleted file mode 100644 index 379e43b..0000000 --- a/DungeonShooting_Godot/editor/prefabs/HintPanel.tscn +++ /dev/null @@ -1,552 +0,0 @@ -[gd_scene load_steps=9 format=2] - -[ext_resource path="res://addons/dungeonShooting_plugin/ActivityObject.svg" type="Texture" id=1] -[ext_resource path="res://editor/src/HintPanel.cs" type="Script" id=2] -[ext_resource path="res://editor/src/HintItem.cs" type="Script" id=3] -[ext_resource path="res://editor/ide_cn_font_8.tres" type="DynamicFont" id=4] - -[sub_resource type="StyleBoxFlat" id=4] -bg_color = Color( 0.145098, 0.145098, 0.14902, 1 ) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color( 0.270588, 0.270588, 0.270588, 1 ) - -[sub_resource type="StyleBoxFlat" id=3] -bg_color = Color( 1, 1, 1, 0.0784314 ) - -[sub_resource type="StyleBoxFlat" id=2] -bg_color = Color( 0.207843, 0.309804, 0.521569, 1 ) - -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0, 0, 0, 0 ) - -[node name="Popup" type="PopupPanel"] -visible = true -margin_right = 114.0 -margin_bottom = 84.0 -custom_styles/panel = SubResource( 4 ) -script = ExtResource( 2 ) - -[node name="ScrollContainer" type="ScrollContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 1.0 -margin_top = 1.0 -margin_right = -1.0 -margin_bottom = -1.0 -scroll_horizontal_enabled = false - -[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] -margin_right = 100.0 -margin_bottom = 117.0 -size_flags_horizontal = 3 -custom_constants/separation = 0 - -[node name="Button" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_right = 100.0 -margin_bottom = 9.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button2" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 9.0 -margin_right = 100.0 -margin_bottom = 18.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button2"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button2"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button3" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 18.0 -margin_right = 100.0 -margin_bottom = 27.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button3"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button3"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button4" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 27.0 -margin_right = 100.0 -margin_bottom = 36.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button4"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button4"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button5" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 36.0 -margin_right = 100.0 -margin_bottom = 45.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button5"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button5"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button6" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 45.0 -margin_right = 100.0 -margin_bottom = 54.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button6"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button6"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button7" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 54.0 -margin_right = 100.0 -margin_bottom = 63.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button7"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button7"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button8" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 63.0 -margin_right = 100.0 -margin_bottom = 72.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button8"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button8"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button9" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 72.0 -margin_right = 100.0 -margin_bottom = 81.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button9"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button9"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button10" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 81.0 -margin_right = 100.0 -margin_bottom = 90.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button10"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button10"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button11" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 90.0 -margin_right = 100.0 -margin_bottom = 99.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button11"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button11"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button12" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 99.0 -margin_right = 100.0 -margin_bottom = 108.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button12"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button12"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[node name="Button13" type="Button" parent="ScrollContainer/VBoxContainer"] -margin_top = 108.0 -margin_right = 100.0 -margin_bottom = 117.0 -rect_min_size = Vector2( 0, 9 ) -custom_constants/hseparation = 0 -custom_styles/hover = SubResource( 3 ) -custom_styles/pressed = SubResource( 2 ) -custom_styles/focus = SubResource( 2 ) -custom_styles/disabled = SubResource( 1 ) -custom_styles/normal = SubResource( 1 ) -align = 0 -expand_icon = true -script = ExtResource( 3 ) - -[node name="Icon" type="TextureRect" parent="ScrollContainer/VBoxContainer/Button13"] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 8.0 -margin_bottom = 8.0 -rect_min_size = Vector2( 7, 7 ) -texture = ExtResource( 1 ) -expand = true - -[node name="Text" type="RichTextLabel" parent="ScrollContainer/VBoxContainer/Button13"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 9.0 -margin_top = 1.0 -margin_right = -2.0 -margin_bottom = 1.0 -rect_min_size = Vector2( 0, 9 ) -mouse_filter = 2 -custom_fonts/normal_font = ExtResource( 4 ) -text = "private" -fit_content_height = true -scroll_active = false - -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button" to="ScrollContainer/VBoxContainer/Button" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button2" to="ScrollContainer/VBoxContainer/Button2" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button3" to="ScrollContainer/VBoxContainer/Button3" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button4" to="ScrollContainer/VBoxContainer/Button4" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button5" to="ScrollContainer/VBoxContainer/Button5" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button6" to="ScrollContainer/VBoxContainer/Button6" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button7" to="ScrollContainer/VBoxContainer/Button7" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button8" to="ScrollContainer/VBoxContainer/Button8" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button9" to="ScrollContainer/VBoxContainer/Button9" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button10" to="ScrollContainer/VBoxContainer/Button10" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button11" to="ScrollContainer/VBoxContainer/Button11" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button12" to="ScrollContainer/VBoxContainer/Button12" method="_on_click"] -[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button13" to="ScrollContainer/VBoxContainer/Button13" method="_on_click"] diff --git a/DungeonShooting_Godot/editor/src/CodeHintItem.cs b/DungeonShooting_Godot/editor/src/CodeHintItem.cs new file mode 100644 index 0000000..b7b3fff --- /dev/null +++ b/DungeonShooting_Godot/editor/src/CodeHintItem.cs @@ -0,0 +1,89 @@ +using Godot; + +namespace DScript.GodotEditor +{ + /// + /// 提示面板中的提示项 + /// + public class CodeHintItem : Button + { + /// + /// 活动时背景颜色 + /// + private static Color ActiveColor = new Color(0.20784314F,0.30980393F,0.52156866F); + /// + /// 非活动时背景颜色 + /// + private static Color UnActiveColor = new Color(0, 0, 0, 0); + + + /// + /// 当前项的索引 + /// + public int Index { get; internal set; } + + /// + /// 代码类型 + /// + public CodeHintType CodeType + { + get => _codeType; + set => SetCodeType(value); + } + private CodeHintType _codeType; + + /// + /// 代码文本 + /// + public string CodeText + { + get => _codeText; + set => SetCodeText(value); + } + //显示的文本 + private string _codeText; + + private TextureRect _icon; + private RichTextLabel _text; + private ColorRect _bgColor; + + public override void _Ready() + { + _icon = GetNode("Icon"); + _text = GetNode("Text"); + _bgColor = GetNode("BgColor"); + } + + public void SetText() + { + + } + + /// + /// 设置成活动状态 + /// + internal void SetActive(bool active) + { + _bgColor.Color = active ? ActiveColor : UnActiveColor; + } + + //设置代码类型 + private void SetCodeType(CodeHintType type) + { + _codeType = type; + } + + //设置代码文本 + private void SetCodeText(string code) + { + _codeText = code; + _text.BbcodeText = code; + } + + //点击时调用 + private void _on_click() + { + CodeHintPanel.Instance.ActiveIndex = Index; + } + } +} diff --git a/DungeonShooting_Godot/editor/src/CodeHintPanel.cs b/DungeonShooting_Godot/editor/src/CodeHintPanel.cs new file mode 100644 index 0000000..d6de290 --- /dev/null +++ b/DungeonShooting_Godot/editor/src/CodeHintPanel.cs @@ -0,0 +1,118 @@ +using System.Collections.Generic; +using Godot; + +namespace DScript.GodotEditor +{ + /// + /// 代码补全提示 + /// + public class CodeHintPanel : Popup + { + //补全选项 + [Export] private PackedScene CodeHintItem; + + /// + /// 获取实例 + /// + public static CodeHintPanel Instance { get; private set; } + + /// + /// 当前选提示组件活动的项 + /// + public int ActiveIndex + { + get => _activeIndex; + set => SetActiveIndex(value); + } + private int _activeIndex = -1; + + //提示项父容器 + private VBoxContainer _itemContainer; + + //当前已启用项的列表 + private List _activeItemList = new List(); + + public CodeHintPanel() + { + Instance = this; + } + + public override void _Ready() + { + _itemContainer = GetNode("ScrollContainer/VBoxContainer"); + + for (int i = 0; i < 10; i++) + { + var item = CreateItem(); + item.CodeText = i.ToString(); + } + } + + public override void _Process(float delta) + { + if (Input.IsActionJustPressed("ui_down") && _activeItemList.Count > 1) //按下下键 + { + var index = ActiveIndex; + index += 1; + if (index >= _activeItemList.Count) + { + index = 0; + } + + ActiveIndex = index; + } + else if (Input.IsActionJustPressed("ui_up") && _activeItemList.Count > 1) //按下上键 + { + var index = ActiveIndex; + index -= 1; + if (index < 0) + { + index = _activeItemList.Count - 1; + } + + ActiveIndex = index; + } + } + + /// + /// 显示提示面板 + /// + public void ShowPanel(Vector2 pos) + { + RectPosition = pos; + Popup_(); + } + + /// + /// 设置活动项 + /// + private void SetActiveIndex(int index) + { + //禁用之前的 + if (_activeIndex >= 0 && _activeIndex < _activeItemList.Count) + { + _activeItemList[_activeIndex].SetActive(false); + } + + _activeIndex = index; + + //启用现在的 + if (index >= 0 && index < _activeItemList.Count) + { + _activeItemList[index].SetActive(true); + } + } + + /// + /// 创建提示项 + /// + private CodeHintItem CreateItem() + { + var item = CodeHintItem.Instance(); + _itemContainer.AddChild(item); + item.Index = _activeItemList.Count; + _activeItemList.Add(item); + return item; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/editor/src/CodeHintType.cs b/DungeonShooting_Godot/editor/src/CodeHintType.cs new file mode 100644 index 0000000..9a8eed0 --- /dev/null +++ b/DungeonShooting_Godot/editor/src/CodeHintType.cs @@ -0,0 +1,38 @@ +namespace DScript.GodotEditor +{ + + /// + /// 用于区分代码提示项的类型 + /// + public enum CodeHintType + { + /// + /// 关键字 + /// + Keyword, + /// + /// 命名空间 + /// + Namespace, + /// + /// 类 + /// + Class, + /// + /// 枚举 + /// + Enum, + /// + /// 函数 + /// + Function, + /// + /// 变量 + /// + Variable, + /// + /// 字段 + /// + Field, + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/editor/src/CodePanel.cs b/DungeonShooting_Godot/editor/src/CodePanel.cs index 3775d1f..0202a55 100644 --- a/DungeonShooting_Godot/editor/src/CodePanel.cs +++ b/DungeonShooting_Godot/editor/src/CodePanel.cs @@ -1,6 +1,6 @@ using Godot; -namespace Editor +namespace DScript.GodotEditor { public class CodePanel : Control { @@ -8,38 +8,47 @@ /// 初始缩放 /// public Vector2 StartScale { get; private set; } - - private Control ScalePanel; + + //缩放面板 + private Control _scalePanel; + //绘制组件 private TextEditPainter _editPainter; - + //文本编辑节点 private CodeTextEditor _codeTextEditor; - - + + public override void _Ready() { _codeTextEditor = GetNode("ScalePanel/TextEdit"); _editPainter = _codeTextEditor.GetNode("TextEditPainter"); - - ScalePanel = GetNode("ScalePanel"); - StartScale = ScalePanel.RectScale; - + + _scalePanel = GetNode("ScalePanel"); + StartScale = _scalePanel.RectScale; + _editPainter.SetIdePanel(this); _editPainter.SetTextEdit(_codeTextEditor); - + + //刷新大小 _on_ScalePanel_resized(); + + //缩放代码提示面板 + CodeHintPanel.Instance.RectScale = StartScale; } public override void _Process(float delta) { _editPainter.Update(); } - + + /// + /// 连接信号, 当面板调整大小时调用 + /// private void _on_ScalePanel_resized() { //更新textEditor的缩放 - if (ScalePanel != null) + if (_scalePanel != null) { - ScalePanel.SetSize(RectSize / StartScale); + _scalePanel.SetSize(RectSize / StartScale); } } } diff --git a/DungeonShooting_Godot/editor/src/CodeTextEditor.cs b/DungeonShooting_Godot/editor/src/CodeTextEditor.cs index 11954c9..21dda1f 100644 --- a/DungeonShooting_Godot/editor/src/CodeTextEditor.cs +++ b/DungeonShooting_Godot/editor/src/CodeTextEditor.cs @@ -1,7 +1,7 @@ using Godot; using File = System.IO.File; -namespace Editor +namespace DScript.GodotEditor { public class CodeTextEditor : TextEdit { @@ -92,18 +92,21 @@ { if (Input.IsMouseButtonPressed((int)ButtonList.Right)) { - GD.Print(GetTotalVisibleRows()); _editPainter.DrawTextEditErrorLine(CursorGetLine()); + CodeHintPanel.Instance.ShowPanel(_editPainter.ToPainterPosition(GetPosAtLineColumn(CursorGetLine(), 0))); + CodeHintPanel.Instance.ActiveIndex = 1; } } + /// + /// 连接信号, 当文本改变时调用 + /// private void _on_TextEdit_text_changed() { var newLength = Text.Length; if (newLength != prevTextLength) { //括号补全 - if (newLength > prevTextLength) { var line = CursorGetLine(); diff --git a/DungeonShooting_Godot/editor/src/HintItem.cs b/DungeonShooting_Godot/editor/src/HintItem.cs deleted file mode 100644 index 3ac95c6..0000000 --- a/DungeonShooting_Godot/editor/src/HintItem.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Godot; - -public class HintItem : Button -{ - - - - //点击时调用 - private void _on_click() - { - GD.Print("点击按钮"); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/editor/src/HintPanel.cs b/DungeonShooting_Godot/editor/src/HintPanel.cs deleted file mode 100644 index 22f2dd0..0000000 --- a/DungeonShooting_Godot/editor/src/HintPanel.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Godot; - -public class HintPanel : Popup -{ - public override void _Ready() - { - CallDeferred("popup"); - //Popup_(); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/editor/src/TextEditPainter.cs b/DungeonShooting_Godot/editor/src/TextEditPainter.cs index 06c13a3..3e9eb61 100644 --- a/DungeonShooting_Godot/editor/src/TextEditPainter.cs +++ b/DungeonShooting_Godot/editor/src/TextEditPainter.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Godot; -namespace Editor +namespace DScript.GodotEditor { /// /// 负责代码编辑器内的绘制操作 @@ -59,7 +59,7 @@ { if (_codePanel != null) { - return v / _codePanel.StartScale; + return v * _codePanel.StartScale; } return v; diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index a2124e1..ba1839d 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=58 format=2] +[gd_resource type="Theme" load_steps=77 format=2] [sub_resource type="StyleBoxFlat" id=1] content_margin_left = 6.0 @@ -348,13 +348,135 @@ [sub_resource type="StyleBoxFlat" id=53] bg_color = Color( 0.260588, 0.156863, 0.724706, 0.8 ) +[sub_resource type="ImageTexture" id=58] + +[sub_resource type="Image" id=59] +data = { +"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), +"format": "RGBA8", +"height": 12, +"mipmaps": false, +"width": 12 +} + +[sub_resource type="ImageTexture" id=60] +flags = 0 +flags = 0 +image = SubResource( 59 ) +size = Vector2( 12, 12 ) + +[sub_resource type="StyleBoxTexture" id=61] +content_margin_left = 2.0 +content_margin_right = 2.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +texture = SubResource( 60 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 6.0 +margin_right = 6.0 +margin_top = 6.0 +margin_bottom = 6.0 + +[sub_resource type="Image" id=62] +data = { +"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), +"format": "RGBA8", +"height": 12, +"mipmaps": false, +"width": 12 +} + +[sub_resource type="ImageTexture" id=63] +flags = 0 +flags = 0 +image = SubResource( 62 ) +size = Vector2( 12, 12 ) + +[sub_resource type="StyleBoxTexture" id=64] +content_margin_left = 2.0 +content_margin_right = 2.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +texture = SubResource( 63 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 5.0 +margin_right = 5.0 +margin_top = 5.0 +margin_bottom = 5.0 + +[sub_resource type="Image" id=65] +data = { +"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), +"format": "RGBA8", +"height": 12, +"mipmaps": false, +"width": 12 +} + +[sub_resource type="ImageTexture" id=66] +flags = 0 +flags = 0 +image = SubResource( 65 ) +size = Vector2( 12, 12 ) + +[sub_resource type="StyleBoxTexture" id=67] +content_margin_left = 2.0 +content_margin_right = 2.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +texture = SubResource( 66 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 6.0 +margin_right = 6.0 +margin_top = 6.0 +margin_bottom = 6.0 + +[sub_resource type="Image" id=68] +data = { +"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), +"format": "RGBA8", +"height": 12, +"mipmaps": false, +"width": 12 +} + +[sub_resource type="ImageTexture" id=69] +flags = 0 +flags = 0 +image = SubResource( 68 ) +size = Vector2( 12, 12 ) + +[sub_resource type="StyleBoxTexture" id=70] +content_margin_left = 0.0 +content_margin_right = 0.0 +content_margin_top = 0.0 +content_margin_bottom = 0.0 +texture = SubResource( 69 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 5.0 +margin_right = 5.0 +margin_top = 5.0 +margin_bottom = 5.0 + +[sub_resource type="StyleBoxTexture" id=71] +content_margin_left = 0.0 +content_margin_right = 0.0 +content_margin_top = 0.0 +content_margin_bottom = 0.0 +texture = SubResource( 69 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 5.0 +margin_right = 5.0 +margin_top = 5.0 +margin_bottom = 5.0 + [sub_resource type="StyleBoxEmpty" id=54] content_margin_left = 4.0 content_margin_right = 4.0 content_margin_top = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id=58] +[sub_resource type="Image" id=72] data = { "data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), "format": "RGBA8", @@ -366,7 +488,7 @@ [sub_resource type="ImageTexture" id=56] flags = 0 flags = 0 -image = SubResource( 58 ) +image = SubResource( 72 ) size = Vector2( 16, 16 ) [sub_resource type="StyleBoxFlat" id=57] @@ -376,6 +498,66 @@ content_margin_bottom = 4.0 bg_color = Color( 0.0705882, 0.0705882, 0.0705882, 1 ) +[sub_resource type="StyleBoxTexture" id=73] +content_margin_left = 2.0 +content_margin_right = 2.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +texture = SubResource( 60 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 6.0 +margin_right = 6.0 +margin_top = 6.0 +margin_bottom = 6.0 + +[sub_resource type="StyleBoxTexture" id=74] +content_margin_left = 2.0 +content_margin_right = 2.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +texture = SubResource( 63 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 5.0 +margin_right = 5.0 +margin_top = 5.0 +margin_bottom = 5.0 + +[sub_resource type="StyleBoxTexture" id=75] +content_margin_left = 2.0 +content_margin_right = 2.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +texture = SubResource( 66 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 6.0 +margin_right = 6.0 +margin_top = 6.0 +margin_bottom = 6.0 + +[sub_resource type="StyleBoxTexture" id=76] +content_margin_left = 0.0 +content_margin_right = 0.0 +content_margin_top = 0.0 +content_margin_bottom = 0.0 +texture = SubResource( 69 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 5.0 +margin_right = 5.0 +margin_top = 5.0 +margin_bottom = 5.0 + +[sub_resource type="StyleBoxTexture" id=77] +content_margin_left = 0.0 +content_margin_right = 0.0 +content_margin_top = 0.0 +content_margin_bottom = 0.0 +texture = SubResource( 69 ) +region_rect = Rect2( 0, 0, 12, 12 ) +margin_left = 5.0 +margin_right = 5.0 +margin_top = 5.0 +margin_bottom = 5.0 + [resource] Button/colors/font_color = Color( 0.780392, 0.780392, 0.780392, 1 ) Button/colors/font_color_disabled = Color( 1, 1, 1, 0.3 ) @@ -469,6 +651,17 @@ Editor/styles/sub_inspector_property_bg_selected7 = SubResource( 51 ) Editor/styles/sub_inspector_property_bg_selected8 = SubResource( 52 ) Editor/styles/sub_inspector_property_bg_selected9 = SubResource( 53 ) +HScrollBar/icons/decrement = SubResource( 58 ) +HScrollBar/icons/decrement_highlight = SubResource( 58 ) +HScrollBar/icons/decrement_pressed = SubResource( 58 ) +HScrollBar/icons/increment = SubResource( 58 ) +HScrollBar/icons/increment_highlight = SubResource( 58 ) +HScrollBar/icons/increment_pressed = SubResource( 58 ) +HScrollBar/styles/grabber = SubResource( 61 ) +HScrollBar/styles/grabber_highlight = SubResource( 64 ) +HScrollBar/styles/grabber_pressed = SubResource( 67 ) +HScrollBar/styles/scroll = SubResource( 70 ) +HScrollBar/styles/scroll_focus = SubResource( 71 ) Label/colors/font_color = Color( 0.780392, 0.780392, 0.780392, 1 ) Label/colors/font_color_shadow = Color( 0, 0, 0, 0 ) Label/colors/font_outline_modulate = Color( 1, 1, 1, 1 ) @@ -486,8 +679,21 @@ LineEdit/colors/font_color_uneditable = Color( 1, 1, 1, 0.65 ) LineEdit/colors/read_only = Color( 1, 1, 1, 0.3 ) LineEdit/colors/selection_color = Color( 0.117647, 0.431373, 0.905882, 0.4 ) +LineEdit/constants/minimum_spaces = 12 +LineEdit/fonts/font = null LineEdit/icons/clear = SubResource( 56 ) LineEdit/styles/focus = SubResource( 2 ) LineEdit/styles/normal = SubResource( 4 ) LineEdit/styles/read_only = SubResource( 1 ) Panel/styles/panel = SubResource( 57 ) +VScrollBar/icons/decrement = SubResource( 58 ) +VScrollBar/icons/decrement_highlight = SubResource( 58 ) +VScrollBar/icons/decrement_pressed = SubResource( 58 ) +VScrollBar/icons/increment = SubResource( 58 ) +VScrollBar/icons/increment_highlight = SubResource( 58 ) +VScrollBar/icons/increment_pressed = SubResource( 58 ) +VScrollBar/styles/grabber = SubResource( 73 ) +VScrollBar/styles/grabber_highlight = SubResource( 74 ) +VScrollBar/styles/grabber_pressed = SubResource( 75 ) +VScrollBar/styles/scroll = SubResource( 76 ) +VScrollBar/styles/scroll_focus = SubResource( 77 ) diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index 71af9f1..7067b37 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -1,9 +1,16 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://editor/prefabs/CodePanel.tscn" type="PackedScene" id=1] +[ext_resource path="res://editor/prefabs/CodeHintPanel.tscn" type="PackedScene" id=2] [node name="Main" type="Node2D"] [node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CodePanel" parent="CanvasLayer" instance=ExtResource( 1 )] + +[node name="CodeHintPanel" parent="CanvasLayer" instance=ExtResource( 2 )] +margin_left = 200.0 +margin_top = 135.0 +margin_right = 473.0 +margin_bottom = 265.0