From 034931b6700cc7a141f915683139e60da08a28c0 Mon Sep 17 00:00:00 2001 From: Yimura Date: Wed, 6 Jul 2022 11:59:08 +0200 Subject: [PATCH] feat(session): cleaned up switcher GUI (#324) --- BigBaseV2/src/views/network/view_session.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/BigBaseV2/src/views/network/view_session.cpp b/BigBaseV2/src/views/network/view_session.cpp index 8791dea3..ceb1f75f 100644 --- a/BigBaseV2/src/views/network/view_session.cpp +++ b/BigBaseV2/src/views/network/view_session.cpp @@ -4,13 +4,18 @@ namespace big { - void view::session() { - - for (const SessionType& session_type : sessions) + void view::session() + { + components::small_text("Session Switcher"); + if (ImGui::ListBoxHeader("###session_switch")) { - components::button(session_type.name, [session_type] { - session::join_type(session_type); - }); + for (const auto& session_type : sessions) + { + components::selectable(session_type.name, false, [session_type] { + session::join_type(session_type); + }); + } + ImGui::EndListBox(); } if (ImGui::TreeNode("Local Time")) {