Reformat CRLF -> LF. Adding a WIP GUI too.
This commit is contained in:
parent
4ed370d51f
commit
4436c79c65
23
src/main.rs
23
src/main.rs
@ -6,7 +6,7 @@ fn main() {
|
|||||||
"Billy Sheet editor",
|
"Billy Sheet editor",
|
||||||
options,
|
options,
|
||||||
Box::new(|ctx| {
|
Box::new(|ctx| {
|
||||||
ctx.egui_ctx.options().screen_reader = true;
|
// ctx.egui_ctx.options().screen_reader = true;
|
||||||
Box::new(Gui::default())
|
Box::new(Gui::default())
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -39,7 +39,7 @@ impl eframe::App for Gui {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ui.button(format!("Edit mode {}", self.edit_mode)).clicked() {
|
if ui.button(format!("Edit mode {}", self.edit_mode)).clicked() {
|
||||||
self.edit_mode = !self.edit_mode;
|
self.edit_mode = !self.edit_mode.clone();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -47,8 +47,23 @@ impl eframe::App for Gui {
|
|||||||
ui.heading("My egui Application");
|
ui.heading("My egui Application");
|
||||||
ui.separator();
|
ui.separator();
|
||||||
ui.vertical_centered_justified(|ui| {
|
ui.vertical_centered_justified(|ui| {
|
||||||
ui.label("Hello");
|
let mut tmp_str = self.test.character().to_string();
|
||||||
// ui.text_edit_multiline(self.test.name());
|
ui.text_edit_multiline(&mut tmp_str);
|
||||||
|
self.test.character = tmp_str;
|
||||||
|
});
|
||||||
|
ui.columns(2, |columns| {
|
||||||
|
// let mut col_1_ui = &mut columns[0];
|
||||||
|
// let mut col_2_ui = &mut columns[1];
|
||||||
|
columns[0].columns(2, |two_columns| {
|
||||||
|
// let mut in_col1 = &mut two_columns[0];
|
||||||
|
// let mut in_col2 = &mut two_columns[1];
|
||||||
|
two_columns[0].vertical_centered_justified(|ui| {
|
||||||
|
ui.heading("Habileté");
|
||||||
|
});
|
||||||
|
two_columns[1].vertical_centered_justified(|ui| {
|
||||||
|
ui.heading("Adresse");
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if ctx
|
if ctx
|
||||||
|
Loading…
Reference in New Issue
Block a user