TmpMenu/src/views/world/view_time_and_weather.cpp
thehorizon84 b93a072fe6 feat: New world options + Request Gun Van anywhere (#2393)
+ World -> Gravity Editor (with presets for ease of use)
+ World -> Waypoint Beacon
+ World -> Objective Beacon
+ World -> Time And Weather -> Ground Snow
+ Self -> Mobile -> Request Gun Van (spawns the gun van right in front of you no matter where you are)
2023-11-08 23:16:10 +01:00

47 lines
1.1 KiB
C++

#include "core/data/weathers.hpp"
#include "fiber_pool.hpp"
#include "util/session.hpp"
#include "views/view.hpp"
namespace big
{
void view::time_and_weather()
{
components::command_checkbox<"timeoverride">();
if (g.world.custom_time.override_time)
{
ImGui::SliderInt("HOUR"_T.data(), &g.world.custom_time.hour, 0, 23);
ImGui::SliderInt("MINUTE"_T.data(), &g.world.custom_time.minute, 0, 59);
ImGui::SliderInt("SECOND"_T.data(), &g.world.custom_time.second, 0, 59);
}
components::command_checkbox<"weatheroverride">();
if (g.world.override_weather)
{
if (ImGui::BeginCombo("VIEW_TIME_AND_WEATHER_WEATHER"_T.data(), weathers[g.world.local_weather]))
{
for (int i = 0; i < weathers.size(); i++)
{
if (ImGui::Selectable(weathers[i], g.world.local_weather == i))
{
g.world.local_weather = i;
}
if (g.world.local_weather == i)
{
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndCombo();
}
}
components::command_checkbox<"blackout">();
components::command_checkbox<"groundsnow">();
}
}