From cd0ce5d6bde41ceac0ccbf9097b033ba662c6fbb Mon Sep 17 00:00:00 2001 From: Red Artist Date: Thu, 15 Jun 2023 04:35:17 +0530 Subject: [PATCH] remove Area from lua code in example to keep it small --- examples/basic.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/examples/basic.rs b/examples/basic.rs index 03fe799..67cdc30 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -90,21 +90,16 @@ window_options = { title = "My Lua Window", open = true } -area = egui.area.new("lua area"); - -function area_ui(ui) - if ui:button("frame button"):clicked() then - print("frame button clicked"); - end -end function show_fn(ui) ui:label("hello"); - if ui:button("lua button"):clicked() then - print("lua button clicked"); + if ui: + button("cute button"): + clicked() then + + print("cute button tapped"); end end function gui_run(ctx) ctx:new_window(window_options, show_fn); - area:show(ctx, area_ui); end "#;