mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-03 02:27:08 +02:00
This causes tons of problems with OpenDream's small popup windows, and even for SS14 it doesn't make much sense. The behavior can be re-enabled per window by setting WindowRoot.DisableAutoScaling to false.
31 lines
978 B
C#
31 lines
978 B
C#
using Robust.Client.Graphics;
|
|
using Robust.Shared;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Robust.Client.UserInterface.Controls
|
|
{
|
|
public sealed class WindowRoot : UIRoot
|
|
{
|
|
internal WindowRoot(IClydeWindow window)
|
|
{
|
|
Window = window;
|
|
}
|
|
public override float UIScale => UIScaleSet;
|
|
internal float UIScaleSet { get; set; }
|
|
public override IClydeWindow Window { get; }
|
|
|
|
/// <summary>
|
|
/// Disable automatic scaling of window <see cref="UIScale"/> based on resolution.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Disabled by default for non-main windows as those most likely are smaller popup windows,
|
|
/// that won't make sense with the default parameters.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <seealso cref="CVars.ResAutoScaleEnabled"/>
|
|
public bool DisableAutoScaling { get; set; } = true;
|
|
}
|
|
}
|