scroll on tools to rotate between variants

This commit is contained in:
Crispy 2024-10-13 00:55:28 +02:00
parent ed956ffbe4
commit 44017f4ed5
5 changed files with 145 additions and 69 deletions

View file

@ -361,17 +361,10 @@ impl Machine {
WireType::Vertical => WireType::Horizontal,
WireType::Horizontal => WireType::Vertical,
WireType::Cross => WireType::Cross,
};
}
Tile::Mirror(mirror) => {
*mirror = match *mirror {
MirrorType::Forward => MirrorType::Back,
MirrorType::Back => MirrorType::Forward,
};
}
Tile::Arrow(dir) => {
*dir = dir.opposite();
}
}
Tile::Mirror(mirror) => mirror.flip(),
Tile::Arrow(dir) => *dir = dir.opposite(),
_ => (),
};
}