Don't glob-include eveything in mod layers

This commit is contained in:
Emil Ernerfeldt 2021-01-17 02:27:58 +01:00
parent 4203944892
commit 421e8bc91e
4 changed files with 6 additions and 5 deletions

View file

@ -8,6 +8,7 @@ use std::sync::{
use crate::{ use crate::{
animation_manager::AnimationManager, animation_manager::AnimationManager,
data::output::Output, data::output::Output,
layers::GraphicLayers,
mutex::{Mutex, MutexGuard}, mutex::{Mutex, MutexGuard},
paint::{stats::*, text::Fonts, *}, paint::{stats::*, text::Fonts, *},
*, *,

View file

@ -86,7 +86,7 @@ pub(crate) mod grid;
mod id; mod id;
mod input_state; mod input_state;
mod introspection; mod introspection;
mod layers; pub mod layers;
mod layout; mod layout;
mod memory; mod memory;
pub mod menu; pub mod menu;
@ -118,7 +118,7 @@ pub use {
grid::Grid, grid::Grid,
id::Id, id::Id,
input_state::*, input_state::*,
layers::*, layers::{LayerId, Order},
layout::*, layout::*,
memory::Memory, memory::Memory,
painter::Painter, painter::Painter,

View file

@ -380,7 +380,7 @@ impl Areas {
pub(crate) fn visible_windows(&self) -> Vec<&area::State> { pub(crate) fn visible_windows(&self) -> Vec<&area::State> {
self.visible_layer_ids() self.visible_layer_ids()
.iter() .iter()
.filter(|layer| layer.order == crate::layers::Order::Middle) .filter(|layer| layer.order == crate::Order::Middle)
.filter_map(|layer| self.get(layer.id)) .filter_map(|layer| self.get(layer.id))
.collect() .collect()
} }

View file

@ -1,11 +1,11 @@
use crate::{ use crate::{
layers::ShapeIdx, layers::{LayerId, ShapeIdx},
math::{Align2, Pos2, Rect, Vec2}, math::{Align2, Pos2, Rect, Vec2},
paint::{ paint::{
text::{Fonts, Galley, TextStyle}, text::{Fonts, Galley, TextStyle},
Shape, Stroke, Shape, Stroke,
}, },
Color32, CtxRef, LayerId, Color32, CtxRef,
}; };
/// Helper to paint shapes and text to a specific region on a specific layer. /// Helper to paint shapes and text to a specific region on a specific layer.