25 lines
530 B
C#
25 lines
530 B
C#
|
|
using Godot;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool]
|
|
[GlobalClass]
|
|
public partial class ResolutionScalingSetting:NumberAppSetting
|
|
{
|
|
[Export]
|
|
public float userScaleToResolutionScale = 1f/100f;
|
|
|
|
public override void ApplyValue( App app )
|
|
{
|
|
var stringValue = app.GetSetting( id );
|
|
var floatValue = RegexUtility.ParseFloat( stringValue );
|
|
|
|
var viewport = app.GetViewport();
|
|
viewport.Scaling3DScale = floatValue * userScaleToResolutionScale;
|
|
}
|
|
|
|
|
|
}
|
|
} |