Skip to content

Commit

Permalink
Adjust piece counter position.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramirisu committed Sep 18, 2024
1 parent 43a9780 commit 44b0004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ impl GameTransform {
pub fn piece_count_translation(&self, index: usize, x: i32, y: i32) -> Vec3 {
(Vec2::new(x as f32 + 0.5, y as f32) * self.piece_count_square_size()
+ Vec2::new(
-self.board_width() - self.square_width(),
-self.board_width() - self.square_width() * 2.0,
-self.square_height() * 2.0 - self.square_height() * 1.5 * index as f32,
))
.extend(BOARD_LAYER)
}

pub fn piece_count_counter_translation(&self, index: usize) -> Vec3 {
Vec3::new(
-self.board_width() + self.square_width() * 2.0,
-self.board_width() + self.square_width(),
-self.square_height() * 2.0 - self.square_height() * 1.5 * index as f32,
BOARD_LAYER,
)
Expand Down

0 comments on commit 44b0004

Please sign in to comment.