41 lines
1.1 KiB
Rust
41 lines
1.1 KiB
Rust
use std::sync::Arc;
|
|
|
|
use glam::{vec3, Affine3A, Quat, Vec3};
|
|
use wlx_common::windowing::OverlayWindowState;
|
|
|
|
use crate::{
|
|
gui::panel::GuiPanel,
|
|
state::AppState,
|
|
windowing::window::{OverlayCategory, OverlayWindowConfig},
|
|
};
|
|
|
|
const SETTINGS_NAME: &str = "settings";
|
|
|
|
#[allow(unreachable_code)]
|
|
#[allow(unused_variables)]
|
|
#[allow(dead_code)]
|
|
pub fn create_custom(app: &mut AppState, name: Arc<str>) -> Option<OverlayWindowConfig> {
|
|
return None;
|
|
|
|
unreachable!();
|
|
|
|
let panel = GuiPanel::new_blank(app, (), Default::default()).ok()?;
|
|
panel.update_layout().ok()?;
|
|
|
|
Some(OverlayWindowConfig {
|
|
name,
|
|
category: OverlayCategory::PanelCustom,
|
|
default_state: OverlayWindowState {
|
|
interactable: true,
|
|
grabbable: true,
|
|
transform: Affine3A::from_scale_rotation_translation(
|
|
Vec3::ONE * 0.1, // TODO scale
|
|
Quat::IDENTITY,
|
|
vec3(0.0, 0.0, -0.5),
|
|
),
|
|
..OverlayWindowState::default()
|
|
},
|
|
..OverlayWindowConfig::from_backend(Box::new(panel))
|
|
})
|
|
}
|