@@ 17,7 17,7 @@ pub struct PlayScreenData {
pub browse_state: PlayScreenBrowseState,
}
#[derive(Default, PartialEq)]
#[derive(Default, PartialEq, Clone)]
pub enum PlayScreenState {
#[default]
Main,
@@ 26,6 26,17 @@ pub enum PlayScreenState {
InLobbyGuest,
}
impl PlayScreenState {
pub fn display(&self) -> &str {
match self {
PlayScreenState::Main => "Play",
PlayScreenState::CreateGame => "Create",
PlayScreenState::InLobbyHost => "Lobby (Host)",
PlayScreenState::InLobbyGuest => "Lobby (Guest)",
}
}
}
#[derive(Default, PartialEq)]
pub enum PlayScreenBrowseState {
#[default]
@@ 20,10 20,9 @@ pub fn ui(
mut data: ResMut<PlayScreenData>,
cfg_user: Res<CfgUser>,
) {
// TODO: title used to be: rtdmenu.play_menu_ui_state.display()).size(32.)
menuwindow(
egui_context.ctx_mut(),
"TEMP",
data.state.clone().display(),
&egui::Vec2::new(800., 600.),
|ui| match data.state {
PlayScreenState::Main => {