#include "../include/Channel.hpp" #include "../include/ChannelSidePanel.hpp" #include "../include/Cache.hpp" #include #include #include #include "process.hpp" using namespace std; using namespace dchat; using namespace TinyProcessLib; int main() { sf::RenderWindow window(sf::VideoMode(1920, 1080), "dchat"); window.setVerticalSyncEnabled(false); window.setFramerateLimit(60); Cache cache; Channel channel; ChannelSidePanel channelSidePanel; channelSidePanel.addChannel(&channel); while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); else if(event.type == sf::Event::Resized) { sf::View view(sf::FloatRect(0.0f, 0.0f, event.size.width, event.size.height)); window.setView(view); } channel.processEvent(event); } window.clear(); channel.draw(window, cache); window.display(); } return 0; }