bar + overlaybackend refactor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::{collections::HashMap, rc::Rc};
|
||||
|
||||
use glam::{Affine2, Mat4, Vec2, Vec3, vec2, vec3a};
|
||||
use glam::{Mat4, Vec2, Vec3, vec2, vec3a};
|
||||
use wgui::{
|
||||
animation::{Animation, AnimationEasing},
|
||||
drawing::Color,
|
||||
@@ -260,12 +260,6 @@ where
|
||||
|
||||
panel.layout.update(vec2(2048., 2048.), 0.0)?;
|
||||
|
||||
let interaction_transform = Affine2::from_translation(vec2(0.5, 0.5))
|
||||
* Affine2::from_scale(vec2(
|
||||
1.,
|
||||
-panel.layout.content_size.x / panel.layout.content_size.y,
|
||||
));
|
||||
|
||||
let width = layout.row_size * 0.05 * app.session.config.keyboard_scale;
|
||||
|
||||
Ok(OverlayData {
|
||||
@@ -277,11 +271,9 @@ where
|
||||
interactable: true,
|
||||
spawn_scale: width,
|
||||
spawn_point: vec3a(0., -0.5, 0.),
|
||||
interaction_transform,
|
||||
..Default::default()
|
||||
},
|
||||
backend: Box::new(KeyboardBackend { panel }),
|
||||
..Default::default()
|
||||
..OverlayData::from_backend(Box::new(KeyboardBackend { panel }))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user