Get client width & height
This commit is contained in:
parent
5978358e58
commit
6a899fa1f7
|
|
@ -955,6 +955,8 @@ RLAPI int GetScreenWidth(void); // Get current
|
|||
RLAPI int GetScreenHeight(void); // Get current screen height
|
||||
RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)
|
||||
RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI)
|
||||
RLAPI int GetClientWidth(void); // Get current client width
|
||||
RLAPI int GetClientHeight(void); // Get current client height
|
||||
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
||||
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
||||
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
||||
|
|
|
|||
16
src/rcore.c
16
src/rcore.c
|
|
@ -1694,6 +1694,22 @@ int GetScreenHeight(void)
|
|||
return CORE.Window.screen.height;
|
||||
}
|
||||
|
||||
// Get current client width
|
||||
int GetClientWidth(void)
|
||||
{
|
||||
int width;
|
||||
glfwGetWindowSize(CORE.Window.handle, &width, NULL);
|
||||
return width;
|
||||
}
|
||||
|
||||
// Get current client height
|
||||
int GetClientHeight(void)
|
||||
{
|
||||
int height;
|
||||
glfwGetWindowSize(CORE.Window.handle, NULL, &height);
|
||||
return height;
|
||||
}
|
||||
|
||||
// Get current render width which is equal to screen width * dpi scale
|
||||
int GetRenderWidth(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user