mirror of
https://github.com/kirjavascript/trueLMAO.git
synced 2024-05-20 05:10:21 -04:00
upgrade egui
This commit is contained in:
parent
08f37d6641
commit
72e0ceca2e
1296
Cargo.lock
generated
1296
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -18,8 +18,8 @@ emu = { path = "../emu" }
|
|||
# rfd = "0.8"
|
||||
# hqx = { git = "https://github.com/CryZe/wasmboy-rs", branch = "master" }
|
||||
|
||||
egui = "0.20.1"
|
||||
eframe = { version = "0.20.1", features = ["persistence"] }
|
||||
egui = "0.21.0"
|
||||
eframe = { version = "0.21.0", features = ["persistence"] }
|
||||
# serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
|
||||
|
||||
# native:
|
||||
|
|
|
@ -21,5 +21,8 @@ impl Debug {
|
|||
cpu::cpu_window(&ctx, &emu);
|
||||
palette::palette_window(&ctx, &emu);
|
||||
self.vram.render(&ctx, &emu);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ impl VRAM {
|
|||
"vram",
|
||||
egui::ColorImage {
|
||||
size: [WIDTH*8, (end - start) * 8],
|
||||
pixels: pixels.to_vec(),
|
||||
pixels,
|
||||
},
|
||||
egui::TextureOptions::NEAREST
|
||||
);
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
pub fn dummy_input(ctx: &egui::Context, emu: &mut emu::Megadrive) {
|
||||
let mut value = 0;
|
||||
if ctx.input().key_down(egui::Key::Enter) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::Enter)) {
|
||||
value += emu::io::Gamepad::START;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::W) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::W)) {
|
||||
value += emu::io::Gamepad::U;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::S) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::S)) {
|
||||
value += emu::io::Gamepad::D;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::A) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::A)) {
|
||||
value += emu::io::Gamepad::L;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::D) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::D)) {
|
||||
value += emu::io::Gamepad::R;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::J) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::J)) {
|
||||
value += emu::io::Gamepad::A;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::K) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::K)) {
|
||||
value += emu::io::Gamepad::B;
|
||||
}
|
||||
if ctx.input().key_down(egui::Key::L) {
|
||||
if ctx.input(|i| i.key_down(egui::Key::L)) {
|
||||
value += emu::io::Gamepad::C;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
// When compiling natively:
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn main() {
|
||||
fn main() -> eframe::Result<()> {
|
||||
// Log to stdout (if you run with `RUST_LOG=debug`).
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
|
@ -12,5 +12,5 @@ fn main() {
|
|||
"trueLMAO",
|
||||
native_options,
|
||||
Box::new(|cc| Box::new(frontend::App::new(cc))),
|
||||
);
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ pub fn menu<'a>(fullscreen: &'a mut bool, _frame: &'a mut eframe::Frame) ->
|
|||
|
||||
ui.menu_button("Window", |ui| {
|
||||
if ui.button("Auto-arrange").clicked() {
|
||||
ui.ctx().memory().reset_areas();
|
||||
ui.ctx().memory_mut(|mem| mem.reset_areas());
|
||||
ui.close_menu();
|
||||
}
|
||||
if ui.button("Fullscreen").clicked() {
|
||||
|
|
Loading…
Reference in a new issue