General UI tweaks (#1538)

This commit is contained in:
DayibBaba
2023-06-27 14:05:44 +02:00
committed by GitHub
parent f8f63a789a
commit 5fc6ef8fb5
19 changed files with 85 additions and 160 deletions

View File

@ -7,12 +7,12 @@ namespace big
{
components::command_checkbox<"blackhole">();
components::sub_title("Entities");
ImGui::SeparatorText("Entities");
components::command_checkbox<"blackholeincvehs">();
ImGui::SameLine();
components::command_checkbox<"blackholeincpeds">();
components::sub_title("Position");
ImGui::SeparatorText("Position");
ImGui::InputFloat("X", &g.world.blackhole.pos.x, 5.f, 200.f);
ImGui::InputFloat("Y", &g.world.blackhole.pos.y, 5.f, 200.f);
ImGui::InputFloat("Z", &g.world.blackhole.pos.z, 5.f, 200.f);
@ -26,7 +26,7 @@ namespace big
g.world.blackhole.pos.z = player_pos->z;
});
components::sub_title("Customize Hole");
ImGui::SeparatorText("Customize Hole");
ImGui::SetNextItemWidth(214);
ImGui::ColorPicker3("Color", g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex);
ImGui::SliderInt("Alpha", &g.world.blackhole.alpha, 0, 255);

View File

@ -224,7 +224,8 @@ namespace big
}
}
components::sub_title("PED_MODEL"_T);
ImGui::SeparatorText("PED_MODEL"_T.data());
{
ImGui::BeginGroup();
{
@ -428,8 +429,8 @@ namespace big
}
ImGui::Separator();
components::sub_title("WEAPON"_T);
ImGui::SeparatorText("WEAPON"_T.data());
{
ImGui::BeginGroup();
{
@ -528,8 +529,8 @@ namespace big
}
ImGui::Separator();
components::sub_title("SPAWN_FOR"_T);
ImGui::SeparatorText("SPAWN_FOR"_T.data());
{
if (ImGui::BeginCombo("##ped_for",
(selected_ped_for_player_id == SPAWN_PED_FOR_SELF ?

View File

@ -16,7 +16,8 @@ namespace big
static squad new_template{};
static player_ptr victim = g_player_service->get_selected();
ImGui::Text("Victim");
ImGui::SeparatorText("Victim");
ImGui::SetNextItemWidth(200);
if (ImGui::BeginCombo("##victim", victim->get_name()))
{
@ -103,11 +104,9 @@ namespace big
ImGui::EndCombo();
}
ImGui::Separator();
ImGui::SeparatorText("Squad Details");
ImGui::BeginGroup(); //Main variables
ImGui::Text("Squad Details");
ImGui::Spacing();
ImGui::PushItemWidth(250);

View File

@ -1,34 +1,26 @@
#include "views/view.hpp"
#include "util/entity.hpp"
#include "util/ped.hpp"
#include "util/notify.hpp"
#include "util/ped.hpp"
#include "util/vehicle.hpp"
#include "views/view.hpp"
namespace big
{
void view::world()
{
components::sub_title("GUI_TAB_TIME_N_WEATHER"_T);
{
view::time_and_weather();
}
void view::world()
{
ImGui::SeparatorText("GUI_TAB_TIME_N_WEATHER"_T.data());
{
view::time_and_weather();
}
ImGui::Separator();
components::sub_title("GUI_TAB_WATER"_T);
{
components::command_checkbox<"partwater">();
}
ImGui::Separator();
components::sub_title("Peds");
ImGui::SeparatorText("Peds");
// Nearby Ped Actions
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("Kill", [] {
for (auto peds : entity::get_entities(false, true))
{
if(!PED::IS_PED_A_PLAYER(peds))
ped::kill_ped(peds);
if (!PED::IS_PED_A_PLAYER(peds))
ped::kill_ped(peds);
}
});
ImGui::SameLine();
@ -55,7 +47,7 @@ namespace big
ImGui::Checkbox("Neutralize", &g.world.nearby.auto_disarm.neutralize);
});
ImGui::Separator();
ImGui::SeparatorText("Vehicles");
components::sub_title("Vehicles");
components::button<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>("Max Upgrade", [] {
@ -83,8 +75,7 @@ namespace big
components::command_checkbox<"vehiclerain">();
ImGui::Separator();
components::sub_title("Entities");
ImGui::SeparatorText("Entities");
static bool included_entity_types[3];
static bool own_vehicle, deleting;
@ -125,9 +116,9 @@ namespace big
if (ENTITY::IS_ENTITY_A_VEHICLE(ent))
if (ent == self::veh && own_vehicle)
TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped);
if (entity::take_control_of(ent, 25))
entity::delete_entity(ent);
entity::delete_entity(ent);
}
script::get_current()->yield(5ms);
@ -144,5 +135,5 @@ namespace big
deleting = false;
});
}
}
}
}