clean up
This commit is contained in:
@@ -47,6 +47,6 @@ impl<'a, Ctx> Painter<'a, Ctx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn ctx_mut(&mut self) -> &mut Ctx {
|
pub fn ctx_mut(&mut self) -> &mut Ctx {
|
||||||
&mut self.ctx
|
self.ctx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
HashMap, Painter, Vec2, Widget, WidgetId, WidgetLike,
|
HashMap, Painter, Widget, WidgetId, WidgetLike,
|
||||||
primitive::Primitives,
|
primitive::Primitives,
|
||||||
util::{IDTracker, Id},
|
util::{IDTracker, Id},
|
||||||
};
|
};
|
||||||
@@ -17,18 +17,6 @@ pub struct Ui<Ctx> {
|
|||||||
full_redraw: bool,
|
full_redraw: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct MouseState {
|
|
||||||
pos: Vec2,
|
|
||||||
primary: ButtonState,
|
|
||||||
secondary: ButtonState,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub enum ButtonState {
|
|
||||||
JustPressed,
|
|
||||||
Pressed,
|
|
||||||
Released,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Widgets<Ctx>(HashMap<Id, Box<dyn Widget<Ctx>>>);
|
pub struct Widgets<Ctx>(HashMap<Id, Box<dyn Widget<Ctx>>>);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use gui::{primitive::Primitives, UIRenderNode, Ui};
|
use gui::{UIRenderNode, primitive::Primitives};
|
||||||
use pollster::FutureExt;
|
use pollster::FutureExt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wgpu::util::StagingBelt;
|
use wgpu::util::StagingBelt;
|
||||||
|
|||||||
Reference in New Issue
Block a user