mirror of
https://github.com/szymon-jozef/checkers.git
synced 2026-10-27 19:20:44 +01:00
feat: init for macroquad
This commit is contained in:
25
src/bin/macroquad_client.rs
Normal file
25
src/bin/macroquad_client.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use macroquad::{
|
||||
color::BLACK,
|
||||
miniquad::{self, conf::LinuxBackend::WaylandWithX11Fallback},
|
||||
window::{Conf, clear_background, next_frame},
|
||||
};
|
||||
|
||||
fn window_conf() -> Conf {
|
||||
Conf {
|
||||
window_title: "Checkers".to_owned(),
|
||||
window_resizable: true,
|
||||
platform: miniquad::conf::Platform {
|
||||
linux_backend: WaylandWithX11Fallback,
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[macroquad::main(window_conf)]
|
||||
pub async fn main() {
|
||||
loop {
|
||||
clear_background(BLACK);
|
||||
next_frame().await;
|
||||
}
|
||||
}
|
||||
@@ -2,3 +2,4 @@ pub mod logic;
|
||||
pub mod network;
|
||||
pub mod settings;
|
||||
pub mod super_advanced_ai;
|
||||
pub mod ui;
|
||||
|
||||
1
src/ui/macroquad/main_menu.rs
Normal file
1
src/ui/macroquad/main_menu.rs
Normal file
@@ -0,0 +1 @@
|
||||
fn draw_main_menu() {}
|
||||
1
src/ui/macroquad/mod.rs
Normal file
1
src/ui/macroquad/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod main_menu;
|
||||
2
src/ui/mod.rs
Normal file
2
src/ui/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
pub mod macroquad;
|
||||
pub mod state;
|
||||
5
src/ui/state.rs
Normal file
5
src/ui/state.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
pub enum GuiState {
|
||||
MainMenu,
|
||||
Settings,
|
||||
Game,
|
||||
}
|
||||
Reference in New Issue
Block a user