#include <T2Window_SDL.h>
Definition at line 15 of file T2Window_SDL.h.
◆ T2Window()
◆ ~T2Window()
◆ Create()
TBOOL T2Window::Create |
( |
T2Render * | a_pRender, |
|
|
const TCHAR * | a_szTitle ) |
Definition at line 13 of file T2Window_SDL.cpp.
14{
15 m_pRender = a_pRender;
16 m_pWindow = SDL_CreateWindow(
17 a_szTitle,
18 SDL_WINDOWPOS_CENTERED,
19 SDL_WINDOWPOS_CENTERED,
20 0,
21 0,
22 SDL_WINDOW_SHOWN
23#ifdef TRENDERINTERFACE_GL
24 | SDL_WINDOW_OPENGL
25#endif
26 );
27
28 m_iWidth = -1;
29 m_iHeight = -1;
30
31 return m_pWindow !=
TNULL;
32}
◆ GetHeight()
TINT T2Window::GetHeight |
( |
| ) |
const |
|
inline |
◆ GetNativeWindow()
SDL_Window * T2Window::GetNativeWindow |
( |
| ) |
const |
|
inline |
◆ GetWidth()
TINT T2Window::GetWidth |
( |
| ) |
const |
|
inline |
◆ SetFullscreen()
void T2Window::SetFullscreen |
( |
TBOOL | a_bFullScreen | ) |
|
Definition at line 53 of file T2Window_SDL.cpp.
54{
55 SDL_SetWindowFullscreen( m_pWindow, a_bFullScreen ? SDL_WINDOW_FULLSCREEN : 0 );
56}
◆ SetListener()
◆ SetPosition()
void T2Window::SetPosition |
( |
TINT | a_iX, |
|
|
TINT | a_iY, |
|
|
TINT | a_iWidth, |
|
|
TINT | a_iHeight ) |
Definition at line 58 of file T2Window_SDL.cpp.
59{
60 SDL_SetWindowPosition( m_pWindow, a_iX, a_iY );
61 SDL_SetWindowSize( m_pWindow, a_iWidth, a_iHeight );
62
63 m_iWidth = a_iWidth;
64 m_iHeight = a_iHeight;
65}
◆ Update()
void T2Window::Update |
( |
| ) |
|
Definition at line 34 of file T2Window_SDL.cpp.
35{
36 SDL_Event event;
37
38 while ( SDL_PollEvent( &event ) )
39 {
40 if ( m_pListener )
41 {
42 if ( m_pListener->OnEvent( event ) )
43 continue;
44 }
45
46 if ( event.type == SDL_EventType::SDL_QUIT )
47 {
49 }
50 }
51}
static void Throw(const T &a_rData)
The documentation for this class was generated from the following files: