screen_capture.tscn 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [gd_scene load_steps=3 format=3 uid="uid://d10mveb7aokfl"]
  2. [ext_resource type="Script" path="res://screen_capture.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://tgwx64g0plcn" path="res://mountains.png" id="2"]
  4. [node name="ScreenCapture" type="Control"]
  5. layout_mode = 3
  6. anchors_preset = 15
  7. anchor_right = 1.0
  8. anchor_bottom = 1.0
  9. grow_horizontal = 2
  10. grow_vertical = 2
  11. script = ExtResource("1")
  12. [node name="Background" type="TextureRect" parent="."]
  13. layout_mode = 1
  14. anchors_preset = 15
  15. anchor_right = 1.0
  16. anchor_bottom = 1.0
  17. grow_horizontal = 0
  18. grow_vertical = 0
  19. texture = ExtResource("2")
  20. [node name="CapturedImage" type="TextureRect" parent="."]
  21. layout_mode = 1
  22. anchors_preset = 15
  23. anchor_right = 1.0
  24. anchor_bottom = 1.0
  25. offset_left = 128.0
  26. offset_top = 75.0
  27. offset_right = -128.0
  28. offset_bottom = -75.0
  29. grow_horizontal = 2
  30. grow_vertical = 2
  31. expand_mode = 1
  32. stretch_mode = 4
  33. [node name="CaptureButton" type="Button" parent="."]
  34. layout_mode = 0
  35. offset_left = 50.0
  36. offset_top = 50.0
  37. offset_right = 190.0
  38. offset_bottom = 110.0
  39. text = "Capture
  40. Screen"
  41. [connection signal="pressed" from="CaptureButton" to="." method="_on_capture_button_pressed"]