DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

b6ae1062e34f06645e2d93a2ab7fc959359db637 — Jonni Liljamo 1 year, 9 months ago 0cc6737
feat(client): move connect menu structs to mod from ui
2 files changed, 24 insertions(+), 23 deletions(-)

M client/src/plugins/menu/ui/connect/mod.rs
M client/src/plugins/menu/ui/connect/ui.rs
M client/src/plugins/menu/ui/connect/mod.rs => client/src/plugins/menu/ui/connect/mod.rs +22 -0
@@ 6,5 6,27 @@
 * See LICENSE for licensing information.
 */

use bevy::ecs::system::Resource;

mod ui;
pub use ui::*;

#[derive(Default, Resource)]
pub struct ConnectScreenData {
    pub state: ConnectState,
    pub connecting: bool,
    pub username: String,
    pub email: String,
    pub password: String,
    pub password_confirm: String,
    pub error: String,
}

#[derive(Default, PartialEq)]
pub enum ConnectState {
    #[default]
    Login,
    LoggingIn,
    Register,
    Registering,
}

M client/src/plugins/menu/ui/connect/ui.rs => client/src/plugins/menu/ui/connect/ui.rs +2 -23
@@ 6,10 6,7 @@
 * See LICENSE for licensing information.
 */

use bevy::ecs::{
    system::Resource,
    system::{Res, ResMut},
};
use bevy::ecs::system::{Res, ResMut};
use bevy_inspector_egui::bevy_egui::{egui, EguiContext};
use laurelin_shared::server::messages::Auth;
use naia_bevy_client::Client;


@@ 19,25 16,7 @@ use crate::{
    util::egui::{menuwindow, password},
};

#[derive(Default, Resource)]
pub struct ConnectScreenData {
    pub state: ConnectState,
    pub connecting: bool,
    pub username: String,
    pub email: String,
    pub password: String,
    pub password_confirm: String,
    pub error: String,
}

#[derive(Default, PartialEq)]
pub enum ConnectState {
    #[default]
    Login,
    LoggingIn,
    Register,
    Registering,
}
use super::{ConnectScreenData, ConnectState};

pub fn ui(
    mut egui_context: ResMut<EguiContext>,