-
Notifications
You must be signed in to change notification settings - Fork 29
Window
Martin Cohen edited this page Dec 1, 2016
·
1 revision
Punity has a single window accessible via CORE->window
. The window actually represents framebuffer, so it's width
, height
combined with scale
refer to the client area of the window (that means it doesn't include window's frame).
The Window
struct referenced has following properties:
-
i32 width
- unscaled width of the frame (default is
320
).
- unscaled width of the frame (default is
-
i32 height
- unscaled height of the frame (default is
240
).
- unscaled height of the frame (default is
-
f32 scale_normal
- scale used when the window is in normal state (not fullscreen) (default is 3).
-
f32 scale_current
- scale calculated automatically:
- when the window is in fullscreen state, the scale is calculated automatically by the screen size.
- when the window is in normal state, the
scale_normal
is used.
- scale calculated automatically:
Additionally, the struct also stores position of the actual rendering viewport inside the window (this might be different when the ratio of the frame is different to ratio of the screen in fullscreen mode). Generally, there's no need to care about this as it is only used for transforming mouse coordinates to the rendering frame.
See Configuration for more info about using custom window sizes and scales.