Add WindowInstancePosition function
This commit is contained in:
parent
5c514b24b4
commit
d79a7fbb17
|
|
@ -903,6 +903,7 @@ extern "C" { // Prevents name mangling of functions
|
||||||
|
|
||||||
// Window-related functions
|
// Window-related functions
|
||||||
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
||||||
|
RLAPI void InitWindowAt(int width, int height, int x, int y, const char* title); // Initialize window and OpenGL with an instance position (only PLATFORM_DESKTOP)
|
||||||
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||||
|
|
|
||||||
11
src/rcore.c
11
src/rcore.c
|
|
@ -920,6 +920,17 @@ void InitWindow(int width, int height, const char *title)
|
||||||
#endif // PLATFORM_DESKTOP || PLATFORM_WEB || PLATFORM_RPI || PLATFORM_DRM
|
#endif // PLATFORM_DESKTOP || PLATFORM_WEB || PLATFORM_RPI || PLATFORM_DRM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize window and OpenGL with an instance position (only PLATFORM_DESKTOP)
|
||||||
|
void InitWindowAt(int width, int height, int x, int y, const char* title)
|
||||||
|
{
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
SetConfigFlags(FLAG_WINDOW_HIDDEN);
|
||||||
|
InitWindow(width, height, title);
|
||||||
|
SetWindowPosition(x, y);
|
||||||
|
glfwShowWindow(CORE.Window.handle);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Close window and unload OpenGL context
|
// Close window and unload OpenGL context
|
||||||
void CloseWindow(void)
|
void CloseWindow(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user