mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
Fractional GUI scale (0.5 step), fit menu to window, fix settings pages
- display.gui-scale is now a number: 0 (auto) or 0.5..4 in 0.5 steps - explicit scale is no longer limited by window size (tiled windows); only an open menu page is shrunk to fit the window - snap Batch2D vertices to pixels on fractional scale (fixes dots above text) - pass app to settings_common via options (not visible inside modules) - gui.get_scale() returns a number
This commit is contained in:
parent
33e132a231
commit
48d5d54b77
13 changed files with 76 additions and 41 deletions
|
|
@ -16,11 +16,11 @@ gui.str(text: str, context: str) -> str
|
|||
-- Returns size of the main container (window).
|
||||
gui.get_viewport() -> {int, int}
|
||||
|
||||
-- Returns current GUI scale: window pixels per one UI unit (1..4).
|
||||
-- Set by the display.gui-scale setting and limited by window size.
|
||||
gui.get_scale() -> int
|
||||
-- Returns current GUI scale: window pixels per one UI unit (0.5..4).
|
||||
-- Set by the display.gui-scale setting (auto mode fits the window size).
|
||||
gui.get_scale() -> number
|
||||
|
||||
-- Returns maximal GUI scale that fits the current window size.
|
||||
-- Returns GUI scale used in auto mode (fits the current window size).
|
||||
gui.get_max_scale() -> int
|
||||
|
||||
-- Returns cursor position in UI units (unlike input.get_mouse_pos,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue