Show current display server in Editor window tooltip
(cherry picked from commit 62968dd437)
This commit is contained in:
@@ -84,13 +84,15 @@ namespace FlaxEditor.GUI
|
|||||||
|
|
||||||
ScriptsBuilder.GetBinariesConfiguration(out _, out _, out _, out var configuration);
|
ScriptsBuilder.GetBinariesConfiguration(out _, out _, out _, out var configuration);
|
||||||
|
|
||||||
|
var driver = Platform.DisplayServer;
|
||||||
|
|
||||||
_icon = new Image
|
_icon = new Image
|
||||||
{
|
{
|
||||||
Margin = new Margin(6, 6, 6, 6),
|
Margin = new Margin(6, 6, 6, 6),
|
||||||
Brush = new TextureBrush(windowIcon),
|
Brush = new TextureBrush(windowIcon),
|
||||||
Color = Style.Current.Foreground,
|
Color = Style.Current.Foreground,
|
||||||
KeepAspectRatio = false,
|
KeepAspectRatio = false,
|
||||||
TooltipText = string.Format("{0}\nVersion {1}\nConfiguration {3}\nGraphics {2}", _window.Title, Globals.EngineVersion, GPUDevice.Instance.RendererType, configuration),
|
TooltipText = string.Format("{0}\nVersion {1}\nConfiguration {3}\nGraphics {2} {4}", _window.Title, Globals.EngineVersion, GPUDevice.Instance.RendererType, configuration, driver),
|
||||||
Parent = this,
|
Parent = this,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -262,6 +262,15 @@ PlatformType PlatformBase::GetPlatformType()
|
|||||||
return PLATFORM_TYPE;
|
return PLATFORM_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !PLATFORM_SDL
|
||||||
|
|
||||||
|
String PlatformBase::GetDisplayServer()
|
||||||
|
{
|
||||||
|
return String::Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
bool PlatformBase::Is64BitApp()
|
bool PlatformBase::Is64BitApp()
|
||||||
{
|
{
|
||||||
#if PLATFORM_64BITS
|
#if PLATFORM_64BITS
|
||||||
|
|||||||
@@ -369,6 +369,11 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
API_PROPERTY() static PlatformType GetPlatformType();
|
API_PROPERTY() static PlatformType GetPlatformType();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the display server name on Linux.
|
||||||
|
/// </summary>
|
||||||
|
API_PROPERTY() static String GetDisplayServer() = delete;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true if is running 64 bit application (otherwise 32 bit). It's compile-time constant.
|
/// Returns true if is running 64 bit application (otherwise 32 bit). It's compile-time constant.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -166,6 +166,18 @@ bool SDLPlatform::HandleEvent(SDL_Event& event)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String SDLPlatform::GetDisplayServer()
|
||||||
|
{
|
||||||
|
#if PLATFORM_LINUX
|
||||||
|
String driver(SDL_GetCurrentVideoDriver());
|
||||||
|
if (driver.Length() > 0)
|
||||||
|
driver[0] = StringUtils::ToUpper(driver[0]);
|
||||||
|
return driver;
|
||||||
|
#else
|
||||||
|
return String::Empty;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
BatteryInfo SDLPlatform::GetBatteryInfo()
|
BatteryInfo SDLPlatform::GetBatteryInfo()
|
||||||
{
|
{
|
||||||
BatteryInfo info;
|
BatteryInfo info;
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public:
|
|||||||
static bool Init();
|
static bool Init();
|
||||||
static void LogInfo();
|
static void LogInfo();
|
||||||
static void Tick();
|
static void Tick();
|
||||||
|
static String GetDisplayServer();
|
||||||
static void SetHighDpiAwarenessEnabled(bool enable);
|
static void SetHighDpiAwarenessEnabled(bool enable);
|
||||||
static BatteryInfo GetBatteryInfo();
|
static BatteryInfo GetBatteryInfo();
|
||||||
static int32 GetDpi();
|
static int32 GetDpi();
|
||||||
|
|||||||
Reference in New Issue
Block a user