gui experiments, add zooming
This commit is contained in:
parent
de09b785d0
commit
af31531869
4 changed files with 161 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue