mod: change interface for rendering of Layouts and Widgets to use a non-const pointer to the renderer instead
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:
@@ -44,7 +44,11 @@ pub fn Buffered(comptime _: bool) type {
|
||||
|
||||
pub fn Direct(comptime _: bool) type {
|
||||
return struct {
|
||||
pub fn clear(this: @This(), size: Size) !void {
|
||||
pub fn resize(this: *@This(), size: Size) void {
|
||||
_ = this;
|
||||
_ = size;
|
||||
}
|
||||
pub fn clear(this: *@This(), size: Size) !void {
|
||||
_ = this;
|
||||
const anchor = size.anchor;
|
||||
// NOTE: clear entire screen for the first content (derived from the anchor being at the very left-top)
|
||||
@@ -53,7 +57,7 @@ pub fn Direct(comptime _: bool) type {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn render(this: @This(), size: Size, contents: []u8) !void {
|
||||
pub fn render(this: *@This(), size: Size, contents: []u8) !void {
|
||||
_ = this;
|
||||
try terminal.setCursorPosition(size.anchor);
|
||||
var row: u16 = 0;
|
||||
|
||||
Reference in New Issue
Block a user