What is a GUI?

A GUI, short for Graphical User Interface, is a visual intermediary between the user and a piece of software which serves as a control mechanism for digital devices or computer programs. Using this type of interface is faster and easier than relying on text-based controls, such as typing commands.

Before any code is written, we need to outline the desired features of our GUI system, which is going to consist of three major components:

  • Element: Every GUI surface that is drawn onto the screen
  • Interface: A special kind of element that serves as a container for other elements and can be moved around as well as scrolled
  • Manager: The class that is in charge of keeping GUI interfaces in line and behaving

All of the elements in this system need ...

Get SFML Game Development By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.