Преглед на файлове

Use a GridContainer in the Drag and Drop demo

Aaron Franke преди 4 години
родител
ревизия
21cbaafb2f
променени са 1 файла, в които са добавени 99 реда и са изтрити 67 реда
  1. 99 67
      gui/drag_and_drop/drag_and_drop.tscn

+ 99 - 67
gui/drag_and_drop/drag_and_drop.tscn

@@ -11,6 +11,7 @@ margin_left = -512.0
 margin_top = -300.0
 margin_right = 512.0
 margin_bottom = 300.0
+rect_pivot_offset = Vector2( 512, 300 )
 size_flags_horizontal = 2
 size_flags_vertical = 2
 __meta__ = {
@@ -19,100 +20,131 @@ __meta__ = {
 }
 
 [node name="Information" type="Label" parent="."]
-margin_left = 250.0
-margin_top = 140.0
-margin_right = 761.0
-margin_bottom = 154.0
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+margin_left = -300.0
+margin_top = -180.0
+margin_right = 300.0
+margin_bottom = -150.0
 size_flags_horizontal = 2
 size_flags_vertical = 0
 text = "Drag colors from button to button, or change button colors and drag them again."
+align = 1
 
-[node name="ColorPickerButton0" type="ColorPickerButton" parent="."]
-margin_left = 304.0
-margin_top = 193.0
-margin_right = 400.0
-margin_bottom = 257.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="GridContainer" type="GridContainer" parent="."]
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+margin_left = -250.0
+margin_top = -150.0
+margin_right = 250.0
+margin_bottom = 200.0
+columns = 3
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="ColorPickerButton0" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 33.0
+margin_top = 25.0
+margin_right = 129.0
+margin_bottom = 89.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0.671032, 0.605183, 0, 1 )
 script = ExtResource( 1 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
 
-[node name="ColorPickerButton1" type="ColorPickerButton" parent="."]
-margin_left = 464.0
-margin_top = 193.0
-margin_right = 560.0
-margin_bottom = 257.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton1" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 201.0
+margin_top = 25.0
+margin_right = 297.0
+margin_bottom = 89.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0, 0.797347, 0.741037, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton2" type="ColorPickerButton" parent="."]
-margin_left = 624.0
-margin_top = 193.0
-margin_right = 720.0
-margin_bottom = 257.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton2" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 369.0
+margin_top = 25.0
+margin_right = 465.0
+margin_bottom = 89.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0.443924, 0, 0.632923, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton3" type="ColorPickerButton" parent="."]
-margin_left = 304.0
-margin_top = 289.0
-margin_right = 400.0
-margin_bottom = 353.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton3" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 33.0
+margin_top = 143.0
+margin_right = 129.0
+margin_bottom = 207.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 1, 1, 1, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton4" type="ColorPickerButton" parent="."]
-margin_left = 464.0
-margin_top = 289.0
-margin_right = 560.0
-margin_bottom = 353.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton4" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 201.0
+margin_top = 143.0
+margin_right = 297.0
+margin_bottom = 207.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 1, 0.933842, 0, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton5" type="ColorPickerButton" parent="."]
-margin_left = 624.0
-margin_top = 289.0
-margin_right = 720.0
-margin_bottom = 353.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton5" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 369.0
+margin_top = 143.0
+margin_right = 465.0
+margin_bottom = 207.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0.287293, 0.886362, 0.122933, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton6" type="ColorPickerButton" parent="."]
-margin_left = 304.0
-margin_top = 385.0
-margin_right = 400.0
-margin_bottom = 449.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton6" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 33.0
+margin_top = 261.0
+margin_right = 129.0
+margin_bottom = 325.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0.908461, 0, 0.88789, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton7" type="ColorPickerButton" parent="."]
-margin_left = 464.0
-margin_top = 385.0
-margin_right = 560.0
-margin_bottom = 449.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton7" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 201.0
+margin_top = 261.0
+margin_right = 297.0
+margin_bottom = 325.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0, 0.283703, 0, 1 )
 script = ExtResource( 1 )
 
-[node name="ColorPickerButton8" type="ColorPickerButton" parent="."]
-margin_left = 624.0
-margin_top = 385.0
-margin_right = 720.0
-margin_bottom = 449.0
-size_flags_horizontal = 2
-size_flags_vertical = 2
+[node name="ColorPickerButton8" type="ColorPickerButton" parent="GridContainer"]
+margin_left = 369.0
+margin_top = 261.0
+margin_right = 465.0
+margin_bottom = 325.0
+rect_min_size = Vector2( 96, 64 )
+size_flags_horizontal = 6
+size_flags_vertical = 6
 color = Color( 0, 0, 0.178211, 1 )
 script = ExtResource( 1 )