mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-17 04:45:02 +01:00
more
This commit is contained in:
parent
39f436e014
commit
766e5935a1
2 changed files with 48 additions and 2 deletions
25
src/tiles.rs
25
src/tiles.rs
|
|
@ -2,12 +2,35 @@ use std::{fmt::Debug, marker::PhantomData};
|
||||||
|
|
||||||
use egui_inspect::{derive::Inspect, Inspect};
|
use egui_inspect::{derive::Inspect, Inspect};
|
||||||
|
|
||||||
#[derive(Inspect)]
|
|
||||||
pub struct TileDef {
|
pub struct TileDef {
|
||||||
pub layer: (),
|
pub layer: (),
|
||||||
//ADD pub blend_graphic: String,
|
//ADD pub blend_graphic: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ::egui_inspect::Inspect for TileDef {
|
||||||
|
fn inspect(&self, ui: &mut ::egui::Ui, id_source: u64) {}
|
||||||
|
fn inspect_mut(&mut self, ui: &mut ::egui::Ui, id_source: u64) {
|
||||||
|
::egui::CollapsingHeader::new("TileDef")
|
||||||
|
.id_source(id_source)
|
||||||
|
.show(ui, |ui| {
|
||||||
|
ui.horizontal(|ui| {
|
||||||
|
if ui
|
||||||
|
.add(::egui::Label::new("pub layer : ()").sense(::egui::Sense::click()))
|
||||||
|
.clicked()
|
||||||
|
{
|
||||||
|
ui.output_mut(|o| {
|
||||||
|
o.copied_text = {
|
||||||
|
let res = ::std::fmt::format(format_args!("{0:?}", self.layer));
|
||||||
|
res
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
::egui_inspect::Inspect::inspect_mut(&mut self.layer, ui, 0usize as u64)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Debug for TileDef {
|
impl Debug for TileDef {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
loop {}
|
loop {}
|
||||||
|
|
|
||||||
25
tiles.rs
25
tiles.rs
|
|
@ -2,12 +2,35 @@ use std::{fmt::Debug, marker::PhantomData};
|
||||||
|
|
||||||
use egui_inspect::{derive::Inspect, Inspect};
|
use egui_inspect::{derive::Inspect, Inspect};
|
||||||
|
|
||||||
#[derive(Inspect)]
|
|
||||||
pub struct TileDef {
|
pub struct TileDef {
|
||||||
pub layer: (),
|
pub layer: (),
|
||||||
//ADD pub blend_graphic: String,
|
//ADD pub blend_graphic: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ::egui_inspect::Inspect for TileDef {
|
||||||
|
fn inspect(&self, ui: &mut ::egui::Ui, id_source: u64) {}
|
||||||
|
fn inspect_mut(&mut self, ui: &mut ::egui::Ui, id_source: u64) {
|
||||||
|
::egui::CollapsingHeader::new("TileDef")
|
||||||
|
.id_source(id_source)
|
||||||
|
.show(ui, |ui| {
|
||||||
|
ui.horizontal(|ui| {
|
||||||
|
if ui
|
||||||
|
.add(::egui::Label::new("pub layer : ()").sense(::egui::Sense::click()))
|
||||||
|
.clicked()
|
||||||
|
{
|
||||||
|
ui.output_mut(|o| {
|
||||||
|
o.copied_text = {
|
||||||
|
let res = ::std::fmt::format(format_args!("{0:?}", self.layer));
|
||||||
|
res
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
::egui_inspect::Inspect::inspect_mut(&mut self.layer, ui, 0usize as u64)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Debug for TileDef {
|
impl Debug for TileDef {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
loop {}
|
loop {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue