fix: minor home screen fixes
This commit is contained in:
parent
609bc9d257
commit
b9fbd6825d
3 changed files with 10 additions and 1 deletions
|
@ -217,6 +217,10 @@ pub fn putstr_unicode(self: *Plane, text: []const u8) !usize {
|
|||
return result;
|
||||
}
|
||||
|
||||
pub fn putchar(self: *Plane, ecg: []const u8) void {
|
||||
self.write_cell(@intCast(self.col), @intCast(self.row), ecg);
|
||||
}
|
||||
|
||||
pub fn putc(self: *Plane, cell: *const Cell) !usize {
|
||||
return self.putc_yx(@intCast(self.row), @intCast(self.col), cell);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,10 @@ const fire_white: u8 = fire_palette.len - 1;
|
|||
|
||||
pub fn render(self: *Fire) void {
|
||||
self.plane.home();
|
||||
const transparent = self.plane.transparent;
|
||||
self.plane.transparent = false;
|
||||
defer self.plane.transparent = transparent;
|
||||
|
||||
var rand = self.prng.random();
|
||||
|
||||
//update fire buf
|
||||
|
@ -118,7 +122,7 @@ pub fn render(self: *Fire) void {
|
|||
|
||||
self.plane.set_fg_palindex(fire_palette[px_hi]) catch {};
|
||||
self.plane.set_bg_palindex(fire_palette[px_lo]) catch {};
|
||||
_ = self.plane.putstr(px) catch {};
|
||||
_ = self.plane.putchar(px);
|
||||
}
|
||||
self.plane.cursor_move_yx(-1, 0) catch {};
|
||||
self.plane.cursor_move_rel(1, 0) catch {};
|
||||
|
|
|
@ -266,6 +266,7 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
|||
self.plane.erase();
|
||||
self.plane.home();
|
||||
if (self.fire) |*fire| fire.render();
|
||||
self.plane.set_base_style(theme.editor);
|
||||
|
||||
const style_title = if (tui.find_scope_style(theme, "function")) |sty| sty.style else theme.editor;
|
||||
const style_subtext = if (tui.find_scope_style(theme, "comment")) |sty| sty.style else theme.editor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue