15 lines
425 B
Rust
15 lines
425 B
Rust
|
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();
|
||
|
}
|
||
|
}
|
||
|
|