fix: minor home screen fixes

This commit is contained in:
CJ van den Berg 2025-06-03 19:16:22 +02:00
parent 609bc9d257
commit b9fbd6825d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 10 additions and 1 deletions

View file

@ -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 {};

View file

@ -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;