diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-18 12:59:59 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-18 12:59:59 +0100 |
commit | 2c737d660cab38fdf4ff3e940395df396a75f959 (patch) | |
tree | 04d81006063a3c16d522adc6acc0535ed7c2711d /client/src/interfaces | |
parent | 2e993f8edae479937599974dd6f99aea6413a009 (diff) | |
download | weareserver-2c737d660cab38fdf4ff3e940395df396a75f959.tar weareserver-2c737d660cab38fdf4ff3e940395df396a75f959.tar.bz2 weareserver-2c737d660cab38fdf4ff3e940395df396a75f959.tar.zst |
offset ui to allow negative drag
Diffstat (limited to 'client/src/interfaces')
-rw-r--r-- | client/src/interfaces/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/interfaces/mod.rs b/client/src/interfaces/mod.rs index 9dfce63..9a68da7 100644 --- a/client/src/interfaces/mod.rs +++ b/client/src/interfaces/mod.rs @@ -17,8 +17,10 @@ pub mod prefabindex; pub mod profiler; -use crate::{download::Downloader, network::Network, scene_prepare::ScenePreparer}; -use egui::Widget; +use crate::{ + download::Downloader, network::Network, scene_prepare::ScenePreparer, ui::UI_POSITION_OFFSET, +}; +use egui::{Pos2, Widget}; use prefabindex::PrefabIndexInterface; use profiler::{Profiler, TimingProfiler}; use std::sync::{Arc, Mutex}; @@ -51,6 +53,7 @@ pub fn ui_selector(idata: Arc<InterfaceData>) -> impl Fn(&egui::Context) -> bool Interface::PrefabIndex(_) => "Prefab Index", }) .open(&mut open) + .default_pos(Pos2::new(UI_POSITION_OFFSET, UI_POSITION_OFFSET)) .show(ctx, |ui| match &mut *state { Interface::Selector => { if ui.button("Profiler").clicked() { |