// There is NO WARRANTY.
use crate::prelude::*;
-use piece_specs::{HandLabel, HandLabelPlace};
+use piece_specs::{PieceLabel, PieceLabelPlace};
pub const UNCLAIMED_DESC: &str = "a hand repository";
#[derive(Debug,Serialize,Deserialize)]
struct Hand {
shape: GenericSimpleShape<(), shapelib::Rectangle>,
- label: Option<HandLabel>,
+ label: Option<PieceLabel>,
}
#[derive(Debug,Clone,Default,Serialize,Deserialize)]
};
let fontsz = 4.;
let PosC([x,y]) = {
- use HandLabelPlace::*;
+ use PieceLabelPlace::*;
let eff_size = (self.shape.outline.xy - PosC([2.,2.]))?;
let mut pos = (eff_size * -0.5)?;
let y = &mut pos.0[1];
pub edge: Option<ColourSpec>,
pub edge_width: Option<f64>,
pub shape: Outline,
- pub label: Option<HandLabel>,
+ pub label: Option<PieceLabel>,
}
#[derive(Debug,Clone,Serialize,Deserialize)]
- pub struct HandLabel {
- #[serde(default)] pub place: HandLabelPlace,
+ pub struct PieceLabel {
+ #[serde(default)] pub place: PieceLabelPlace,
pub colour: Option<ColourSpec>,
}
#[derive(Debug,Copy,Clone,Serialize,Deserialize,Eq,PartialEq)]
- pub enum HandLabelPlace {
+ pub enum PieceLabelPlace {
BottomLeft,
TopLeft,
}
}
}
- impl Default for piece_specs::HandLabelPlace {
+ impl Default for piece_specs::PieceLabelPlace {
fn default() -> Self { Self::BottomLeft }
}