mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
Implement platforms
This commit is contained in:
parent
1662857731
commit
47035f1460
5 changed files with 79 additions and 11 deletions
|
|
@ -3,7 +3,7 @@ use crate::{
|
|||
math::TILE_SIZE,
|
||||
};
|
||||
|
||||
use super::TileDb;
|
||||
use super::{TileDb, DEFAULT_TILE_BB};
|
||||
|
||||
pub fn tiledb_edit_ui(ctx: &egui::Context, tile_db: &mut TileDb) {
|
||||
egui::Window::new("Tiledb editor").show(ctx, |ui| {
|
||||
|
|
@ -30,6 +30,23 @@ pub fn tiledb_edit_ui(ctx: &egui::Context, tile_db: &mut TileDb) {
|
|||
}
|
||||
}
|
||||
}
|
||||
match &mut def.bb {
|
||||
Some(bb) => {
|
||||
ui.label("x");
|
||||
ui.add(egui::DragValue::new(&mut bb.x));
|
||||
ui.label("y");
|
||||
ui.add(egui::DragValue::new(&mut bb.y));
|
||||
ui.label("w");
|
||||
ui.add(egui::DragValue::new(&mut bb.w));
|
||||
ui.label("h");
|
||||
ui.add(egui::DragValue::new(&mut bb.h));
|
||||
}
|
||||
None => {
|
||||
if ui.button("Insert bb").clicked() {
|
||||
def.bb = Some(DEFAULT_TILE_BB);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
ui.separator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue