@@ 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,
}
@@ 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>,