Merge pull request #8191 from abcdefg30/luawidget
Add a custom text display to lua
This commit is contained in:
@@ -9,10 +9,11 @@
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.Scripting;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public struct HSLColor
|
||||
public struct HSLColor : IScriptBindable
|
||||
{
|
||||
public readonly byte H;
|
||||
public readonly byte S;
|
||||
|
||||
@@ -37,6 +37,12 @@ namespace OpenRA.Scripting
|
||||
{
|
||||
object temp;
|
||||
|
||||
// Is t a nullable?
|
||||
// If yes, get the underlying type
|
||||
var nullable = Nullable.GetUnderlyingType(t);
|
||||
if (nullable != null)
|
||||
t = nullable;
|
||||
|
||||
// Value wraps a CLR object
|
||||
if (value.TryGetClrObject(out temp))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user