From 5cb3b956d9e9bf815b31a7f8ce5b32b1f3d2b250 Mon Sep 17 00:00:00 2001 From: Able Date: Mon, 16 Dec 2024 08:12:12 -0600 Subject: [PATCH] fixes for the absolutely huge breakage pushed --- Cargo.lock | 6 +++--- .../libraries/horizon_api/src/widgets/label.hb | 10 +++++----- sysdata/programs/ablefetch/src/main.hb | 17 ++++++++++++----- sysdata/programs/sunset_client/src/main.hb | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ecdb7f8..b37d780 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,12 +213,12 @@ dependencies = [ [[package]] name = "hbbytecode" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#a1e692eac73fbf44f1fbf816832aaae0ea8f04d7" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#c0d957e70c7146f2c788a7b410632a940a18768f" [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#a1e692eac73fbf44f1fbf816832aaae0ea8f04d7" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#c0d957e70c7146f2c788a7b410632a940a18768f" dependencies = [ "hashbrown", "hbbytecode", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "hbvm" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#a1e692eac73fbf44f1fbf816832aaae0ea8f04d7" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#c0d957e70c7146f2c788a7b410632a940a18768f" dependencies = [ "hbbytecode", ] diff --git a/sysdata/libraries/horizon_api/src/widgets/label.hb b/sysdata/libraries/horizon_api/src/widgets/label.hb index aa8b97e..75cd7af 100644 --- a/sysdata/libraries/horizon_api/src/widgets/label.hb +++ b/sysdata/libraries/horizon_api/src/widgets/label.hb @@ -38,9 +38,9 @@ Label := struct { } render_label_to_surface := fn(surface: Surface, label: Label, font: Font, pos: Vec2(uint)): void { - if label.is_dirty { - label.surface.clear(label.bg) - label.surface.put_text(font, .(0, 0), label.fg, label.text) - } - surface.put_surface(label.surface, pos, false) + // if label.is_dirty { + // render.clear(label.surface, label.bg) + // render.put_text(label.surface, font, .(0, 0), label.fg, label.text) + // } + // render.put_surface(surface, label.surface, pos, false) } \ No newline at end of file diff --git a/sysdata/programs/ablefetch/src/main.hb b/sysdata/programs/ablefetch/src/main.hb index 50181f0..a83e724 100644 --- a/sysdata/programs/ablefetch/src/main.hb +++ b/sysdata/programs/ablefetch/src/main.hb @@ -21,13 +21,20 @@ main := fn(): void { } text_label := Label.new_label("kernel : akern 0.2.0\0", 300) - text_label.set_color(sunset.server.DECO_COLOUR, render.BLACK) + text_label_2 := Label.new_label("os : ableos\0", 300) + text_label_3 := Label.new_label("wm : sunset\0", 300) + text_label.set_color(render.BLACK, render.WHITE) - text_label_2 := Label.new_label("os : ableos\0", 300) - text_label_2.set_color(sunset.server.DECO_COLOUR, render.BLACK) - text_label_3 := Label.new_label("wm : sunset\0", 300) - text_label_3.set_color(sunset.server.DECO_COLOUR, render.BLACK) + text_label_2.set_color(render.BLACK, render.WHITE) + text_label_3.set_color(render.BLACK, render.WHITE) + pos1 := Vec2(uint).(1, 1) + pos2 := Vec2(uint).(1, 20) + pos3 := Vec2(uint).(1, 40) + // render.clear(window.surface, render.black) + render_label_to_surface(window.surface, text_label, font, pos1) + render_label_to_surface(window.surface, text_label_2, font, pos2) + render_label_to_surface(window.surface, text_label_3, font, pos3) loop { render.clear(window.surface, render.BLACK) // render.put_surface(window.surface, image, .(image.width + x % window.data.props.dimensions.x, 40), false) diff --git a/sysdata/programs/sunset_client/src/main.hb b/sysdata/programs/sunset_client/src/main.hb index f35cb8b..b149852 100644 --- a/sysdata/programs/sunset_client/src/main.hb +++ b/sysdata/programs/sunset_client/src/main.hb @@ -21,7 +21,7 @@ main := fn(): void { } x := 0 loop { - render.clear(window.surface, render.black) + screen.clear(window.surface, render.BLACK) render.put_surface(window.surface, image, .(image.width + x % window.data.props.dimensions.x, 20), false) _ = sunset.client.send_frame(window) x += 1