62 lines
1.5 KiB
Rust
62 lines
1.5 KiB
Rust
use std::{path::PathBuf, sync::Arc};
|
|
|
|
pub use about::AboutWindow;
|
|
use egui::{Ui, ViewportBuilder};
|
|
pub use game::{ChildWindow, GameWindow};
|
|
pub use game_screen::{DisplayMode, GameScreen};
|
|
pub use gdb::GdbServerWindow;
|
|
pub use hotkeys::HotkeysWindow;
|
|
pub use input::InputWindow;
|
|
pub use memory::MemoryWindow;
|
|
pub use profile::ProfileWindow;
|
|
pub use terminal::TerminalWindow;
|
|
pub use vip::{
|
|
BgMapWindow, CharacterDataWindow, FrameBufferWindow, ObjectWindow, RegisterWindow, WorldWindow,
|
|
};
|
|
use winit::{event::KeyEvent, window::Window};
|
|
|
|
use crate::emulator::SimId;
|
|
|
|
mod about;
|
|
mod game;
|
|
mod game_screen;
|
|
mod gdb;
|
|
mod hotkeys;
|
|
mod input;
|
|
mod memory;
|
|
mod profile;
|
|
mod terminal;
|
|
mod utils;
|
|
mod vip;
|
|
|
|
pub trait AppWindow {
|
|
fn sim_id(&self) -> Option<SimId> {
|
|
None
|
|
}
|
|
fn image_url(&self, name: &str) -> String {
|
|
format!("vip://{}/{name}", self.sim_id().unwrap_or(SimId::Player1))
|
|
}
|
|
fn initial_viewport(&self) -> ViewportBuilder;
|
|
fn show(&mut self, ui: &mut Ui);
|
|
fn on_init(&mut self, args: InitArgs) {
|
|
let _ = args;
|
|
}
|
|
fn handle_key_event(&mut self, event: &KeyEvent) -> bool {
|
|
let _ = event;
|
|
false
|
|
}
|
|
fn handle_gamepad_event(&mut self, event: &gilrs::Event) -> bool {
|
|
let _ = event;
|
|
false
|
|
}
|
|
fn handle_dropped_file(&mut self, path: PathBuf) -> bool {
|
|
let _ = path;
|
|
false
|
|
}
|
|
}
|
|
|
|
pub struct InitArgs<'a> {
|
|
pub window: &'a Arc<Window>,
|
|
pub render_state: &'a egui_wgpu::RenderState,
|
|
}
|