mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-12 16:28:27 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
21 lines
525 B
C#
21 lines
525 B
C#
|
|
namespace Sandbox.UI;
|
|
|
|
public partial class Panel
|
|
{
|
|
/// <summary>
|
|
/// Set via <c>"value"</c> property from HTML.
|
|
/// </summary>
|
|
[Hide]
|
|
public virtual string StringValue { get; set; }
|
|
|
|
/// <summary>
|
|
/// Call this when the value has changed due to user input etc. This updates any
|
|
/// bindings, backwards. Also triggers $"{name}.changed" event, with value being the Value on the event.
|
|
/// </summary>
|
|
protected void CreateValueEvent( string name, object value )
|
|
{
|
|
CreateEvent( $"{name}.changed", value );
|
|
}
|
|
}
|