Create mod util

This commit is contained in:
Emil Ernerfeldt 2020-11-15 16:20:51 +01:00
parent fe0d159324
commit 83444af862
8 changed files with 14 additions and 9 deletions

View file

@ -1,4 +1,4 @@
use crate::{app, demos, Context, History, Ui};
use crate::{app, demos, util::History, Context, Ui};
use std::sync::Arc;
// ----------------------------------------------------------------------------

View file

@ -1,6 +1,6 @@
//! The input needed by Egui.
use crate::{math::*, History};
use crate::{math::*, util::History};
/// If mouse moves more than this, it is no longer a click (but maybe a drag)
const MAX_CLICK_DIST: f32 = 6.0;

View file

@ -60,11 +60,9 @@
pub mod align;
mod animation_manager;
pub mod app;
pub(crate) mod cache;
pub mod containers;
mod context;
pub mod demos;
mod history;
mod id;
mod input;
mod introspection;
@ -73,12 +71,12 @@ mod layout;
pub mod math;
mod memory;
pub mod menu;
pub mod mutex;
pub mod paint;
mod painter;
mod style;
mod types;
mod ui;
pub mod util;
pub mod widgets;
pub use {
@ -86,7 +84,6 @@ pub use {
containers::*,
context::Context,
demos::DemoApp,
history::History,
id::Id,
input::*,
layers::*,
@ -101,6 +98,7 @@ pub use {
style::Style,
types::*,
ui::Ui,
util::mutex,
widgets::*,
};

View file

@ -1,11 +1,10 @@
use std::collections::{HashMap, HashSet};
use crate::{
area,
cache::Cache,
collapsing_header, menu,
area, collapsing_header, menu,
paint::color::{Hsva, Srgba},
resize, scroll_area,
util::Cache,
widgets::text_edit,
window, Id, LayerId, Pos2, Rect,
};

8
egui/src/util/mod.rs Normal file
View file

@ -0,0 +1,8 @@
//! Tools used by Egui, but that doesn't depend on anything in Egui.
pub(crate) mod cache;
mod history;
pub mod mutex;
pub(crate) use cache::Cache;
pub use history::History;