@@ 59,22 59,24 @@ pub(super) fn show(
match rtdmenu.play_menu_ui_state {
PlayMenuUIState::Main => {
egui::SidePanel::left("play_side_panel").show_inside(ui, |ui| {
ui.vertical_centered(|ui| {
if ui.button("Create").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::CreateGame
}
egui::SidePanel::left("play_side_panel")
.resizable(false)
.show_inside(ui, |ui| {
ui.vertical_centered(|ui| {
if ui.button("Create").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::CreateGame
}
if ui.button("Refresh Browse").clicked() {
allforming_ev_w.send(AllFormingEvent);
}
if ui.button("Refresh Browse").clicked() {
allforming_ev_w.send(AllFormingEvent);
}
if ui.button("Back").clicked() {
commands.insert_resource(NextState(PlayMenuState::None));
commands.insert_resource(NextState(MenuState::Main));
}
if ui.button("Back").clicked() {
commands.insert_resource(NextState(PlayMenuState::None));
commands.insert_resource(NextState(MenuState::Main));
}
});
});
});
match rtdmenu.waiting_for_all_forming_call {
true => {
@@ 92,14 94,29 @@ pub(super) fn show(
}
false => {
for game in &rtdmenu.all_forming_games {
egui::Frame::none().show(ui, |ui| {
ui.horizontal(|ui| {
ui.label(format!("Host: {}", game.p1));
egui::Frame::none()
.fill(egui::Color32::BLACK)
.outer_margin(4.)
.inner_margin(4.)
.show(ui, |ui| {
ui.horizontal(|ui| {
ui.label(format!("Host: {}", game.p1));
ui.with_layout(
egui::Layout::right_to_left(
egui::Align::Center,
),
|ui| {
if ui.button("Join").clicked() {
todo!();
}
},
);
});
});
});
}
}
});
}
});
});
}
}