#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use pittore::prelude::*;
struct App;
impl PittoreApp for App {
fn update(&mut self, c: &mut Context) {
if c.key_just_pressed(KeyCode::KeyZ) {
println!("key Z was pressed");
}
let screen_size = c.render_state.resolution();
if let Some(position) = c.cursor_position() {
let position = vec2(position.x as f32, screen_size.y as f32 - position.y as f32);
c.draw_circles([Instance2d {
transform: Transform2d::from_translation(position).with_scale(Vec2::splat(64.0)),
..Default::default()
}]);
}
}
}
fn main() {
pittore::run("pittore", App);
}