From 37e643e3195cee160d969f318895738ba9f1b988 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sat, 2 Dec 2023 19:11:41 +0100 Subject: [PATCH] owo --- kubi-ui-examples/examples/text.rs | 8 +++----- kubi-ui/src/draw.rs | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/kubi-ui-examples/examples/text.rs b/kubi-ui-examples/examples/text.rs index 3be398b..b17a779 100644 --- a/kubi-ui-examples/examples/text.rs +++ b/kubi-ui-examples/examples/text.rs @@ -26,12 +26,10 @@ fn main() { let (window, display) = SimpleWindowBuilder::new().build(&event_loop); let mut kui = KubiUi::new(); - - let handle = kui.add_font_from_bytes(include_bytes!("../../assets/fonts/roboto/Roboto-Regular.ttf")); - let mut backend = GliumUiRenderer::new(&display); - let instant = Instant::now(); + let font_handle = kui.add_font_from_bytes(include_bytes!("../../assets/fonts/roboto/Roboto-Regular.ttf")); + event_loop.run(|event, window_target| { window_target.set_control_flow(ControlFlow::Poll); match event { @@ -54,7 +52,7 @@ fn main() { elements: vec![ Box::new(Text { text: "Hello_world".into(), - font: handle, + font: font_handle, ..Default::default() }), ], diff --git a/kubi-ui/src/draw.rs b/kubi-ui/src/draw.rs index e801a82..8386738 100644 --- a/kubi-ui/src/draw.rs +++ b/kubi-ui/src/draw.rs @@ -188,7 +188,6 @@ impl UiDrawPlan { }, ]); } - } } prev_command = Some(command);