M => +1 -0
@@ 69,6 69,7 @@ pub enum MenuUIState {
Login,
Register,
Main,
Browse,
}
A => +21 -0
@@ 0,0 1,21 @@
/*
* This file is part of laurelin_client
* Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
*
* Licensed under GPL-3.0-only.
* See LICENSE for licensing information.
*/
use bevy::prelude::*;
use bevy_egui::egui;
use crate::{util::egui::password, plugins::LoginCallEvent};
use super::{MenuData, MenuUIState};
pub fn view(
ui: &mut egui::Ui,
data: &mut MenuData,
) {
ui.label("browse");
}
M => +6 -1
@@ 16,6 16,8 @@ pub use super::{MenuData, MenuUIState};
mod login;
mod register;
mod browse;
pub fn ui(
mut contexts: EguiContexts,
mut data: ResMut<MenuData>,
@@ 37,8 39,11 @@ pub fn ui(
MenuUIState::Login => login::view(ui, &mut data, &mut login_ev_w),
MenuUIState::Register => register::view(ui, &mut data, &mut register_ev_w),
MenuUIState::Main => {
ui.label("main menu");
if ui.button("Play").clicked() {
data.ui_state = MenuUIState::Browse;
}
}
MenuUIState::Browse => browse::view(ui, &mut data),
}
});
}