1- [gd_scene load_steps =4 format =3 uid ="uid://1cywl1qtanq3" ]
1+ [gd_scene load_steps =7 format =3 uid ="uid://1cywl1qtanq3" ]
22
33[ext_resource type ="Script" path ="res://main.gd" id ="1" ]
4+ [ext_resource type ="Texture2D" uid ="uid://dnhldrc8cymrs" path ="res://pixel_art_example.webp" id ="2_mfq7n" ]
5+ [ext_resource type ="Texture2D" uid ="uid://cok02ms2cxmut" path ="res://pixel_art_text_example.webp" id ="3_0qxym" ]
6+ [ext_resource type ="Texture2D" uid ="uid://c43k4wledw7py" path ="res://pixel_art_checkerboard_example.webp" id ="3_unurd" ]
47
58[sub_resource type ="StyleBoxFlat" id ="StyleBoxFlat_vvbdh" ]
69draw_center = false
@@ -107,6 +110,61 @@ grow_horizontal = 0
107110grow_vertical = 0
108111color = Color (1 , 1 , 1 , 0.25098 )
109112
113+ [node name ="PixelArtExample" type ="TextureRect" parent ="Panel/AspectRatioContainer/Panel" ]
114+ texture_filter = 1
115+ layout_mode = 1
116+ anchors_preset = 1
117+ anchor_left = 1.0
118+ anchor_right = 1.0
119+ offset_left = -88.0
120+ offset_top = 16.0
121+ offset_right = -56.0
122+ offset_bottom = 48.0
123+ grow_horizontal = 0
124+ texture = ExtResource ("2_mfq7n" )
125+
126+ [node name ="PixelArtExample2" type ="TextureRect" parent ="Panel/AspectRatioContainer/Panel" ]
127+ texture_filter = 1
128+ layout_mode = 1
129+ anchors_preset = 1
130+ anchor_left = 1.0
131+ anchor_right = 1.0
132+ offset_left = -48.0
133+ offset_top = 16.0
134+ offset_right = -16.0
135+ offset_bottom = 48.0
136+ grow_horizontal = 0
137+ rotation = 0.785398
138+ pivot_offset = Vector2 (16 , 16 )
139+ texture = ExtResource ("2_mfq7n" )
140+
141+ [node name ="PixelArtCheckerboardExample" type ="TextureRect" parent ="Panel/AspectRatioContainer/Panel" ]
142+ modulate = Color (1 , 1 , 1 , 0.752941 )
143+ texture_filter = 1
144+ layout_mode = 1
145+ anchors_preset = 1
146+ anchor_left = 1.0
147+ anchor_right = 1.0
148+ offset_left = -136.0
149+ offset_top = 16.0
150+ offset_right = -104.0
151+ offset_bottom = 48.0
152+ grow_horizontal = 0
153+ texture = ExtResource ("3_unurd" )
154+
155+ [node name ="PixelArtTextExample" type ="TextureRect" parent ="Panel/AspectRatioContainer/Panel" ]
156+ texture_filter = 1
157+ layout_mode = 1
158+ anchors_preset = 1
159+ anchor_left = 1.0
160+ anchor_right = 1.0
161+ offset_left = -215.0
162+ offset_top = 56.0
163+ offset_right = -16.0
164+ offset_bottom = 75.0
165+ grow_horizontal = 0
166+ texture = ExtResource ("3_0qxym" )
167+
110168[node name ="CenterContainer" type ="CenterContainer" parent ="Panel/AspectRatioContainer/Panel" ]
111169layout_mode = 1
112170anchors_preset = 15
@@ -130,6 +188,7 @@ horizontal_alignment = 1
130188layout_mode = 2
131189
132190[node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowBaseSize" ]
191+ custom_minimum_size = Vector2 (220 , 0 )
133192layout_mode = 2
134193text = "Window Base Size"
135194
@@ -159,6 +218,7 @@ popup/item_7/id = 7
159218layout_mode = 2
160219
161220[node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchMode" ]
221+ custom_minimum_size = Vector2 (220 , 0 )
162222layout_mode = 2
163223text = "Window Stretch Mode"
164224
@@ -178,6 +238,7 @@ popup/item_2/id = 2
178238layout_mode = 2
179239
180240[node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchAspect" ]
241+ custom_minimum_size = Vector2 (220 , 0 )
181242layout_mode = 2
182243text = "Window Stretch Aspect"
183244
@@ -201,6 +262,7 @@ popup/item_4/id = 4
201262layout_mode = 2
202263
203264[node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowScaleFactor" ]
265+ custom_minimum_size = Vector2 (220 , 0 )
204266layout_mode = 2
205267text = "Window Scale Factor"
206268
@@ -218,13 +280,32 @@ layout_mode = 2
218280size_flags_horizontal = 3
219281text = "100%"
220282
283+ [node name ="WindowStretchScaleMode" type ="HBoxContainer" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options" ]
284+ layout_mode = 2
285+
286+ [node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchScaleMode" ]
287+ custom_minimum_size = Vector2 (220 , 0 )
288+ layout_mode = 2
289+ text = "Window Stretch Scale Mode"
290+
291+ [node name ="OptionButton" type ="OptionButton" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchScaleMode" ]
292+ layout_mode = 2
293+ size_flags_horizontal = 3
294+ item_count = 2
295+ selected = 0
296+ popup/item_0/text = "Fractional"
297+ popup/item_0/id = 0
298+ popup/item_1/text = "Integer"
299+ popup/item_1/id = 1
300+
221301[node name ="HSeparator" type ="HSeparator" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options" ]
222302layout_mode = 2
223303
224304[node name ="GUIMaxAspectRatio" type ="HBoxContainer" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options" ]
225305layout_mode = 2
226306
227307[node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/GUIMaxAspectRatio" ]
308+ custom_minimum_size = Vector2 (220 , 0 )
228309layout_mode = 2
229310text = "GUI Max Aspect Ratio"
230311
@@ -252,6 +333,7 @@ popup/item_6/id = 6
252333layout_mode = 2
253334
254335[node name ="Label" type ="Label" parent ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/GUIMargin" ]
336+ custom_minimum_size = Vector2 (220 , 0 )
255337layout_mode = 2
256338text = "GUI Margin"
257339
@@ -270,5 +352,6 @@ text = "0"
270352[connection signal ="item_selected" from ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchMode/OptionButton" to ="." method ="_on_window_stretch_mode_item_selected" ]
271353[connection signal ="item_selected" from ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchAspect/OptionButton" to ="." method ="_on_window_stretch_aspect_item_selected" ]
272354[connection signal ="drag_ended" from ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowScaleFactor/HSlider" to ="." method ="_on_window_scale_factor_drag_ended" ]
355+ [connection signal ="item_selected" from ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/WindowStretchScaleMode/OptionButton" to ="." method ="_on_window_stretch_scale_mode_item_selected" ]
273356[connection signal ="item_selected" from ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/GUIMaxAspectRatio/OptionButton" to ="." method ="_on_gui_aspect_ratio_item_selected" ]
274357[connection signal ="drag_ended" from ="Panel/AspectRatioContainer/Panel/CenterContainer/Options/GUIMargin/HSlider" to ="." method ="_on_gui_margin_drag_ended" ]
0 commit comments