Book Image

SFML Blueprints

By : Barbier
Book Image

SFML Blueprints

By: Barbier

Overview of this book

This book is for developers who have knowledge of the basics of the SFML library and its capabilities in 2D game development. Minimal experience with C++ is required.
Table of Contents (10 chapters)
9
Index

What is a GUI?


A Graphical User Interface (GUI) is a mechanism that allows the user to visually interact with a software through graphical objects such as icons, text, buttons, and so on. Internally, a GUI handles some events and binds them to functions, mostly called callbacks. These functions define the reaction of the program.

There are a lot of different common objects that are always present in a GUI, such as buttons, windows, labels, and layouts. I don't think I need to explain to you what a button, window, or label is, but I will explain to you in short what a layout is.

A layout is an invisible object that manages the arrangements of the graphical objects on the screen. Simply put, its goal is to take care of the size and the position of the objects by managing a part of them. It's like a table that makes sure none of these objects are on top of the others, and which adapts their size to fill the screen as proportionately as possible.

Creating a GUI from scratch

Now that the GUI terms...