Newer
Older
DungeonShooting / DungeonShooting_Godot / editor / prefabs / CodePanel.tscn
@lijincheng lijincheng on 22 Sep 2022 1 KB 文本编辑器绘制光标
  1. [gd_scene load_steps=5 format=2]
  2.  
  3. [ext_resource path="res://editor/src/CodeTextEditor.cs" type="Script" id=1]
  4. [ext_resource path="res://editor/ide_cn_font_6.tres" type="DynamicFont" id=2]
  5. [ext_resource path="res://editor/src/CodePanel.cs" type="Script" id=3]
  6. [ext_resource path="res://editor/src/TextEditPainter.cs" type="Script" id=4]
  7.  
  8. [node name="CodePanel" type="Control"]
  9. anchor_right = 1.0
  10. anchor_bottom = 1.0
  11. script = ExtResource( 3 )
  12.  
  13. [node name="ScalePanel" type="Control" parent="."]
  14. anchor_right = 1.0
  15. anchor_bottom = 1.0
  16. margin_right = 720.0
  17. margin_bottom = 405.0
  18. rect_scale = Vector2( 0.4, 0.4 )
  19.  
  20. [node name="TextEdit" type="TextEdit" parent="ScalePanel"]
  21. anchor_right = 1.0
  22. anchor_bottom = 1.0
  23. custom_colors/member_variable_color = Color( 0.862745, 0.862745, 0.862745, 1 )
  24. custom_colors/function_color = Color( 0.862745, 0.862745, 0.666667, 1 )
  25. custom_colors/safe_line_number_color = Color( 1, 0.164706, 0.141176, 1 )
  26. custom_colors/caret_color = Color( 0, 0, 0, 0 )
  27. custom_colors/background_color = Color( 0.117647, 0.117647, 0.117647, 1 )
  28. custom_colors/number_color = Color( 0.709804, 0.807843, 0.658824, 1 )
  29. custom_colors/current_line_color = Color( 0.0588235, 0.0588235, 0.0588235, 1 )
  30. custom_constants/line_spacing = 0
  31. custom_fonts/font = ExtResource( 2 )
  32. highlight_current_line = true
  33. syntax_highlighting = true
  34. show_line_numbers = true
  35. draw_tabs = true
  36. bookmark_gutter = true
  37. fold_gutter = true
  38. context_menu_enabled = false
  39. deselect_on_focus_loss_enabled = false
  40. minimap_draw = true
  41. script = ExtResource( 1 )
  42.  
  43. [node name="TextEditPainter" type="Node2D" parent="ScalePanel/TextEdit"]
  44. script = ExtResource( 4 )
  45.  
  46. [connection signal="resized" from="ScalePanel" to="." method="_on_ScalePanel_resized"]
  47. [connection signal="text_changed" from="ScalePanel/TextEdit" to="ScalePanel/TextEdit" method="_on_TextEdit_text_changed"]