mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-17 10:49:21 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
71 lines
1.1 KiB
C#
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();
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|