splash_screen.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. .. _doc_splash_screen:
  2. Splash screen
  3. =============
  4. Tutorial
  5. --------
  6. This is a simple tutorial to establish the basic idea of how the GUI
  7. subsystem works. The goal is to create a simple, static
  8. splash screen.
  9. .. image:: img/robisplash_result.png
  10. Following is a file with the assets that will be used. The extracted files can
  11. be placed directly in your project folder and Godot will import them automatically.
  12. :download:`robisplash_assets.zip <files/robisplash_assets.zip>`.
  13. Setting up
  14. ----------
  15. Set the display resolution to 800x450 in Project Settings, and set up a new scene like this:
  16. .. image:: img/robisplash_scene.png
  17. The nodes "background" and "logo" are of :ref:`TextureRect <class_TextureRect>`
  18. type. To display an image, drag the corresponding asset to the texture property.
  19. .. image:: img/robisplash_background_inspector.png
  20. The node "start" is a :ref:`TextureButton <class_TextureButton>`.
  21. It takes several images for different states, but only the normal and
  22. pressed will be supplied in this example:
  23. .. image:: img/robisplash_button_inspector.png
  24. Finally, the node "copyright" is a :ref:`Label <class_Label>`.
  25. Your final scene should look something like this.
  26. .. image:: img/robisplash_editor.png
  27. Go ahead and run the project. If you're satisfied with the results, continue to
  28. the next tutorial.