feat(Network): Region Switcher (#580)

This commit is contained in:
Aure7138
2022-11-12 07:13:01 +08:00
committed by GitHub
parent e1b886d5c2
commit 0f4bf817ff
4 changed files with 42 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include "views/view.hpp"
#include "fiber_pool.hpp"
#include "util/session.hpp"
#include "core/data/region_codes.hpp"
namespace big
{
@ -25,6 +26,19 @@ namespace big
}
ImGui::EndListBox();
}
components::sub_title("Region Switcher");
if (ImGui::ListBoxHeader("###region_switch"))
{
for (const auto& region_type : regions)
{
components::selectable(region_type.name, *g_pointers->m_region_code == region_type.id, [&region_type]
{
*g_pointers->m_region_code = region_type.id;
});
}
ImGui::EndListBox();
}
components::sub_title("Chat");
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);