mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-03 16:13:36 +08:00
fix(TabWorld): Fixed overread bug and added local weather override
This commit is contained in:
parent
8df2f5e55f
commit
39f3a66f3d
@ -8,17 +8,36 @@ namespace big
|
||||
{
|
||||
if (ImGui::BeginTabItem("World"))
|
||||
{
|
||||
ImGui::Text("Set Local Time");
|
||||
ImGui::Text("Set Local Time:");
|
||||
if (ImGui::InputInt3(": H:M:s", clock))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
CLOCK::SET_CLOCK_TIME(clock[0], clock[1], clock[3]);
|
||||
CLOCK::SET_CLOCK_TIME(clock[0], clock[1], clock[2]);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
//ImGui::Text("Set Weather:");
|
||||
//MISC::SET_OVERRIDE_WEATHER();
|
||||
ImGui::Text("Set Local Weather:");
|
||||
if (ImGui::BeginCombo("##set_local_weather", weather_names[g_temp.weather_type]))
|
||||
{
|
||||
for (uint8_t i = 0; i < IM_ARRAYSIZE(weather_names); i++)
|
||||
{
|
||||
bool is_selected = (g_temp.weather_type == i);
|
||||
if (ImGui::Selectable(weather_names[i], is_selected))
|
||||
g_temp.weather_type = i;
|
||||
if (is_selected)
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
if (ImGui::Button("Set Weather"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(=)
|
||||
{
|
||||
MISC::SET_WEATHER_TYPE_NOW(weather_types[g_temp.weather_type]);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user