From 108b78a3b3eab3e7728cb6d97a5614fcbdb78e55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nils=20Forss=C3=A9n?= Date: Thu, 9 Nov 2023 14:07:08 +0100 Subject: [PATCH] Working window --- src/_main.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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(); + } + } + } } -- 2.30.2