Compare commits
4 Commits
281e4eb9f0
...
e4dc131808
Author | SHA1 | Date | |
---|---|---|---|
|
e4dc131808 | ||
|
fbf3d3815c | ||
|
505aed8138 | ||
|
94ba4b698c |
@ -1,15 +1,17 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"type": "cargo",
|
||||
"name": "Build release",
|
||||
"cargoArgs": ["build", "--release"],
|
||||
},
|
||||
{
|
||||
"type": "cargo",
|
||||
"name": "Run release",
|
||||
"cargoArgs": ["run", "--release"],
|
||||
},
|
||||
"configurations": [
|
||||
{
|
||||
"type": "cargo",
|
||||
"name": "Run Release",
|
||||
"workingDir": ".",
|
||||
"cargoArgs": ["run", "--release"],
|
||||
},
|
||||
{
|
||||
"type": "cargo",
|
||||
"name": "Build Release",
|
||||
"cargoArgs": ["build", "--release"],
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto
|
61
src/sheet.rs
61
src/sheet.rs
@ -1,6 +1,9 @@
|
||||
use eframe::egui::widgets::DragValue;
|
||||
use eframe::egui::Ui;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
use serde::{Deserialize, Serialize};
|
||||
>>>>>>> 281e4eb9f0a44494530a7bc3422fcd557a26088f
|
||||
|
||||
use crate::gui::SheetGui;
|
||||
|
||||
@ -83,6 +86,63 @@ impl SheetGui for CharacterSheet {
|
||||
let mut carac = character_field.carac;
|
||||
let mut materiel = character_field.materiel;
|
||||
ui.heading(category);
|
||||
<<<<<<< HEAD
|
||||
ui.columns(2, |columns| {
|
||||
let mut ui_column = &mut columns[0];
|
||||
ui_column.label("Base");
|
||||
ui_column.label("Carac.");
|
||||
ui_column.label("Matériel");
|
||||
|
||||
ui_column = &mut columns[1];
|
||||
ui_column.add(DragValue::new(&mut base));
|
||||
ui_column.add(DragValue::new(&mut carac));
|
||||
ui_column.add(DragValue::new(&mut materiel));
|
||||
});
|
||||
return (base, carac, materiel);
|
||||
}
|
||||
|
||||
fn gui_address(&mut self, ui: &mut Ui) {
|
||||
let workaround: &CharacterSheet = self;
|
||||
(self.address.base, self.address.carac, self.address.materiel) =
|
||||
self.shortcut(ui, "Habileté", workaround.address());
|
||||
ui.label("Ne peut dépasser 5");
|
||||
}
|
||||
|
||||
fn gui_stamina(&mut self, ui: &mut Ui) {
|
||||
let workaround: &CharacterSheet = self;
|
||||
(self.stamina.base, self.stamina.carac, self.stamina.materiel) =
|
||||
self.shortcut(ui, "Endurance", workaround.stamina());
|
||||
}
|
||||
|
||||
fn gui_luck(&mut self, ui: &mut Ui) {
|
||||
let workaround: &CharacterSheet = self;
|
||||
(self.luck.base, self.luck.carac, self.luck.materiel) =
|
||||
self.shortcut(ui, "Chance", workaround.luck());
|
||||
}
|
||||
|
||||
fn gui_skill(&mut self, ui: &mut Ui) {
|
||||
let workaround: &CharacterSheet = self;
|
||||
(self.skill.base, self.skill.carac, self.skill.materiel) =
|
||||
self.shortcut(ui, "Habileté", workaround.skill());
|
||||
}
|
||||
|
||||
fn secondary_stats(&mut self, ui: &mut Ui) {
|
||||
let workaround: &CharacterSheet = self;
|
||||
ui.heading("Stat. secondaires");
|
||||
ui.columns(2, |columns| {
|
||||
columns[0].vertical_centered_justified(|ui| {
|
||||
ui.label("Dégâts");
|
||||
ui.label("Armure");
|
||||
ui.label("Critique");
|
||||
});
|
||||
columns[1].vertical_centered_justified(|ui| {
|
||||
let mut damage = workaround.damage;
|
||||
let mut armor = workaround.armor;
|
||||
ui.add(DragValue::new(&mut damage));
|
||||
ui.add(DragValue::new(&mut armor));
|
||||
});
|
||||
});
|
||||
=======
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Base");
|
||||
ui.add(DragValue::new(&mut base));
|
||||
@ -139,6 +199,7 @@ impl SheetGui for CharacterSheet {
|
||||
ui.add(DragValue::new(&mut armor));
|
||||
});
|
||||
ui.label("Critique");
|
||||
>>>>>>> 281e4eb9f0a44494530a7bc3422fcd557a26088f
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user