layers initial impl (no sensors)
This commit is contained in:
@@ -3,8 +3,8 @@ use image::DynamicImage;
|
||||
use crate::{
|
||||
core::{TextEdit, TextEditCtx},
|
||||
layout::{
|
||||
ActiveSensors, PainterCtx, Sensor, SensorMap, StaticWidgetId, TextData, TextureHandle,
|
||||
Textures, Vec2, Widget, WidgetId, WidgetInstance, WidgetLike,
|
||||
ActiveSensors, Layers, PainterCtx, Sensor, SensorMap, StaticWidgetId, TextData,
|
||||
TextureHandle, Textures, Vec2, Widget, WidgetId, WidgetInstance, WidgetLike,
|
||||
},
|
||||
render::Primitives,
|
||||
util::{DynBorrower, HashMap, HashSet, Id, IdTracker},
|
||||
@@ -23,12 +23,12 @@ pub struct Ui<Ctx> {
|
||||
pub(super) send: Sender<Id>,
|
||||
size: Vec2,
|
||||
// TODO: make these non pub(crate)
|
||||
pub(crate) primitives: Primitives,
|
||||
pub(crate) layers: Layers<Primitives>,
|
||||
pub(crate) textures: Textures,
|
||||
pub(crate) text: TextData,
|
||||
full_redraw: bool,
|
||||
|
||||
pub(super) active: Active,
|
||||
pub(crate) active: Active,
|
||||
pub(super) sensor_map: SensorMap<Ctx>,
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ impl<Ctx> Ui<Ctx> {
|
||||
self.free();
|
||||
let mut ctx = PainterCtx::new(
|
||||
&self.widgets,
|
||||
&mut self.primitives,
|
||||
&mut self.layers,
|
||||
&mut self.active,
|
||||
&mut self.textures,
|
||||
&mut self.text,
|
||||
@@ -152,7 +152,7 @@ impl<Ctx> Ui<Ctx> {
|
||||
fn redraw_updates(&mut self) {
|
||||
let mut ctx = PainterCtx::new(
|
||||
&self.widgets,
|
||||
&mut self.primitives,
|
||||
&mut self.layers,
|
||||
&mut self.active,
|
||||
&mut self.textures,
|
||||
&mut self.text,
|
||||
@@ -343,7 +343,7 @@ impl<Ctx> Default for Ui<Ctx> {
|
||||
root: Default::default(),
|
||||
widgets: Widgets::new(),
|
||||
updates: Default::default(),
|
||||
primitives: Default::default(),
|
||||
layers: Default::default(),
|
||||
textures: Textures::new(),
|
||||
text: TextData::default(),
|
||||
full_redraw: false,
|
||||
|
||||
Reference in New Issue
Block a user