From 2c737d660cab38fdf4ff3e940395df396a75f959 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 18 Jan 2025 12:59:59 +0100 Subject: offset ui to allow negative drag --- client/src/interfaces/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/interfaces/mod.rs') 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) -> 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() { -- cgit v1.2.3-70-g09d2