Doxygen Samurai Engine
0.0.1
Doxygen Samurai Engine Documentation
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1
#pragma once
2
#include <
Context.h
>
3
#include <chrono>
4
5
#include "
input/input.h
"
6
#include <safeSave/safeSave.h>
7
8
#include "
assert/assert.h
"
9
#include "
input/callbacks.h
"
10
namespace
samurai
11
{
12
13
14
struct
WindowState
15
{
16
int
w
= 0;
17
int
h
= 0;
18
19
20
};
21
22
23
//this is not intended to have multiple instances in the program
24
struct
Window
25
{
26
samurai::Context
context
= {};
27
28
29
//this is made to be passed to the user code
30
//on live code editing this will be recorded every frame
31
Input
input
= {};
32
33
34
WindowState
windowState
= {};
35
36
//this doesn't return error codes because it will do the asserts for you
37
void
create
();
38
39
void
saveWindowPositions
();
40
41
bool
shouldClose
();
42
43
void
update
();
44
45
std::chrono::steady_clock::time_point
timer
= {};
46
};
47
48
49
50
}
Context.h
assert.h
callbacks.h
input.h
samurai
Definition
assetManagerWindow.cpp:10
samurai::Context
Definition
Context.h:13
samurai::Input
Definition
input.h:60
samurai::Window
Definition
window.h:25
samurai::Window::saveWindowPositions
void saveWindowPositions()
Definition
window.cpp:74
samurai::Window::timer
std::chrono::steady_clock::time_point timer
Definition
window.h:45
samurai::Window::shouldClose
bool shouldClose()
Definition
window.cpp:94
samurai::Window::windowState
WindowState windowState
Definition
window.h:34
samurai::Window::update
void update()
Definition
window.cpp:103
samurai::Window::input
Input input
Definition
window.h:31
samurai::Window::create
void create()
Definition
window.cpp:18
samurai::Window::context
samurai::Context context
Definition
window.h:26
samurai::WindowState
Definition
window.h:15
samurai::WindowState::w
int w
Definition
window.h:16
samurai::WindowState::h
int h
Definition
window.h:17
shared
windowGraphic
window.h
Generated by
1.10.0