worlds-history-sim-rs/src/resources/mod.rs

16 lines
401 B
Rust
Raw Normal View History

2022-09-06 20:40:27 +02:00
#[cfg(feature = "render")]
use std::fmt::Display;
#[cfg(feature = "render")]
#[derive(Default, Debug)]
pub(crate) struct CursorMapPosition {
pub(crate) x: i32,
pub(crate) y: i32,
}
#[cfg(feature = "render")]
impl Display for CursorMapPosition {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!("x: {}, y: {}", self.x, self.y))
}
}