diff options
Diffstat (limited to 'pixel-client/src/menu')
-rw-r--r-- | pixel-client/src/menu/background.rs | 17 | ||||
-rw-r--r-- | pixel-client/src/menu/main.rs | 6 | ||||
-rw-r--r-- | pixel-client/src/menu/mod.rs | 16 | ||||
-rw-r--r-- | pixel-client/src/menu/settings.rs | 26 |
4 files changed, 60 insertions, 5 deletions
diff --git a/pixel-client/src/menu/background.rs b/pixel-client/src/menu/background.rs index daf89360..dd5ab97c 100644 --- a/pixel-client/src/menu/background.rs +++ b/pixel-client/src/menu/background.rs @@ -1,3 +1,20 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +*/ use crate::{ render::{sprite::SpriteDraw, AtlasLayout, Renderer}, tilemap::Tilemap, diff --git a/pixel-client/src/menu/main.rs b/pixel-client/src/menu/main.rs index 37cecd3e..f5ea5cd6 100644 --- a/pixel-client/src/menu/main.rs +++ b/pixel-client/src/menu/main.rs @@ -15,7 +15,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -use super::{background::MenuBackground, settings::Settings}; +use super::{background::MenuBackground, settings::SettingsMenu}; use crate::{ game::Game, network::Network, @@ -35,7 +35,7 @@ pub struct MainMenu { pub ui_state: UiState, server_address: String, next_state: Option<Box<State>>, - settings: Option<Settings>, + settings: Option<SettingsMenu>, } impl MainMenu { @@ -82,7 +82,7 @@ impl MainMenu { } ui.textedit(80., &mut self.server_address); if ui.button(80., "Settings") { - self.settings = Some(Settings::default()) + self.settings = Some(SettingsMenu::default()) } if ui.button(80., "Quit") { self.next_state = Some(Box::new(State::Quit)); diff --git a/pixel-client/src/menu/mod.rs b/pixel-client/src/menu/mod.rs index d712eaa9..f09e4fdf 100644 --- a/pixel-client/src/menu/mod.rs +++ b/pixel-client/src/menu/mod.rs @@ -1,4 +1,20 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +*/ pub mod main; pub mod background; pub mod settings; diff --git a/pixel-client/src/menu/settings.rs b/pixel-client/src/menu/settings.rs index db524496..90668039 100644 --- a/pixel-client/src/menu/settings.rs +++ b/pixel-client/src/menu/settings.rs @@ -1,11 +1,33 @@ +/* + Hurry Curry! - a game about cooking + Copyright 2024 metamuffin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +*/ use crate::ui::Ui; +pub struct Settings { + pub username: String, +} + #[derive(Default)] -pub struct Settings {} +pub struct SettingsMenu {} -impl Settings { +impl SettingsMenu { pub fn draw(&mut self, ui: &mut Ui) -> bool { ui.text("Settings placeholder"); + return ui.button(80., "Back"); } } |