Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
remove Area from lua code in example to keep it small
Browse files Browse the repository at this point in the history
  • Loading branch information
coderedart committed Jun 14, 2023
1 parent 64d2a18 commit cd0ce5d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
"#;

0 comments on commit cd0ce5d

Please sign in to comment.