Files
sbox-public/engine/Sandbox.Engine/Systems/UI/Styles/BaseStyles.Textures.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

71 lines
1.1 KiB
C#

using System;
using System.Globalization;
namespace Sandbox.UI
{
public abstract partial class BaseStyles
{
internal Lazy<Texture> _backgroundImage;
internal Lazy<Texture> _maskImage;
internal Lazy<Texture> _borderImageSource;
public Texture BackgroundImage
{
get
{
if ( _backgroundImage == null ) return null;
return _backgroundImage?.Value;
}
set
{
if ( _backgroundImage?.Value == value )
return;
_backgroundImage = new Lazy<Texture>( value );
Dirty();
}
}
public Texture MaskImage
{
get
{
if ( _maskImage == null ) return null;
return _maskImage?.Value;
}
set
{
if ( _maskImage?.Value == value )
return;
_maskImage = new Lazy<Texture>( value );
Dirty();
}
}
public Texture BorderImageSource
{
get
{
if ( _borderImageSource == null ) return null;
return _borderImageSource?.Value;
}
set
{
if ( _borderImageSource?.Value == value )
return;
_borderImageSource = new Lazy<Texture>( value );
Dirty();
}
}
}
}