diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-21 18:45:11 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-21 22:17:54 +0200 |
commit | 64e00aad013da92d29851d3e8109a006b4dff8c5 (patch) | |
tree | 081e9a2829f3c247d48bf6468030f35c85b2db4f /pixel-client/src/menu.rs | |
parent | b1eba76afaf7a506ff912634da6220db15d0023e (diff) | |
download | hurrycurry-64e00aad013da92d29851d3e8109a006b4dff8c5.tar hurrycurry-64e00aad013da92d29851d3e8109a006b4dff8c5.tar.bz2 hurrycurry-64e00aad013da92d29851d3e8109a006b4dff8c5.tar.zst |
pc: draw text
Diffstat (limited to 'pixel-client/src/menu.rs')
-rw-r--r-- | pixel-client/src/menu.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pixel-client/src/menu.rs b/pixel-client/src/menu.rs index a3242edb..d9396e49 100644 --- a/pixel-client/src/menu.rs +++ b/pixel-client/src/menu.rs @@ -1,4 +1,5 @@ -use crate::render::{AtlasLayout, SpriteRenderer}; +use crate::render::{AtlasLayout, Renderer}; +use hurrycurry_protocol::glam::Vec2; use sdl2::keyboard::KeyboardState; pub struct Menu {} @@ -14,5 +15,7 @@ impl Menu { Self {} } pub fn tick(&mut self, _dt: f32, _keyboard: &KeyboardState, _layout: &AtlasLayout) {} - pub fn draw(&self, _ctx: &mut SpriteRenderer) {} + pub fn draw(&self, ctx: &mut Renderer) { + ctx.draw_text(Vec2::new(1., 1.), "Hello world!"); + } } |