aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Engine/Lua_Interp.cs
diff options
context:
space:
mode:
Diffstat (limited to 'source/WindowsFormsApplication1/Engine/Lua_Interp.cs')
-rw-r--r--source/WindowsFormsApplication1/Engine/Lua_Interp.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs
index be37449..fabc1be 100644
--- a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs
+++ b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs
@@ -1113,7 +1113,7 @@ end");
break;
case "button":
var btn = new Button();
- btn.FlatStyle = FlatStyle.Flat;
+ btn.FlatStyle = FlatStyle.Standard;
if(darkmode)
{
//Set dark button
@@ -1451,6 +1451,19 @@ end");
public static class Extensions
{
+ /// <summary>
+ /// Attempts to convert a Windows Forms control to a ShiftUI widget
+ /// using JSON.NET.
+ ///
+ /// This may fail due to architecture differences in the WinForms and
+ /// ShiftUI code.
+ ///
+ /// Exceptions:
+ /// - JsonSerializationException: Occurs when a control has some
+ /// data that JSON.NET can't serialize.
+ /// </summary>
+ /// <param name="ctrl">The Windows Forms control to convert</param>
+ /// <returns>The converted widget.</returns>
public static Widget ToWidget(this System.Windows.Forms.Control ctrl)
{
string json = JsonConvert.SerializeObject(ctrl);