@@ 18,7 18,9 @@ use super::MenuState;
pub(super) struct ToAccountEvent;
pub(super) struct ExitEvent;
-pub(super) fn main_menu_setup(mut commands: Commands) {
+pub(super) fn main_menu_setup(mut commands: Commands, cfg_user: Res<CfgUser>) {
+ let logged_in = cfg_user.logged_in.clone();
+
// TODO: Change the title to a fancy image logo thingy
commands.add(eml! {
<body>
@@ 27,7 29,11 @@ pub(super) fn main_menu_setup(mut commands: Commands) {
"Deck Builder"
</span>
<button c:menubutton s:width="250px" on:press=connect!(|ctx| {
- ctx.commands().insert_resource(NextState(MenuState::Play))
+ // FIXME: I guess hiding the button would be better, but this is something for
+ // now.
+ if logged_in {
+ ctx.commands().insert_resource(NextState(MenuState::Play))
+ }
})>
"Play"
</button>