feat(session): cleaned up switcher GUI (#324)

This commit is contained in:
Yimura 2022-07-06 11:59:08 +02:00 committed by GitHub
parent fa90f775e7
commit 034931b670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"))
{