apply of clippy.
fixed missing imports and builds and tests as expected again
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
use std::path::PathBuf;
|
||||
use std::time::Instant;
|
||||
use crate::support::gemma_egui_support::{EGuiFileList, GemmaEguiSupport};
|
||||
use crate::support::gemma_egui_state::GemmaEGuiState;
|
||||
use eframe::egui;
|
||||
use egui::{Key, Ui};
|
||||
use egui::Key;
|
||||
use gemma::chip8::computer::Chip8Computer;
|
||||
use gemma::chip8::computer_manager::Chip8ComputerManager;
|
||||
|
||||
@@ -58,7 +57,7 @@ fn main() -> eframe::Result {
|
||||
};
|
||||
|
||||
eframe::run_simple_native("EGUI Gemma", options, move |ctx, _frame| {
|
||||
catppuccin_egui::set_theme(&ctx, catppuccin_egui::MOCHA);
|
||||
catppuccin_egui::set_theme(ctx, catppuccin_egui::MOCHA);
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
let frame_start_time = Instant::now();
|
||||
|
||||
@@ -70,11 +69,11 @@ fn main() -> eframe::Result {
|
||||
ui.heading("EGUI Gemma");
|
||||
|
||||
// if state.display_memory {
|
||||
GemmaEguiSupport::memory_view(&local_computer, ui);
|
||||
GemmaEguiSupport::memory_view(local_computer, ui);
|
||||
// }
|
||||
|
||||
// if state.display_registers {
|
||||
GemmaEguiSupport::registers_view(&local_computer, ui);
|
||||
GemmaEguiSupport::registers_view(local_computer, ui);
|
||||
// }
|
||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::TOP), |ui| {
|
||||
if ui.button("Start").clicked() {
|
||||
@@ -100,7 +99,7 @@ fn main() -> eframe::Result {
|
||||
computer.load_bytes_to_system_memory(read_bin);
|
||||
};
|
||||
EGuiFileList::display_path(PathBuf::from("resources/roms"), &mut state.selected_filename, ui);
|
||||
let input = ctx.input(|input| {
|
||||
ctx.input(|input| {
|
||||
// loop through the keys we are checking...
|
||||
for row in LIN_KEYS {
|
||||
for (keyboard_key, keypad_key) in row {
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
use std::fs::read_dir;
|
||||
use std::ops::Index;
|
||||
use std::path::{Display, PathBuf};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use egui::{Align, Color32, ComboBox, Direction, Pos2, Response, TextBuffer};
|
||||
use std::path::PathBuf;
|
||||
use egui::{Align, Color32, ComboBox, Pos2, TextBuffer};
|
||||
use egui::Rect;
|
||||
use egui::Vec2;
|
||||
use egui::Ui;
|
||||
use egui::WidgetType::SelectableLabel;
|
||||
use crate::Chip8Computer;
|
||||
|
||||
const CELL_WIDTH: f32 = 5.0;
|
||||
@@ -16,7 +12,7 @@ const CELL_HEIGHT: f32 = 5.0;
|
||||
pub struct EGuiFileList {}
|
||||
impl EGuiFileList {
|
||||
pub fn display_path(root: PathBuf, selected_filename: &mut String, ui: &mut Ui) {
|
||||
let mut working_filename = selected_filename.clone();
|
||||
let working_filename = selected_filename.clone();
|
||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::TOP), |ui| {
|
||||
// ui.label(format!("Displaying {}", root.to_str().unwrap_or("Unable to Load Path")));
|
||||
ComboBox::from_label("Select ROM")
|
||||
|
||||
Reference in New Issue
Block a user