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:
108b78a
)
added background
author
Nils Forssén
<nilfo359@student.liu.se>
Thu, 9 Nov 2023 13:11:34 +0000
(14:11 +0100)
committer
Nils Forssén
<nilfo359@student.liu.se>
Thu, 9 Nov 2023 13:11:34 +0000
(14:11 +0100)
src/_main.cc
patch
|
blob
|
history
diff --git
a/src/_main.cc
b/src/_main.cc
index 16058e1e9d05ac9b7db16fcd13945d0f5a36fdac..bbb35e506bdf47b3fde8fea6ebc7a90032fb132e 100644
(file)
--- a/
src/_main.cc
+++ b/
src/_main.cc
@@
-13,7
+13,11
@@
int main ()
RenderWindow window{
VideoMode{1920, 1080},
"DespYrat"
- };
+ };
+
+ Texture t;
+ t.loadFromFile("assets/hel_bakgrund.png");
+ Sprite s(t);
while (window.isOpen())
{
@@
-27,5
+31,11
@@
int main ()
window.close();
}
}
+
+
+ /* rita ut */
+ window.clear(); // rensa skärmen
+ window.draw(s);
+ window.display(); // visa ändringarna
}
}