main_screen_25d.tscn 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://addons/node25d-cs/main_screen/viewport_25d.gd" type="Script" id=1]
  3. [ext_resource path="res://addons/node25d-cs/main_screen/view_mode_button_group.tres" type="ButtonGroup" id=2]
  4. [sub_resource type="ViewportTexture" id=1]
  5. viewport_path = NodePath("Viewport25D/Viewport2D")
  6. [sub_resource type="ViewportTexture" id=2]
  7. viewport_path = NodePath("Viewport25D/ViewportOverlay")
  8. [node name="MainScreen25D" type="VBoxContainer"]
  9. anchor_right = 1.0
  10. anchor_bottom = 1.0
  11. size_flags_horizontal = 3
  12. size_flags_vertical = 3
  13. __meta__ = {
  14. "_edit_use_anchors_": false
  15. }
  16. [node name="TopBar" type="HBoxContainer" parent="."]
  17. offset_right = 1600.0
  18. offset_bottom = 32.0
  19. rect_min_size = Vector2(0, 32)
  20. size_flags_horizontal = 3
  21. [node name="ViewModeButtons" type="HBoxContainer" parent="TopBar"]
  22. offset_right = 798.0
  23. offset_bottom = 32.0
  24. size_flags_horizontal = 3
  25. [node name="45Degree" type="CheckBox" parent="TopBar/ViewModeButtons"]
  26. offset_right = 94.0
  27. offset_bottom = 32.0
  28. pressed = true
  29. group = ExtResource( 2 )
  30. text = "45 Degree"
  31. __meta__ = {
  32. "_edit_use_anchors_": false
  33. }
  34. [node name="Isometric" type="CheckBox" parent="TopBar/ViewModeButtons"]
  35. offset_left = 98.0
  36. offset_right = 188.0
  37. offset_bottom = 32.0
  38. group = ExtResource( 2 )
  39. text = "Isometric"
  40. __meta__ = {
  41. "_edit_use_anchors_": false
  42. }
  43. [node name="TopDown" type="CheckBox" parent="TopBar/ViewModeButtons"]
  44. offset_left = 192.0
  45. offset_right = 283.0
  46. offset_bottom = 32.0
  47. group = ExtResource( 2 )
  48. text = "Top Down"
  49. __meta__ = {
  50. "_edit_use_anchors_": false
  51. }
  52. [node name="FrontSide" type="CheckBox" parent="TopBar/ViewModeButtons"]
  53. offset_left = 287.0
  54. offset_right = 379.0
  55. offset_bottom = 32.0
  56. group = ExtResource( 2 )
  57. text = "Front Side"
  58. __meta__ = {
  59. "_edit_use_anchors_": false
  60. }
  61. [node name="ObliqueY" type="CheckBox" parent="TopBar/ViewModeButtons"]
  62. offset_left = 383.0
  63. offset_right = 473.0
  64. offset_bottom = 32.0
  65. group = ExtResource( 2 )
  66. text = "Oblique Y"
  67. __meta__ = {
  68. "_edit_use_anchors_": false
  69. }
  70. [node name="ObliqueZ" type="CheckBox" parent="TopBar/ViewModeButtons"]
  71. offset_left = 477.0
  72. offset_right = 568.0
  73. offset_bottom = 32.0
  74. group = ExtResource( 2 )
  75. text = "Oblique Z"
  76. __meta__ = {
  77. "_edit_use_anchors_": false
  78. }
  79. [node name="Zoom" type="HBoxContainer" parent="TopBar"]
  80. offset_left = 802.0
  81. offset_right = 1600.0
  82. offset_bottom = 32.0
  83. size_flags_horizontal = 3
  84. alignment = 2
  85. [node name="ZoomOut" type="Button" parent="TopBar/Zoom"]
  86. offset_left = 680.0
  87. offset_right = 710.0
  88. offset_bottom = 32.0
  89. rect_min_size = Vector2(30, 0)
  90. text = "-"
  91. [node name="ZoomPercent" type="Label" parent="TopBar/Zoom"]
  92. offset_left = 714.0
  93. offset_top = 9.0
  94. offset_right = 764.0
  95. offset_bottom = 23.0
  96. rect_min_size = Vector2(50, 0)
  97. text = "100%"
  98. align = 1
  99. clip_text = true
  100. [node name="ZoomReset" type="Button" parent="TopBar/Zoom/ZoomPercent"]
  101. modulate = Color(1, 1, 1, 0)
  102. anchor_right = 1.0
  103. anchor_bottom = 1.0
  104. __meta__ = {
  105. "_edit_use_anchors_": false
  106. }
  107. [node name="ZoomIn" type="Button" parent="TopBar/Zoom"]
  108. offset_left = 768.0
  109. offset_right = 798.0
  110. offset_bottom = 32.0
  111. rect_min_size = Vector2(30, 0)
  112. text = "+"
  113. [node name="Viewport25D" type="ColorRect" parent="."]
  114. offset_top = 36.0
  115. offset_right = 1600.0
  116. offset_bottom = 900.0
  117. rect_clip_content = true
  118. size_flags_horizontal = 3
  119. size_flags_vertical = 3
  120. color = Color(0.301961, 0.301961, 0.301961, 1)
  121. script = ExtResource( 1 )
  122. [node name="Viewport2D" type="SubViewport" parent="Viewport25D"]
  123. size = Vector2(1600, 864)
  124. transparent_bg = true
  125. disable_3d = true
  126. usage = 1
  127. render_target_v_flip = true
  128. [node name="ViewportOverlay" type="SubViewport" parent="Viewport25D"]
  129. size = Vector2(1600, 864)
  130. transparent_bg = true
  131. disable_3d = true
  132. usage = 1
  133. render_target_v_flip = true
  134. [node name="ViewportTexture" type="TextureRect" parent="Viewport25D"]
  135. anchor_right = 1.0
  136. anchor_bottom = 1.0
  137. texture = SubResource( 1 )
  138. expand = true
  139. __meta__ = {
  140. "_edit_use_anchors_": false
  141. }
  142. [node name="Overlay" type="TextureRect" parent="Viewport25D/ViewportTexture"]
  143. anchor_right = 1.0
  144. anchor_bottom = 1.0
  145. texture = SubResource( 2 )
  146. __meta__ = {
  147. "_edit_use_anchors_": false
  148. }
  149. [connection signal="pressed" from="TopBar/Zoom/ZoomOut" to="Viewport25D" method="_on_ZoomOut_pressed"]
  150. [connection signal="pressed" from="TopBar/Zoom/ZoomPercent/ZoomReset" to="Viewport25D" method="_on_ZoomReset_pressed"]
  151. [connection signal="pressed" from="TopBar/Zoom/ZoomIn" to="Viewport25D" method="_on_ZoomIn_pressed"]