MCPcopy Create free account
hub / github.com/crossuo/crossuo / SetPositionSize

Method SetPositionSize

src/Wisp/WispWindow.cpp:52–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void CWindow::SetPositionSize(int x, int y, int width, int height)
53{
54#if SDL_VERSION_ATLEAST(2, 0, 5)
55 int borderH;
56 SDL_GetWindowBordersSize(m_window, &borderH, nullptr, nullptr, nullptr);
57#else
58 int borderH = 0;
59#endif
60 SDL_RestoreWindow(m_window);
61 SDL_SetWindowPosition(m_window, x, std::max(y, borderH));
62 SDL_SetWindowSize(m_window, width, height);
63}
64
65void CWindow::GetPositionSize(int *x, int *y, int *width, int *height)
66{

Callers 1

LoadMethod · 0.80

Calls 4

SDL_GetWindowBordersSizeFunction · 0.85
SDL_RestoreWindowFunction · 0.85
SDL_SetWindowPositionFunction · 0.85
SDL_SetWindowSizeFunction · 0.85

Tested by

no test coverage detected