2022-05-04 19:16:40 +02:00
|
|
|
#include "fiber_pool.hpp"
|
|
|
|
#include "util/session.hpp"
|
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void view::session() {
|
|
|
|
|
|
|
|
for (const SessionType& session_type : sessions)
|
|
|
|
{
|
|
|
|
components::button(session_type.name, [session_type] {
|
|
|
|
session::join_type(session_type);
|
2022-05-23 06:38:45 +08:00
|
|
|
});
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
|
|
|
if (ImGui::TreeNode("Local Time"))
|
|
|
|
{
|
|
|
|
ImGui::Checkbox("Override Time", &g->session.override_time);
|
|
|
|
|
|
|
|
if (g->session.override_time)
|
|
|
|
{
|
|
|
|
ImGui::SliderInt("Hour", &g->session.custom_time.hour, 0, 23);
|
|
|
|
ImGui::SliderInt("Minute", &g->session.custom_time.minute, 0, 59);
|
|
|
|
ImGui::SliderInt("Second", &g->session.custom_time.second, 0, 59);
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::TreePop();
|
|
|
|
}
|
|
|
|
if (ImGui::TreeNode("Local Weather"))
|
|
|
|
{
|
2022-05-23 06:38:45 +08:00
|
|
|
components::button("Clear Override", [] {
|
|
|
|
MISC::CLEAR_OVERRIDE_WEATHER();
|
|
|
|
});
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
if(ImGui::ListBox("", &g->session.local_weather, session::weathers, 15))
|
|
|
|
{
|
|
|
|
g_fiber_pool->queue_job([]
|
|
|
|
{
|
|
|
|
session::local_weather();
|
|
|
|
});
|
|
|
|
|
|
|
|
ImGui::ListBoxFooter();
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::TreePop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|