Sort demo windows (multi-touch demo was out of order)
This commit is contained in:
parent
4bb79a7047
commit
0b52813f62
3 changed files with 6 additions and 6 deletions
|
@ -16,9 +16,9 @@ impl Default for Demos {
|
||||||
let demos: Vec<Box<dyn super::Demo>> = vec![
|
let demos: Vec<Box<dyn super::Demo>> = vec![
|
||||||
Box::new(super::dancing_strings::DancingStrings::default()),
|
Box::new(super::dancing_strings::DancingStrings::default()),
|
||||||
Box::new(super::drag_and_drop::DragAndDropDemo::default()),
|
Box::new(super::drag_and_drop::DragAndDropDemo::default()),
|
||||||
Box::new(super::zoom_rotate::ZoomRotate::default()),
|
|
||||||
Box::new(super::font_book::FontBook::default()),
|
Box::new(super::font_book::FontBook::default()),
|
||||||
Box::new(super::DemoWindow::default()),
|
Box::new(super::DemoWindow::default()),
|
||||||
|
Box::new(super::multi_touch::MultiTouch::default()),
|
||||||
Box::new(super::painting::Painting::default()),
|
Box::new(super::painting::Painting::default()),
|
||||||
Box::new(super::plot_demo::PlotDemo::default()),
|
Box::new(super::plot_demo::PlotDemo::default()),
|
||||||
Box::new(super::scrolling::Scrolling::default()),
|
Box::new(super::scrolling::Scrolling::default()),
|
||||||
|
|
|
@ -13,6 +13,7 @@ pub mod font_book;
|
||||||
pub mod font_contents_emoji;
|
pub mod font_contents_emoji;
|
||||||
pub mod font_contents_ubuntu;
|
pub mod font_contents_ubuntu;
|
||||||
pub mod layout_test;
|
pub mod layout_test;
|
||||||
|
pub mod multi_touch;
|
||||||
pub mod painting;
|
pub mod painting;
|
||||||
pub mod password;
|
pub mod password;
|
||||||
pub mod plot_demo;
|
pub mod plot_demo;
|
||||||
|
@ -23,7 +24,6 @@ pub mod toggle_switch;
|
||||||
pub mod widget_gallery;
|
pub mod widget_gallery;
|
||||||
mod widgets;
|
mod widgets;
|
||||||
pub mod window_options;
|
pub mod window_options;
|
||||||
pub mod zoom_rotate;
|
|
||||||
|
|
||||||
pub use {app::*, demo_window::DemoWindow, demo_windows::*, widgets::Widgets};
|
pub use {app::*, demo_window::DemoWindow, demo_windows::*, widgets::Widgets};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ use egui::{
|
||||||
vec2, Color32, Frame, Pos2, Rect, Sense, Stroke, Vec2,
|
vec2, Color32, Frame, Pos2, Rect, Sense, Stroke, Vec2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct ZoomRotate {
|
pub struct MultiTouch {
|
||||||
previous_arrow_start_offset: Vec2,
|
previous_arrow_start_offset: Vec2,
|
||||||
rotation: f32,
|
rotation: f32,
|
||||||
smoothed_velocity: Vec2,
|
smoothed_velocity: Vec2,
|
||||||
|
@ -11,7 +11,7 @@ pub struct ZoomRotate {
|
||||||
zoom: f32,
|
zoom: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ZoomRotate {
|
impl Default for MultiTouch {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
previous_arrow_start_offset: Vec2::ZERO,
|
previous_arrow_start_offset: Vec2::ZERO,
|
||||||
|
@ -23,7 +23,7 @@ impl Default for ZoomRotate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl super::Demo for ZoomRotate {
|
impl super::Demo for MultiTouch {
|
||||||
fn name(&self) -> &'static str {
|
fn name(&self) -> &'static str {
|
||||||
"👌 Multi Touch"
|
"👌 Multi Touch"
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ impl super::Demo for ZoomRotate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl super::View for ZoomRotate {
|
impl super::View for MultiTouch {
|
||||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
ui.vertical_centered(|ui| {
|
ui.vertical_centered(|ui| {
|
||||||
ui.add(crate::__egui_github_link_file!());
|
ui.add(crate::__egui_github_link_file!());
|
Loading…
Reference in a new issue