Merge branch 'fix-per-window-dpi' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-per-window-dpi
# Conflicts: # Source/Editor/Utilities/Utils.cs # Source/Editor/Windows/Assets/MaterialWindow.cs # Source/Editor/Windows/Assets/ParticleEmitterWindow.cs # Source/Engine/Platform/Linux/LinuxWindow.cpp # Source/Engine/Platform/Windows/WindowsWindow.cpp
This commit is contained in:
@@ -281,6 +281,8 @@ protected:
|
||||
String _title;
|
||||
CursorType _cursor;
|
||||
Vector2 _clientSize;
|
||||
int _dpi;
|
||||
float _dpiScale;
|
||||
|
||||
Vector2 _trackingMouseOffset;
|
||||
bool _isUsingMouseOffset;
|
||||
@@ -542,6 +544,21 @@ public:
|
||||
/// <returns>The screen space position.</returns>
|
||||
API_FUNCTION() virtual Vector2 ClientToScreen(const Vector2& clientPos) const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the window DPI setting.
|
||||
/// </summary>
|
||||
API_PROPERTY() int GetDpi() const
|
||||
{
|
||||
return _dpi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the window DPI scale factor (1 is default). Includes custom DPI scale
|
||||
/// </summary>
|
||||
API_PROPERTY() float GetDpiScale() const
|
||||
{
|
||||
return Platform::CustomDpiScale * _dpiScale;
|
||||
}
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user