55 lines
1.2 KiB
Rust
55 lines
1.2 KiB
Rust
use std::sync::Arc;
|
|
|
|
pub use about::AboutWindow;
|
|
use egui::{Context, ViewportBuilder, ViewportId};
|
|
pub use game::GameWindow;
|
|
pub use gdb::GdbServerWindow;
|
|
pub use hotkeys::HotkeysWindow;
|
|
pub use input::InputWindow;
|
|
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 profile;
|
|
mod terminal;
|
|
mod utils;
|
|
mod vip;
|
|
|
|
pub trait AppWindow {
|
|
fn viewport_id(&self) -> ViewportId;
|
|
fn sim_id(&self) -> SimId {
|
|
SimId::Player1
|
|
}
|
|
fn initial_viewport(&self) -> ViewportBuilder;
|
|
fn show(&mut self, ctx: &Context);
|
|
fn on_init(&mut self, args: InitArgs) {
|
|
let _ = args;
|
|
}
|
|
fn on_destroy(&mut self) {}
|
|
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
|
|
}
|
|
}
|
|
|
|
pub struct InitArgs<'a> {
|
|
pub ctx: &'a Context,
|
|
pub window: &'a Arc<Window>,
|
|
pub render_state: &'a egui_wgpu::RenderState,
|
|
}
|