TAG TECHNOLOGY

This commit is contained in:
2025-08-14 12:21:26 -04:00
parent 4d68fa476d
commit e41970287d
19 changed files with 267 additions and 165 deletions

View File

@@ -12,9 +12,13 @@ pub fn main() {
App::run();
}
struct Data {
x: u32,
}
pub struct Client {
renderer: Renderer,
ui: Ui,
ui: Ui<Data>,
test: WidgetId<Span>,
}
@@ -32,7 +36,8 @@ impl Client {
ui.set_base(
(
(
rect.color(UiColor::BLUE),
rect.color(UiColor::BLUE)
.sense(|d: &mut Data| println!("{}", d.x)),
(
rect.color(UiColor::RED).center((100.0, 100.0)),
(
@@ -77,7 +82,8 @@ impl Client {
match event {
WindowEvent::CloseRequested => event_loop.exit(),
WindowEvent::RedrawRequested => {
self.renderer.update(&mut self.ui);
let primitives = self.ui.update(&mut Data { x: 39 });
self.renderer.update(primitives);
self.renderer.draw()
}
WindowEvent::Resized(size) => self.renderer.resize(&size),