gui experiments, add zooming

This commit is contained in:
Crispy 2024-10-04 21:20:53 +02:00
parent de09b785d0
commit af31531869
4 changed files with 161 additions and 13 deletions

View file

@ -1,12 +1,6 @@
use std::collections::HashMap;
use raylib::{
color::Color,
drawing::{RaylibDraw, RaylibDrawHandle},
ffi::Rectangle,
math::Vector2,
texture::Texture2D,
};
use raylib::prelude::*;
use super::board::Pos;
@ -98,6 +92,7 @@ impl Tile {
x: i32,
y: i32,
size: i32,
zoom:i32,
) {
let tex_name = match self {
Tile::Blank => "",
@ -150,7 +145,7 @@ impl Tile {
texture,
Vector2::new((x - size / 2) as f32, (y - size / 2) as f32),
0.0,
2.0,
(1<<zoom) as f32,
Color::WHITE,
);
return;