#include "SSG/SSG.hpp"
int main() {
FontManager::set("assets/Inconsolata.otf","mono",true);
Configurator::load("config.txt");
std::shared_ptr<sf::RenderWindow> rw = GUIManager::createWindow("SSG Simple template");
mainPanel.
setModel(std::make_shared<PanelModelLine>(Orientation::Vertical, Align::Center, VAlign::Middle));
ButtonPtr button = std::make_shared<Button>("Hello!",[]() {
GUIManager::addDialog(std::make_shared<DialogInfo>("Hello SSG!"));
});
button->getLabel().setColor(ColorId::FontFill, StateId::Focus, sf::Color::Red);
button->setHotKey(sf::Keyboard::Key::H);
while(rw->isOpen()) {
rw->clear(sf::Color(64,64,64));
sf::Event e;
while(rw->pollEvent(e)) {
defaultEventsHandle(e, *rw);
}
mainPanel.
fitToWindow(*rw);
mainPanel.
mainUpdate(*rw);
rw->display();
}
return 0;
}