Library with simple and dumb GUI Components for SFML
- SFML-Library
sudo apt-get install libsfml-dev
git clone https://github.com/csacro/SFMLComponents.git
cd SFMLComponents
mkdir build && cd build
cmake ..
make
sudo make install
sudo ld config
sf:RenderWindow that support list of Elements that are drawn and list of Listeneres that are listended at.
Diverse Listeneres
- OnClickListeners listens for click on ClickableElement and executes defined function on click
- OnTestListener listens for text input
Diverse Elements
- Elementis base class for every Element
- ClickableElement is base class for every Element an OnClickListener should listen at
- TextField is a sf::Text with a sf::Rectangle in the background
- EditField is a TextField that can be clicked and written to characterwise
- Button is a TextField with black edging that can be clicked
- Can be inherited by a class displaying a View with diverse Elements and Listeners.
-lSFMLComponents
Have a look at sample.cpp, SampleView.cpp and SampleView.h for sample usage of SFMLComponents.