DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

4dccf20ba755264a82371f67a2ea876c4c760e27 — Jonni Liljamo 1 year, 8 months ago c727dab
feat(client): init browse view
M client/src/plugins/menu/mod.rs => client/src/plugins/menu/mod.rs +1 -0
@@ 69,6 69,7 @@ pub enum MenuUIState {
    Login,
    Register,
    Main,
    Browse,

}


A client/src/plugins/menu/ui/browse.rs => client/src/plugins/menu/ui/browse.rs +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 client/src/plugins/menu/ui/mod.rs => client/src/plugins/menu/ui/mod.rs +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),
        }
    });
}