From: Nils Forssén Date: Thu, 9 Nov 2023 13:07:08 +0000 (+0100) Subject: Working window X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=108b78a3b3eab3e7728cb6d97a5614fcbdb78e55;p=TDDC76_proj.git Working window --- diff --git a/src/_main.cc b/src/_main.cc index ae826bf..16058e1 100644 --- a/src/_main.cc +++ b/src/_main.cc @@ -4,8 +4,28 @@ * All spelkod bör köras frÃ¥n denna fil och denna fil enbart. */ +#include // includes most things in SFML + +using namespace sf; int main () { - + RenderWindow window{ + VideoMode{1920, 1080}, + "DespYrat" + }; + + while (window.isOpen()) + { + /* hantera events */ + Event event; + // hämta ett event i taget + while (window.pollEvent(event)) + { + if (event.type == Event::Closed) + { + window.close(); + } + } + } }