move "open storage path" feature from debug to settings
This commit is contained in:
+6
-1
@@ -6,7 +6,7 @@ use crate::{
|
|||||||
ui_ext::UiExt,
|
ui_ext::UiExt,
|
||||||
},
|
},
|
||||||
util::{
|
util::{
|
||||||
consts::{colours, game::WINDOW_TITLE},
|
consts::{colours, game::WINDOW_TITLE, path},
|
||||||
persistent_state::PersistentState,
|
persistent_state::PersistentState,
|
||||||
system_info::SystemInfo,
|
system_info::SystemInfo,
|
||||||
win,
|
win,
|
||||||
@@ -283,6 +283,11 @@ impl App {
|
|||||||
.response
|
.response
|
||||||
.on_disabled_hover_text("This requires administrator.\nUse the Elevate button.");
|
.on_disabled_hover_text("This requires administrator.\nUse the Elevate button.");
|
||||||
});
|
});
|
||||||
|
ui.collapsing("Miscellaneous", |ui| {
|
||||||
|
if ui.button("Open storage path").clicked() {
|
||||||
|
open::that_detached(path::APP_STORAGE.as_path()).unwrap();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn show_about_stage(&self, _ctx: &egui::Context, ui: &mut egui::Ui) {
|
fn show_about_stage(&self, _ctx: &egui::Context, ui: &mut egui::Ui) {
|
||||||
|
|||||||
+1
-7
@@ -3,19 +3,13 @@ use crate::{
|
|||||||
app::{App, WINDOW_SIZE},
|
app::{App, WINDOW_SIZE},
|
||||||
tools,
|
tools,
|
||||||
},
|
},
|
||||||
util::consts::{
|
util::consts::game::{EXE_ENHANCED, EXE_LEGACY},
|
||||||
game::{EXE_ENHANCED, EXE_LEGACY},
|
|
||||||
path,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
|
|
||||||
impl App {
|
impl App {
|
||||||
fn add_debug_viewport_contents(&mut self, ui: &mut egui::Ui) {
|
fn add_debug_viewport_contents(&mut self, ui: &mut egui::Ui) {
|
||||||
ui.collapsing("misc", |ui| {
|
ui.collapsing("misc", |ui| {
|
||||||
if ui.button("open storage path").clicked() {
|
|
||||||
open::that_detached(path::APP_STORAGE.as_path()).unwrap();
|
|
||||||
}
|
|
||||||
ui.scope(|ui| {
|
ui.scope(|ui| {
|
||||||
use windows::Win32::UI::WindowsAndMessaging::{
|
use windows::Win32::UI::WindowsAndMessaging::{
|
||||||
GetForegroundWindow, GetWindowTextW,
|
GetForegroundWindow, GetWindowTextW,
|
||||||
|
|||||||
Reference in New Issue
Block a user