Reformat with cargo fmt
This commit is contained in:
parent
505aed8138
commit
fbf3d3815c
17
.fleet/run.json
Normal file
17
.fleet/run.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "cargo",
|
||||||
|
"name": "Run Release",
|
||||||
|
"workingDir": ".",
|
||||||
|
"cargoArgs": ["run", "--release"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "cargo",
|
||||||
|
"name": "Build Release",
|
||||||
|
"cargoArgs": ["build", "--release"],
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
17
src/gui.rs
17
src/gui.rs
@ -1,10 +1,19 @@
|
|||||||
use eframe::egui;
|
|
||||||
use eframe::egui::Ui;
|
use eframe::egui::Ui;
|
||||||
|
|
||||||
use crate::sheet::{Characteristic, CharacterSheet};
|
use crate::sheet::Characteristic;
|
||||||
|
|
||||||
pub trait SheetGui where Self: Sized {
|
pub trait SheetGui
|
||||||
fn shortcut(&self, _ui: &mut Ui, category: &str, character_field: &Characteristic) -> (u32, u32, u32) { (0, 0, 0) }
|
where
|
||||||
|
Self: Sized,
|
||||||
|
{
|
||||||
|
fn shortcut(
|
||||||
|
&self,
|
||||||
|
_ui: &mut Ui,
|
||||||
|
_category: &str,
|
||||||
|
_character_field: &Characteristic,
|
||||||
|
) -> (u32, u32, u32) {
|
||||||
|
(0, 0, 0)
|
||||||
|
}
|
||||||
fn gui_address(&mut self, ui: &mut Ui);
|
fn gui_address(&mut self, ui: &mut Ui);
|
||||||
fn gui_stamina(&mut self, ui: &mut Ui);
|
fn gui_stamina(&mut self, ui: &mut Ui);
|
||||||
fn gui_luck(&mut self, ui: &mut Ui);
|
fn gui_luck(&mut self, ui: &mut Ui);
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
pub mod sheet;
|
|
||||||
pub mod gui;
|
pub mod gui;
|
||||||
|
pub mod sheet;
|
||||||
|
@ -73,7 +73,9 @@ impl eframe::App for Gui {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if ctx.input_mut().consume_key(egui::Modifiers::CTRL, egui::Key::Q)
|
if ctx
|
||||||
|
.input_mut()
|
||||||
|
.consume_key(egui::Modifiers::CTRL, egui::Key::Q)
|
||||||
{
|
{
|
||||||
_frame.close();
|
_frame.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user