add(examples/elements): mouse clickable button
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
This commit is contained in:
12
build.zig
12
build.zig
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user