main.tscn 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. [gd_scene load_steps=7 format=2]
  2. [ext_resource path="res://main.gd" type="Script" id=1]
  3. [ext_resource path="res://noto_sans_ui_regular.tres" type="DynamicFontData" id=2]
  4. [sub_resource type="DynamicFont" id=3]
  5. size = 14
  6. font_data = ExtResource( 2 )
  7. [sub_resource type="Theme" id=4]
  8. default_font = SubResource( 3 )
  9. [sub_resource type="StyleBoxFlat" id=1]
  10. draw_center = false
  11. border_width_left = 4
  12. border_width_top = 4
  13. border_width_right = 4
  14. border_width_bottom = 4
  15. border_color = Color( 0.501961, 1, 0.25098, 0.501961 )
  16. [sub_resource type="StyleBoxFlat" id=2]
  17. draw_center = false
  18. border_width_left = 8
  19. border_width_top = 8
  20. border_width_right = 8
  21. border_width_bottom = 8
  22. border_color = Color( 0.25098, 0.376471, 1, 0.501961 )
  23. [node name="Main" type="Control"]
  24. anchor_right = 1.0
  25. anchor_bottom = 1.0
  26. theme = SubResource( 4 )
  27. script = ExtResource( 1 )
  28. [node name="OuterSideLabel" type="Label" parent="."]
  29. modulate = Color( 1, 1, 1, 0.627451 )
  30. anchor_top = 0.5
  31. anchor_bottom = 0.5
  32. margin_left = 11.0
  33. margin_top = -47.0
  34. margin_right = 140.0
  35. margin_bottom = -16.0
  36. text = "Outer Side Label
  37. (ignores all margins)"
  38. [node name="Panel" type="Panel" parent="."]
  39. anchor_right = 1.0
  40. anchor_bottom = 1.0
  41. custom_styles/panel = SubResource( 1 )
  42. [node name="InnerSideLabel" type="Label" parent="Panel"]
  43. modulate = Color( 0.666667, 1, 0.501961, 1 )
  44. anchor_top = 0.5
  45. anchor_bottom = 0.5
  46. margin_left = 11.0
  47. margin_top = 16.5
  48. margin_right = 209.0
  49. margin_bottom = 47.5
  50. text = "Inner Side Label
  51. (ignores GUI Max Aspect Ratio)"
  52. [node name="AspectRatioContainer" type="AspectRatioContainer" parent="Panel"]
  53. anchor_right = 1.0
  54. anchor_bottom = 1.0
  55. [node name="ColorRect" type="Panel" parent="Panel/AspectRatioContainer"]
  56. margin_right = 648.0
  57. margin_bottom = 648.0
  58. custom_styles/panel = SubResource( 2 )
  59. [node name="TopLeft" type="ColorRect" parent="Panel/AspectRatioContainer/ColorRect"]
  60. margin_right = 64.0
  61. margin_bottom = 64.0
  62. color = Color( 1, 1, 1, 0.25098 )
  63. [node name="TopRight" type="ColorRect" parent="Panel/AspectRatioContainer/ColorRect"]
  64. anchor_left = 1.0
  65. anchor_right = 1.0
  66. margin_left = -64.0
  67. margin_bottom = 64.0
  68. color = Color( 1, 1, 1, 0.25098 )
  69. [node name="BottomLeft" type="ColorRect" parent="Panel/AspectRatioContainer/ColorRect"]
  70. anchor_top = 1.0
  71. anchor_bottom = 1.0
  72. margin_top = -64.0
  73. margin_right = 64.0
  74. color = Color( 1, 1, 1, 0.25098 )
  75. [node name="BottomRight" type="ColorRect" parent="Panel/AspectRatioContainer/ColorRect"]
  76. anchor_left = 1.0
  77. anchor_top = 1.0
  78. anchor_right = 1.0
  79. anchor_bottom = 1.0
  80. margin_left = -64.0
  81. margin_top = -64.0
  82. color = Color( 1, 1, 1, 0.25098 )
  83. [node name="CenterContainer" type="CenterContainer" parent="Panel/AspectRatioContainer/ColorRect"]
  84. anchor_right = 1.0
  85. anchor_bottom = 1.0
  86. __meta__ = {
  87. "_edit_lock_": true
  88. }
  89. [node name="Options" type="VBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer"]
  90. margin_left = 167.0
  91. margin_top = 187.0
  92. margin_right = 481.0
  93. margin_bottom = 460.0
  94. rect_min_size = Vector2( 300, 0 )
  95. custom_constants/separation = 15
  96. [node name="Title" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  97. margin_right = 314.0
  98. margin_bottom = 20.0
  99. custom_colors/font_color = Color( 1, 0.866667, 0.615686, 1 )
  100. text = "Options"
  101. align = 1
  102. [node name="WindowBaseSize" type="HBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  103. margin_top = 35.0
  104. margin_right = 314.0
  105. margin_bottom = 61.0
  106. custom_constants/separation = 15
  107. [node name="Label" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowBaseSize"]
  108. margin_top = 3.0
  109. margin_right = 150.0
  110. margin_bottom = 23.0
  111. rect_min_size = Vector2( 150, 0 )
  112. text = "Window Base Size"
  113. [node name="OptionButton" type="OptionButton" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowBaseSize"]
  114. margin_left = 165.0
  115. margin_right = 314.0
  116. margin_bottom = 26.0
  117. size_flags_horizontal = 3
  118. text = "648×648 (1:1)"
  119. items = [ "648×648 (1:1)", null, false, 0, null, "640×480 (4:3)", null, false, 1, null, "720×480 (3:2)", null, false, 2, null, "800×600 (4:3)", null, false, 3, null, "1152×648 (16:9)", null, false, 5, null, "1280×720 (16:9)", null, false, 6, null, "1280×800 (16:10)", null, false, 7, null, "1680×720 (21:9)", null, false, 8, null ]
  120. selected = 0
  121. [node name="WindowStretchMode" type="HBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  122. margin_top = 76.0
  123. margin_right = 314.0
  124. margin_bottom = 102.0
  125. custom_constants/separation = 15
  126. [node name="Label" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowStretchMode"]
  127. margin_top = 3.0
  128. margin_right = 150.0
  129. margin_bottom = 23.0
  130. rect_min_size = Vector2( 150, 0 )
  131. text = "Window Stretch Mode"
  132. [node name="OptionButton" type="OptionButton" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowStretchMode"]
  133. margin_left = 165.0
  134. margin_right = 314.0
  135. margin_bottom = 26.0
  136. size_flags_horizontal = 3
  137. text = "2D (Canvas Items)"
  138. items = [ "Disabled", null, false, 0, null, "2D (Canvas Items)", null, false, 1, null, "Viewport", null, false, 2, null ]
  139. selected = 1
  140. [node name="WindowStretchAspect" type="HBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  141. margin_top = 117.0
  142. margin_right = 314.0
  143. margin_bottom = 143.0
  144. custom_constants/separation = 15
  145. [node name="Label" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowStretchAspect"]
  146. margin_top = 3.0
  147. margin_right = 155.0
  148. margin_bottom = 23.0
  149. rect_min_size = Vector2( 150, 0 )
  150. text = "Window Stretch Aspect"
  151. [node name="OptionButton" type="OptionButton" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowStretchAspect"]
  152. margin_left = 170.0
  153. margin_right = 314.0
  154. margin_bottom = 26.0
  155. size_flags_horizontal = 3
  156. text = "Expand"
  157. items = [ "Ignore (Distort)", null, false, 0, null, "Keep (Black Bars)", null, false, 1, null, "Keep Width", null, false, 2, null, "Keep Height", null, false, 3, null, "Expand", null, false, 4, null ]
  158. selected = 4
  159. [node name="WindowScaleFactor" type="HBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  160. margin_top = 158.0
  161. margin_right = 314.0
  162. margin_bottom = 178.0
  163. custom_constants/separation = 15
  164. [node name="Label" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowScaleFactor"]
  165. margin_right = 150.0
  166. margin_bottom = 20.0
  167. rect_min_size = Vector2( 150, 0 )
  168. text = "Window Scale Factor"
  169. [node name="HSlider" type="HSlider" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowScaleFactor"]
  170. margin_left = 165.0
  171. margin_right = 263.0
  172. margin_bottom = 16.0
  173. size_flags_horizontal = 3
  174. size_flags_stretch_ratio = 100.0
  175. min_value = 0.75
  176. max_value = 2.0
  177. step = 0.01
  178. value = 1.0
  179. [node name="Value" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowScaleFactor"]
  180. margin_left = 278.0
  181. margin_right = 314.0
  182. margin_bottom = 20.0
  183. size_flags_horizontal = 3
  184. text = "100%"
  185. [node name="HSeparator" type="HSeparator" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  186. margin_top = 193.0
  187. margin_right = 314.0
  188. margin_bottom = 197.0
  189. [node name="GUIMaxAspectRatio" type="HBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  190. margin_top = 212.0
  191. margin_right = 314.0
  192. margin_bottom = 238.0
  193. custom_constants/separation = 15
  194. [node name="Label" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMaxAspectRatio"]
  195. margin_top = 3.0
  196. margin_right = 150.0
  197. margin_bottom = 23.0
  198. rect_min_size = Vector2( 150, 0 )
  199. text = "GUI Max Aspect Ratio"
  200. [node name="OptionButton" type="OptionButton" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMaxAspectRatio"]
  201. margin_left = 165.0
  202. margin_right = 314.0
  203. margin_bottom = 26.0
  204. size_flags_horizontal = 3
  205. text = "Fit to Window"
  206. items = [ "Fit to Window", null, false, 0, null, "5:4", null, false, 1, null, "4:3", null, false, 2, null, "3:2", null, false, 3, null, "16:10", null, false, 4, null, "16:9", null, false, 5, null, "21:9", null, false, 6, null ]
  207. selected = 0
  208. [node name="GUIMargin" type="HBoxContainer" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options"]
  209. margin_top = 253.0
  210. margin_right = 314.0
  211. margin_bottom = 273.0
  212. custom_constants/separation = 15
  213. [node name="Label" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMargin"]
  214. margin_right = 150.0
  215. margin_bottom = 20.0
  216. rect_min_size = Vector2( 150, 0 )
  217. text = "GUI Margin"
  218. [node name="HSlider" type="HSlider" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMargin"]
  219. margin_left = 165.0
  220. margin_right = 291.0
  221. margin_bottom = 16.0
  222. size_flags_horizontal = 3
  223. size_flags_stretch_ratio = 100.0
  224. max_value = 50.0
  225. [node name="Value" type="Label" parent="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMargin"]
  226. margin_left = 306.0
  227. margin_right = 314.0
  228. margin_bottom = 20.0
  229. size_flags_horizontal = 3
  230. text = "0"
  231. [connection signal="item_selected" from="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowBaseSize/OptionButton" to="." method="_on_window_base_size_item_selected"]
  232. [connection signal="item_selected" from="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowStretchMode/OptionButton" to="." method="_on_window_stretch_mode_item_selected"]
  233. [connection signal="item_selected" from="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowStretchAspect/OptionButton" to="." method="_on_window_stretch_aspect_item_selected"]
  234. [connection signal="drag_ended" from="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/WindowScaleFactor/HSlider" to="." method="_on_window_scale_factor_drag_ended"]
  235. [connection signal="item_selected" from="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMaxAspectRatio/OptionButton" to="." method="_on_gui_aspect_ratio_item_selected"]
  236. [connection signal="drag_ended" from="Panel/AspectRatioContainer/ColorRect/CenterContainer/Options/GUIMargin/HSlider" to="." method="_on_gui_margin_drag_ended"]