91 lines
3.1 KiB
Rust
91 lines
3.1 KiB
Rust
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
use eframe::egui;
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub enum Tab {
|
|
Play,
|
|
FastFlags,
|
|
Mods,
|
|
Audio,
|
|
MultiInstance,
|
|
Maintenance,
|
|
}
|
|
|
|
pub struct MolotovApp {
|
|
current_tab: Tab,
|
|
pub safe_mode: bool,
|
|
pub fps_cap: i64,
|
|
pub vram_skip_mips: bool,
|
|
}
|
|
|
|
impl Default for MolotovApp {
|
|
fn default() -> Self {
|
|
Self {
|
|
current_tab: Tab::Play,
|
|
safe_mode: false,
|
|
fps_cap: 144,
|
|
vram_skip_mips: false,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl MolotovApp {
|
|
pub fn active_tab_name(&self) -> &'static str {
|
|
match self.current_tab {
|
|
Tab::Play => "Play",
|
|
Tab::FastFlags => "FastFlags",
|
|
Tab::Mods => "Mods",
|
|
Tab::Audio => "Audio & Voice",
|
|
Tab::MultiInstance => "Instances",
|
|
Tab::Maintenance => "Maintenance",
|
|
}
|
|
}
|
|
}
|
|
|
|
impl eframe::App for MolotovApp {
|
|
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
|
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
|
|
ui.horizontal(|ui| {
|
|
ui.selectable_value(&mut self.current_tab, Tab::Play, "🎮 Play");
|
|
ui.selectable_value(&mut self.current_tab, Tab::FastFlags, "⚙️ FastFlags");
|
|
ui.selectable_value(&mut self.current_tab, Tab::Mods, "🎨 Mods");
|
|
ui.selectable_value(&mut self.current_tab, Tab::Audio, "🎙️ Audio");
|
|
ui.selectable_value(&mut self.current_tab, Tab::MultiInstance, "👥 Instances");
|
|
ui.selectable_value(&mut self.current_tab, Tab::Maintenance, "🧹 Maintenance");
|
|
});
|
|
});
|
|
|
|
egui::CentralPanel::default().show(ctx, |ui| match self.current_tab {
|
|
Tab::Play => {
|
|
ui.heading("Molotov Roblox Runtime");
|
|
ui.checkbox(&mut self.safe_mode, "Safe Mode (Minimal Flags)");
|
|
if ui.button("🚀 Launch Roblox").clicked() {
|
|
println!("Launch clicked!");
|
|
}
|
|
}
|
|
Tab::FastFlags => {
|
|
ui.heading("Performance & FastFlags");
|
|
ui.add(egui::Slider::new(&mut self.fps_cap, 30..=360).text("Target FPS"));
|
|
ui.checkbox(&mut self.vram_skip_mips, "Reduce VRAM Texture Mipmaps (NVIDIA fix)");
|
|
}
|
|
Tab::Mods => {
|
|
ui.heading("Asset Mods (In-Memory)");
|
|
ui.label("Drop custom ouch.ogg or cursors into ~/.config/molotov/mods/");
|
|
}
|
|
Tab::Audio => {
|
|
ui.heading("PipeWire Voice Chat");
|
|
ui.label("Microphone active stream is destroyed on pause to prevent indicator leaks.");
|
|
}
|
|
Tab::MultiInstance => {
|
|
ui.heading("Multi-Instance Sandboxing (bubblewrap)");
|
|
ui.label("Launch isolated accounts in independent namespaces.");
|
|
}
|
|
Tab::Maintenance => {
|
|
ui.heading("Maintenance & Cleaning");
|
|
if ui.button("Clean Stale Versions").clicked() {
|
|
println!("Clean clicked!");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|