-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_MakeDefaultFrame
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Fill an MTY_Frame
taking the current display settings into account.
The returned MTY_Frame
can be passed directly to MTY_WindowCreate
or MTY_WindowSetFrame
.
MTY_Frame MTY_MakeDefaultFrame(
int32_t x,
int32_t y,
uint32_t w,
uint32_t h,
float maxHeight
);
x
(int32_t
)
The window's horizontal offset from the center of the primary screen.
y
(int32_t
)
The window's vertical offset from the center of the primary screen.
w
(uint32_t
)
The window's unscaled width.
h
(uint32_t
)
The window's unscaled height.
maxHeight
(float
)
Between 0.0f and 1.0f, limit the frame's height to a percentage of the primary screen's height. The frame's width is adjusted accordingly keeping the original aspect ratio intact. This calculation is based on the final scaled height of the window.
MTY_Frame
taking the current display settings into account.