add tooltips

This commit is contained in:
Crispy 2024-12-19 20:24:08 +01:00
parent fea00da8a3
commit 4d05d5a3ee
4 changed files with 235 additions and 70 deletions

View file

@ -270,6 +270,15 @@ impl Direction {
}
}
pub const fn arrow_tile_human_name(self) -> &'static str {
match self {
Direction::Up => "Up Arrow",
Direction::Down => "Down Arrow",
Direction::Left => "Left Arrow",
Direction::Right => "Right Arrow",
}
}
pub const fn arrow_texture_name(self) -> &'static str {
match self {
Direction::Up => "direction_up",
@ -320,6 +329,7 @@ impl WireType {
WireType::Cross => "wire_cross_on",
}
}
pub const fn texture_name_off(self) -> &'static str {
match self {
WireType::Vertical => "wire_vertical_off",
@ -327,6 +337,14 @@ impl WireType {
WireType::Cross => "wire_cross_off",
}
}
pub const fn human_name(self) -> &'static str {
match self {
WireType::Vertical => "Vertical Wire",
WireType::Horizontal => "Horizontal Wire",
WireType::Cross => "Wire Cross",
}
}
}
impl MirrorType {
@ -360,9 +378,26 @@ impl MirrorType {
MirrorType::Back => "mirror_back",
}
}
pub const fn human_name(self) -> &'static str {
match self {
MirrorType::Forward => "Mirror A",
MirrorType::Back => "Mirror B",
}
}
}
impl MathOp {
pub const fn human_name(self) -> &'static str {
match self {
MathOp::Add => "Math: Add",
MathOp::Sub => "Math: Subtract",
MathOp::Mul => "Math: Multiply",
MathOp::Div => "Math: Divide",
MathOp::Rem => "Math: Remainder",
}
}
pub const fn texture_name_on(self) -> &'static str {
match self {
MathOp::Add => "add_on",
@ -372,6 +407,7 @@ impl MathOp {
MathOp::Rem => "rem_on",
}
}
pub const fn texture_name_off(self) -> &'static str {
match self {
MathOp::Add => "add_off",
@ -404,6 +440,15 @@ impl MathOp {
}
impl Comparison {
pub const fn human_name(self) -> &'static str {
match self {
Comparison::LessThan => "Comparator: Less than",
Comparison::GreaterThan => "Comparator: Greater than",
Comparison::Equal => "Comparator: Equal",
Comparison::NotEqual => "Comparator: Not Equal",
}
}
pub const fn texture_name_on(self) -> &'static str {
match self {
Comparison::LessThan => "lt_on",
@ -412,6 +457,7 @@ impl Comparison {
Comparison::NotEqual => "neq_on",
}
}
pub const fn texture_name_off(self) -> &'static str {
match self {
Comparison::LessThan => "lt_off",