diff options
| author | Juan Linietsky | 2016-09-13 11:05:47 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-09-13 11:05:47 -0300 |
| commit | 8bcb6a290c61d40333cf3aa73e362836b6e12659 (patch) | |
| tree | dfa1d1e4607059d6bde2bfd135b7ffc889d4fe72 /tools/editor/editor_scale.cpp | |
| parent | 08b096ccc2a46949d5c45e135bc66699f6c4d7cd (diff) | |
| download | godot-8bcb6a290c61d40333cf3aa73e362836b6e12659.tar.gz godot-8bcb6a290c61d40333cf3aa73e362836b6e12659.tar.zst godot-8bcb6a290c61d40333cf3aa73e362836b6e12659.zip | |
-Added VeryLowDPI and MidDPI modes to Godot editor.
-Improved HiDPI detection (requires resolution of > 2000 in X axis)
Diffstat (limited to 'tools/editor/editor_scale.cpp')
| -rw-r--r-- | tools/editor/editor_scale.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/editor/editor_scale.cpp b/tools/editor/editor_scale.cpp index c332acc0c..8575e1c30 100644 --- a/tools/editor/editor_scale.cpp +++ b/tools/editor/editor_scale.cpp @@ -1,14 +1,13 @@ #include "editor_scale.h" #include "os/os.h" -static bool editor_hidpi=false; +static float scale = 1.0; -void editor_set_hidpi(bool p_hidpi) { +void editor_set_scale(float p_scale) { - editor_hidpi=p_hidpi; + scale=p_scale; } +float editor_get_scale() { -bool editor_is_hidpi() { - - return editor_hidpi; + return scale; } |
