projects
/
TDDC76_proj.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6540aa9
)
Working window
author
Nils Forssén
<nilfo359@student.liu.se>
Thu, 9 Nov 2023 13:07:08 +0000
(14:07 +0100)
committer
Nils Forssén
<nilfo359@student.liu.se>
Thu, 9 Nov 2023 13:07:08 +0000
(14:07 +0100)
src/_main.cc
patch
|
blob
|
history
diff --git
a/src/_main.cc
b/src/_main.cc
index ae826bfe1688a205624064b4f41e8cd4a366cab7..16058e1e9d05ac9b7db16fcd13945d0f5a36fdac 100644
(file)
--- 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 <SFML/Graphics.hpp> // 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();
+ }
+ }
+ }
}