General code and GUI cleanup (#1200)
* feat(native_hooks): removed useless bail kick hook * feat(Translations): add button to force update languages * refactor: reorganize GUI for world * refactor: improve exception handler Modified the exception handler to not catch C++ try/catch blocks before those could gracefully catch the error. * chore: debug removed crash test button * chore: removed script exception handler * feat(OrbitalDrone): add translations * feat(VehicleController): add translation keys * feat: added player admin detected translation keys * feat(Views): add cache sub menu
This commit is contained in:
@ -10,22 +10,21 @@ namespace big
|
||||
{
|
||||
ImGui::Separator();
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Text("press 'Look behind' (C/R3 by default) to activate\npress WASD buttons or Left thumbstick to navigate\nUse scroll wheel/Mouse or Right thumbstick to zoom\npress E/Q or L1/R1 to modify speed\npress 'Jump' (Space/X/Square by default) to lock on an entity\npress 'Fire' (Mouse button 1/Right trigger by default) to Obliterate\npress Enter or A/X by default to teleport to target");
|
||||
ImGui::Text("ORBITAL_DRONE_USAGE_DESCR"_T.data());
|
||||
ImGui::EndGroup();
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Detect player on lock", &g.world.orbital_drone.detect_player);
|
||||
ImGui::Checkbox("ORBITAL_DRONE_AUTO_LOCK_ON_PLAYER"_T.data(), &g.world.orbital_drone.detect_player);
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("if enabled, changes the selected player to the one it detects upon locking on an entity");
|
||||
ImGui::Text("All explosions will be blamed on the selected player, defaulting to the local player");
|
||||
ImGui::TextWrapped("ORBITAL_DRONE_AUTO_LOCK_ON_PLAYER_TOOLTIP"_T.data());
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::Text("Adjust fast modifier");
|
||||
ImGui::Text("ORBITAL_DRONE_HIGH_SPEED_MULTIPLIER"_T.data());
|
||||
ImGui::SliderFloat("##fastspeed", &g.world.orbital_drone.nav_ovverride_fast, 1.f, 10.f);
|
||||
ImGui::Text("Adjust slow modifier");
|
||||
ImGui::Text("ORBITAL_DRONE_LOW_SPEED_MULTIPLIER"_T.data());
|
||||
ImGui::SliderFloat("##slowspeed", &g.world.orbital_drone.nav_ovverride_slow, 0.f, 1.f);
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
@ -1,41 +1,41 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/session.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::time_and_weather()
|
||||
{
|
||||
if (ImGui::TreeNode("LOCAL_TIME"_T.data()))
|
||||
{
|
||||
ImGui::Checkbox("OVERRIDE_TIME"_T.data(), &g.session.override_time);
|
||||
|
||||
if (g.session.override_time)
|
||||
{
|
||||
ImGui::SliderInt("HOUR"_T.data(), &g.session.custom_time.hour, 0, 23);
|
||||
ImGui::SliderInt("MINUTE"_T.data(), &g.session.custom_time.minute, 0, 59);
|
||||
ImGui::SliderInt("SECOND"_T.data(), &g.session.custom_time.second, 0, 59);
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("LOCAL_WEATHER"_T.data()))
|
||||
{
|
||||
components::button("CLEAR_OVERRIDE"_T, [] {
|
||||
MISC::CLEAR_OVERRIDE_WEATHER();
|
||||
});
|
||||
|
||||
if (ImGui::ListBox("##weather-listbox", &g.session.local_weather, session::weathers, 15))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
session::local_weather();
|
||||
});
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/session.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::time_and_weather()
|
||||
{
|
||||
if (ImGui::TreeNode("LOCAL_TIME"_T.data()))
|
||||
{
|
||||
ImGui::Checkbox("OVERRIDE_TIME"_T.data(), &g.session.override_time);
|
||||
|
||||
if (g.session.override_time)
|
||||
{
|
||||
ImGui::SliderInt("HOUR"_T.data(), &g.session.custom_time.hour, 0, 23);
|
||||
ImGui::SliderInt("MINUTE"_T.data(), &g.session.custom_time.minute, 0, 59);
|
||||
ImGui::SliderInt("SECOND"_T.data(), &g.session.custom_time.second, 0, 59);
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("LOCAL_WEATHER"_T.data()))
|
||||
{
|
||||
components::button("CLEAR_OVERRIDE"_T, [] {
|
||||
MISC::CLEAR_OVERRIDE_WEATHER();
|
||||
});
|
||||
|
||||
if (ImGui::ListBox("##weather-listbox", &g.session.local_weather, session::weathers, 15))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
session::local_weather();
|
||||
});
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::water()
|
||||
{
|
||||
components::command_checkbox<"partwater">();
|
||||
}
|
||||
}
|
19
src/views/world/view_world.cpp
Normal file
19
src/views/world/view_world.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::world()
|
||||
{
|
||||
components::sub_title("GUI_TAB_TIME_N_WEATHER"_T);
|
||||
{
|
||||
view::time_and_weather();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("GUI_TAB_WATER"_T);
|
||||
{
|
||||
components::command_checkbox<"partwater">();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user