diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-06 18:32:19 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-06 18:32:19 -0400 |
| commit | 98fe96c5d3e5ee1bb3b2eaa38c9346977b4ad713 (patch) | |
| tree | f44609abd833e5a49d117b711455180ca3f86581 /source/WindowsFormsApplication1/Engine/Lua_Interp.cs | |
| parent | b20c17f5a45b229edcefb66815ec602ade7dd84b (diff) | |
| download | shiftos-c--98fe96c5d3e5ee1bb3b2eaa38c9346977b4ad713.tar.gz shiftos-c--98fe96c5d3e5ee1bb3b2eaa38c9346977b4ad713.tar.bz2 shiftos-c--98fe96c5d3e5ee1bb3b2eaa38c9346977b4ad713.zip | |
Added DEF events for unity toggle and desktop panel draw.
Also this is the first REAL AppVeyor build test.
Diffstat (limited to 'source/WindowsFormsApplication1/Engine/Lua_Interp.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Engine/Lua_Interp.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs index 4192acf..813bcd3 100644 --- a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs +++ b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs @@ -119,6 +119,30 @@ namespace ShiftOS mod(func + "()"); }; }); + mod.on_unity_set += new Action<ShiftOSDesktop, string>((desktop, func) => + { + desktop.OnUnityToggle += () => + { + mod(func + "()"); + }; + }); + mod.on_desktop_panel_draw += new Action<ShiftOSDesktop, string>((desktop, func) => + { + desktop.OnDesktopPanelDraw += (c) => + { + mod(func + $"(get_panel_from_guid(\"{c}\"))"); + }; + }); + mod.get_panel_from_guid = new Func<string, Control>((guid) => + { + foreach(var kv in API.DEF_PanelGUIDs) + { + if (kv.Key == guid) + return kv.Value; + } + return null; + }); + mod.on_desktop_reset += new Action<ShiftOSDesktop, string>((desktop, func) => { desktop.OnDesktopReload += () => |
