splash_screen.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 really simple, static
  8. splash screen.
  9. Following is a file with the assets that will be used. These can be added directly to your project folder - no need to import them:
  10. :download:`robisplash_assets.zip </files/robisplash_assets.zip>`.
  11. Setting up
  12. ----------
  13. Set the display resolution to 800x450 in Project Settings, and set up a new scene like this:
  14. .. image:: /img/robisplashscene.png
  15. .. image:: /img/robisplashpreview.png
  16. The nodes "background" and "logo" are of :ref:`TextureFrame <class_TextureFrame>`
  17. type. These have a special property for setting the texture to be
  18. displayed, just load the corresponding file.
  19. .. image:: /img/texframe.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/texbutton.png
  24. Finally, the node "copyright" is a :ref:`Label <class_Label>`.
  25. A custom font can be set for labels by editing the following property:
  26. .. image:: /img/label.png
  27. As a side note, the font was imported from a TTF, see :ref:`doc_importing_fonts`.