Get more done on packageserver

This commit is contained in:
2025-07-12 03:33:45 -05:00
parent 35960d5db0
commit 92f21917b1
7 changed files with 137 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
func btn1_Click(sender,e)
{
Console.WriteLine("Button Clicked");
}
func main(args)
{
if(TypeOf(GUI) != "Dictionary")
{
Console.WriteLine("The GUI is not supported, please build tessesframework with TESSESFRAMEWORK_ENABLE_SDL2.");
return 1;
}
var window = GUI.Window.FromJSON(embed("layout.json"), SDL2.Window.Resizable);
var btn1 = window.FindViewById("btn1");
btn1.Click += btn1_Click;
VM.RunEventLoop();
btn.Click -= btn1_Click;
window.Dispose(); //we need to destroy it or it will leak
}