add(examples/elements): mouse clickable button
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s

This commit is contained in:
2025-02-21 14:50:29 +01:00
parent b980703350
commit 8fbc958ca1
4 changed files with 122 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ pub fn build(b: *std.Build) void {
const Examples = enum {
// elements:
button,
input,
scrollable,
// layouts:
@@ -38,9 +39,17 @@ pub fn build(b: *std.Build) void {
//--- Examples ---
// elements:
const button = b.addExecutable(.{
.name = "button",
.root_source_file = b.path("examples/elements/button.zig"),
.target = target,
.optimize = optimize,
});
button.root_module.addImport("zterm", lib);
const input = b.addExecutable(.{
.name = "input",
.root_source_file = b.path("examples/input.zig"),
.root_source_file = b.path("examples/elements/input.zig"),
.target = target,
.optimize = optimize,
});
@@ -90,6 +99,7 @@ pub fn build(b: *std.Build) void {
// mapping of user selected example to compile step
const exe = switch (example) {
// elements:
.button => button,
.input => input,
.scrollable => scrollable,
// layouts: