rust-raylib-playground/main.rs

15 lines
425 B
Rust
Raw Normal View History

2024-02-16 21:06:00 +00:00
mod raylib;
fn main() {
raylib::init_window(800, 600, "Hello, raylib");
while !raylib::window_should_close() {
raylib::begin_drawing();
raylib::draw_rect(0, 0, 100, 200, raylib::Color(255, 0, 0, 255));
if raylib::is_key_pressed(raylib::Key::Z) {
raylib::draw_rect(200, 200, 100, 100, raylib::Color(0, 255, 0, 0));
}
raylib::end_drawing();
}
}