feat(render): implement direct rendering
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 38s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 38s
This commit is contained in:
@@ -3,7 +3,7 @@ const zterm = @import("zterm");
|
||||
|
||||
const App = zterm.App(
|
||||
union(enum) {},
|
||||
zterm.Renderer.Plain,
|
||||
zterm.Renderer.Direct,
|
||||
true,
|
||||
);
|
||||
const Key = zterm.Key;
|
||||
@@ -31,7 +31,7 @@ pub fn main() !void {
|
||||
// -> size hint how much should it use?
|
||||
|
||||
var layout = Layout.createFrom(layout: {
|
||||
var vstack = Layout.VStack.init(allocator, .{
|
||||
var vstack = Layout.HStack.init(allocator, .{
|
||||
Widget.createFrom(blk: {
|
||||
const file = try std.fs.cwd().openFile("./src/app.zig", .{});
|
||||
defer file.close();
|
||||
@@ -59,6 +59,7 @@ pub fn main() !void {
|
||||
// App.Event loop
|
||||
while (true) {
|
||||
const event = app.nextEvent();
|
||||
log.debug("received event: {s}", .{@tagName(event)});
|
||||
|
||||
switch (event) {
|
||||
.quit => break,
|
||||
|
||||
Reference in New Issue
Block a user