Converted all static strings to translation keys. (#2284)
This commit is contained in:
@ -6,18 +6,18 @@ namespace big
|
||||
{
|
||||
components::command_checkbox<"blackhole">();
|
||||
|
||||
ImGui::SeparatorText("Entities");
|
||||
ImGui::SeparatorText("VIEW_BLACKHOLE_ENTITIES"_T.data());
|
||||
components::command_checkbox<"blackholeincvehs">();
|
||||
ImGui::SameLine();
|
||||
components::command_checkbox<"blackholeincpeds">();
|
||||
|
||||
ImGui::SeparatorText("Position");
|
||||
ImGui::SeparatorText("VIEW_OVERLAY_POSITION"_T.data());
|
||||
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);
|
||||
ImGui::SliderFloat("Scale", &g.world.blackhole.scale, 2.f, 12.f, "%.0f");
|
||||
ImGui::SliderFloat("VIEW_BLACKHOLE_SCALE"_T.data(), &g.world.blackhole.scale, 2.f, 12.f, "%.0f");
|
||||
|
||||
components::button("Set to current coords", [] {
|
||||
components::button("VIEW_BLACKHOLE_SET"_T, [] {
|
||||
const auto player_pos = g_local_player->get_position();
|
||||
|
||||
g.world.blackhole.pos.x = player_pos->x;
|
||||
@ -25,9 +25,9 @@ namespace big
|
||||
g.world.blackhole.pos.z = player_pos->z;
|
||||
});
|
||||
|
||||
ImGui::SeparatorText("Customize Hole");
|
||||
ImGui::SeparatorText("VIEW_BLACKHOLE_CUSTOM"_T.data());
|
||||
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);
|
||||
ImGui::ColorPicker3("VIEW_BLACKHOLE_COLOR"_T.data(), g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex);
|
||||
ImGui::SliderInt("VIEW_BLACKHOLE_ALPHA"_T.data(), &g.world.blackhole.alpha, 0, 255);
|
||||
}
|
||||
}
|
@ -5,9 +5,9 @@ namespace big
|
||||
{
|
||||
void view::model_swapper()
|
||||
{
|
||||
ImGui::Text("Models that have already been created will not be affected much");
|
||||
ImGui::Text("Prefix 0x for hexadecimal hash");
|
||||
ImGui::Text("Use context menu to copy entity hash");
|
||||
ImGui::Text("VIEW_MODEL_SWAPPER_LINE1"_T.data());
|
||||
ImGui::Text("VIEW_MODEL_SWAPPER_LINE2"_T.data());
|
||||
ImGui::Text("VIEW_MODEL_SWAPPER_LINE3"_T.data());
|
||||
|
||||
static char dst_text[256];
|
||||
static char src_text[256];
|
||||
@ -15,22 +15,22 @@ namespace big
|
||||
static float width = *g_pointers->m_gta.m_resolution_x / 5.0;
|
||||
|
||||
ImGui::SetNextItemWidth(width);
|
||||
ImGui::InputText("Dst", dst_text, IM_ARRAYSIZE(dst_text));
|
||||
ImGui::InputText("VIEW_MODEL_SWAPPER_DEST"_T.data(), dst_text, IM_ARRAYSIZE(dst_text));
|
||||
if (ImGui::IsItemActive())
|
||||
g.self.hud.typing = TYPING_TICKS;
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(width);
|
||||
ImGui::InputText("Src", src_text, IM_ARRAYSIZE(src_text));
|
||||
ImGui::InputText("VIEW_MODEL_SWAPPER_SRC"_T.data(), src_text, IM_ARRAYSIZE(src_text));
|
||||
if (ImGui::IsItemActive())
|
||||
g.self.hud.typing = TYPING_TICKS;
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Add/Change"))
|
||||
if (ImGui::Button("ADD"_T.data()))
|
||||
{
|
||||
std::lock_guard lock(g.world.model_swapper.m);
|
||||
if (dst_text[0] == '\0' || src_text[0] == '\0')
|
||||
{
|
||||
g_notification_service->push_error("Model Swapper", "Wrong input");
|
||||
g_notification_service->push_error("GUI_TAB_MODEL_SWAPPER"_T.data(), "VIEW_MODEL_SWAPPER_WRONG_INPUT"_T.data());
|
||||
return;
|
||||
}
|
||||
std::string str = dst_text;
|
||||
@ -52,20 +52,20 @@ namespace big
|
||||
g.world.model_swapper.update = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Delete"))
|
||||
if (ImGui::Button("DELETE"_T.data()))
|
||||
{
|
||||
std::lock_guard lock(g.world.model_swapper.m);
|
||||
if (!g.world.model_swapper.models.size() || selected_index < 0
|
||||
|| selected_index >= g.world.model_swapper.models.size())
|
||||
{
|
||||
g_notification_service->push_error("Model Swapper", "Invalid index");
|
||||
g_notification_service->push_error("GUI_TAB_MODEL_SWAPPER"_T.data(), "VIEW_MODEL_SWAPPER_INVALID_INDEX"_T.data());
|
||||
return;
|
||||
}
|
||||
g.world.model_swapper.models.erase(std::begin(g.world.model_swapper.models) + selected_index);
|
||||
g.world.model_swapper.update = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Clear"))
|
||||
if (ImGui::Button("VIEW_DEBUG_GLOBAL_CLEAR"_T.data()))
|
||||
{
|
||||
std::lock_guard lock(g.world.model_swapper.m);
|
||||
g.world.model_swapper.models.clear();
|
||||
@ -73,7 +73,8 @@ namespace big
|
||||
}
|
||||
|
||||
ImGui::SetNextItemWidth(width);
|
||||
if (ImGui::BeginListBox("Dst##model_swapper_dst"))
|
||||
ImGui::PushID(2);
|
||||
if (ImGui::BeginListBox("VIEW_MODEL_SWAPPER_DEST"_T.data()))
|
||||
{
|
||||
for (size_t i = 0; i < g.world.model_swapper.models.size(); i++)
|
||||
{
|
||||
@ -91,7 +92,7 @@ namespace big
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(width);
|
||||
if (ImGui::BeginListBox("Src##model_swapper_src"))
|
||||
if (ImGui::BeginListBox("VIEW_MODEL_SWAPPER_SRC"_T.data()))
|
||||
{
|
||||
for (size_t i = 0; i < g.world.model_swapper.models.size(); i++)
|
||||
{
|
||||
@ -107,5 +108,6 @@ namespace big
|
||||
}
|
||||
ImGui::EndListBox();
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
}
|
@ -536,12 +536,12 @@ namespace big
|
||||
{
|
||||
if (ImGui::BeginCombo("##ped_for",
|
||||
(selected_ped_for_player_id == SPAWN_PED_FOR_SELF ?
|
||||
"Self" :
|
||||
"GUI_TAB_SELF"_T.data() :
|
||||
(selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE ?
|
||||
"Everyone" :
|
||||
"VIEW_SPAWN_PED_EVERYONE"_T.data() :
|
||||
g_player_service->get_by_id(selected_ped_for_player_id)->get_name()))))
|
||||
{
|
||||
if (ImGui::Selectable("Self", selected_ped_for_player_id == SPAWN_PED_FOR_SELF))
|
||||
if (ImGui::Selectable("GUI_TAB_SELF"_T.data(), selected_ped_for_player_id == SPAWN_PED_FOR_SELF))
|
||||
{
|
||||
selected_ped_for_player_id = SPAWN_PED_FOR_SELF;
|
||||
}
|
||||
@ -551,7 +551,7 @@ namespace big
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
if (ImGui::Selectable("Everyone", selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE))
|
||||
if (ImGui::Selectable("VIEW_SPAWN_PED_EVERYONE"_T.data(), selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE))
|
||||
{
|
||||
selected_ped_for_player_id = SPAWN_PED_FOR_EVERYONE;
|
||||
}
|
||||
@ -597,9 +597,9 @@ namespace big
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("PREVIEW_DESC"_T.data());
|
||||
|
||||
ImGui::Checkbox("Invincible", &g.world.spawn_ped.spawn_invincible);
|
||||
ImGui::Checkbox("Invisible", &g.world.spawn_ped.spawn_invisible);
|
||||
ImGui::Checkbox("Attacker", &g.world.spawn_ped.spawn_as_attacker);
|
||||
ImGui::Checkbox("VIEW_SPAWN_PED_INVINCIBLE"_T.data(), &g.world.spawn_ped.spawn_invincible);
|
||||
ImGui::Checkbox("VIEW_SPAWN_PED_INVISIBLE"_T.data(), &g.world.spawn_ped.spawn_invisible);
|
||||
ImGui::Checkbox("VIEW_SPAWN_PED_ATTACKER"_T.data(), &g.world.spawn_ped.spawn_as_attacker);
|
||||
|
||||
components::button("CHANGE_PLAYER_MODEL"_T, [] {
|
||||
if (selected_ped_type == -2)
|
||||
@ -657,23 +657,23 @@ namespace big
|
||||
}
|
||||
});
|
||||
|
||||
components::button("Spoof As Model", [] {
|
||||
components::button("VIEW_SPAWN_PED_SPOOF_AS_MODEL"_T, [] {
|
||||
g.spoofing.spoof_player_model = true;
|
||||
g.spoofing.player_model = ped_model_buf;
|
||||
});
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("This WILL break freemode missions and jobs");
|
||||
ImGui::SetTooltip("VIEW_SPAWN_PED_SPOOF_AS_MODEL_TOOLTIP"_T.data());
|
||||
|
||||
if (g.spoofing.spoof_player_model)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
components::button("Unspoof Model", [] {
|
||||
components::button("VIEW_SPAWN_PED_UNSPOOF_MODEL"_T, [] {
|
||||
g.spoofing.spoof_player_model = false;
|
||||
});
|
||||
}
|
||||
|
||||
components::button("Cleanup Spawned Peds", [] {
|
||||
components::button("VIEW_SPAWN_PED_CLEANUP_SPAWNED_PEDS"_T, [] {
|
||||
for (auto& ped : spawned_peds)
|
||||
{
|
||||
PED::DELETE_PED(&ped.ped_handle);
|
||||
|
@ -10,14 +10,14 @@ namespace big
|
||||
|
||||
void view::squad_spawner()
|
||||
{
|
||||
const char* const spawn_distance_modes[5]{"Custom", "On target", "Nearby", "Moderately distanced", "Far away"};
|
||||
const char* const combat_ability_levels[3]{"Poor", "Average", "Professional"};
|
||||
const char* const spawn_distance_modes[5]{"CUSTOM"_T.data(), "VIEW_SQUAD_SPAWNER_ON_TARGET"_T.data(), "VIEW_SQUAD_SPAWNER_NEARBY"_T.data(), "VIEW_SQUAD_SPAWNER_MODERATELY_DISTANCED"_T.data(), "VIEW_SQUAD_SPAWNER_FAR_AWAY"_T.data()};
|
||||
const char* const combat_ability_levels[3]{"VIEW_SQUAD_SPAWNER_POOR"_T.data(), "VIEW_SQUAD_SPAWNER_AVERAGE"_T.data(), "VIEW_SQUAD_SPAWNER_PROFESSIONAL"_T.data()};
|
||||
|
||||
static squad new_template{};
|
||||
static player_ptr victim = g_player_service->get_selected();
|
||||
|
||||
|
||||
ImGui::SeparatorText("Victim");
|
||||
ImGui::SeparatorText("VIEW_SQUAD_SPAWNER_VICTIM"_T.data());
|
||||
ImGui::SetNextItemWidth(200);
|
||||
if (ImGui::BeginCombo("##victim", victim->get_name()))
|
||||
{
|
||||
@ -46,7 +46,7 @@ namespace big
|
||||
if (victim->id() != g_player_service->get_selected()->id() && victim->is_valid())
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.3f, 1.0f));
|
||||
ImGui::Text("Warning: Victim and selected player are not the same");
|
||||
ImGui::Text("VIEW_SQUAD_SPAWNER_WARNING"_T.data());
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
@ -59,16 +59,16 @@ namespace big
|
||||
|
||||
if (ImGui::BeginPopupModal("##deletesquad"))
|
||||
{
|
||||
ImGui::Text("Are you sure you want to delete %s?", deletion_squad.m_name);
|
||||
ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_squad.m_name);
|
||||
|
||||
if (ImGui::Button("Yes"))
|
||||
if (ImGui::Button("YES"_T.data()))
|
||||
{
|
||||
g_squad_spawner_service.delete_squad(deletion_squad);
|
||||
deletion_squad.m_name = "";
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("No"))
|
||||
if (ImGui::Button("NO"_T.data()))
|
||||
{
|
||||
deletion_squad.m_name = "";
|
||||
ImGui::CloseCurrentPopup();
|
||||
@ -79,9 +79,9 @@ namespace big
|
||||
|
||||
|
||||
ImGui::SetNextItemWidth(200);
|
||||
if (ImGui::BeginCombo("Choose From Templates", "Templates"))
|
||||
if (ImGui::BeginCombo("VIEW_SQUAD_SPAWNER_CHOOSE_FROM_TEMPLATES"_T.data(), "VIEW_SQUAD_SPAWNER_TEMPLATES"_T.data()))
|
||||
{
|
||||
components::button("Fetch Custom Squads", [] {
|
||||
components::button("VIEW_SQUAD_SPAWNER_FETCH_CUSTOM_SQUADS"_T, [] {
|
||||
g_squad_spawner_service.fetch_squads();
|
||||
});
|
||||
|
||||
@ -104,17 +104,17 @@ namespace big
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
if(ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Shift click to delete");
|
||||
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T.data());
|
||||
|
||||
ImGui::SeparatorText("Squad Details");
|
||||
ImGui::SeparatorText("VIEW_SQUAD_SPAWNER_SQUAD_DETAILS"_T.data());
|
||||
|
||||
ImGui::BeginGroup(); //Main variables
|
||||
ImGui::Spacing();
|
||||
|
||||
ImGui::PushItemWidth(250);
|
||||
|
||||
components::input_text_with_hint("##name", "Name", new_template.m_name);
|
||||
components::input_text_with_hint("##pedmodel", "Ped model", new_template.m_ped_model);
|
||||
components::input_text_with_hint("##name", "NAME"_T, new_template.m_name);
|
||||
components::input_text_with_hint("##pedmodel", "PED_MODEL"_T, new_template.m_ped_model);
|
||||
|
||||
auto ped_found = std::find_if(g_gta_data_service->peds().begin(), g_gta_data_service->peds().end(), [=](const auto& pair) {
|
||||
return pair.second.m_name == new_template.m_ped_model;
|
||||
@ -140,9 +140,9 @@ namespace big
|
||||
}
|
||||
}
|
||||
|
||||
components::input_text_with_hint("##vehmodel", "Vehicle model", new_template.m_vehicle_model);
|
||||
components::input_text_with_hint("##vehmodel", "NAME_VEHICLE_MODEL"_T, new_template.m_vehicle_model);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Leave empty to spawn on foot");
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWNER_VEHICLE_TOOLTIP"_T.data());
|
||||
|
||||
auto veh_found = std::find_if(g_gta_data_service->vehicles().begin(), g_gta_data_service->vehicles().end(), [=](const auto& pair) {
|
||||
return pair.second.m_name == new_template.m_vehicle_model;
|
||||
@ -168,9 +168,9 @@ namespace big
|
||||
}
|
||||
}
|
||||
|
||||
components::input_text_with_hint("##weapmodel", "Weapon model", new_template.m_weapon_model);
|
||||
components::input_text_with_hint("##weapmodel", "VIEW_SQUAD_SPAWNER_WEAPON_MODEL"_T.data(), new_template.m_weapon_model);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Leave empty to spawn unarmed, beware that a player can only attain 3 melee attackers at a time");
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWNER_WEAPON_MODEL_TOOLTIP"_T.data());
|
||||
|
||||
auto weap_found = std::find_if(g_gta_data_service->weapons().begin(), g_gta_data_service->weapons().end(), [=](const auto& pair) {
|
||||
return pair.second.m_name == new_template.m_weapon_model;
|
||||
@ -197,7 +197,7 @@ namespace big
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::Text("Spawn Distance");
|
||||
ImGui::Text("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data());
|
||||
if (ImGui::BeginCombo("##spawndistance", spawn_distance_modes[(int)new_template.m_spawn_distance_mode]))
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
@ -207,7 +207,7 @@ namespace big
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
ImGui::Text("Squad Size");
|
||||
ImGui::Text("VIEW_DEBUG_GLOBAL_SIZE"_T.data());
|
||||
ImGui::SliderInt("##squadsize", &new_template.m_squad_size, 1, 8);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
@ -215,13 +215,13 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup(); //General actions
|
||||
|
||||
ImGui::Text("Actions");
|
||||
ImGui::Text("VIEW_SQUAD_SPAWNER_ACTIONS"_T.data());
|
||||
ImGui::Spacing();
|
||||
components::button(std::string("Terminate " + std::to_string(g_squad_spawner_service.m_active_squads.size()) + " squads"), [] {
|
||||
components::button(std::format("{} {} {}", "SETTINGS_NOTIFY_GTA_THREADS_TERMINATE"_T, g_squad_spawner_service.m_active_squads.size(), "VIEW_SQUAD_SPAWNER_SQUADS"_T), [] {
|
||||
g_squad_spawner_service.terminate_squads();
|
||||
});
|
||||
|
||||
components::button("Reset Fields", [] {
|
||||
components::button("VIEW_SQUAD_RESET_FIELDS"_T, [] {
|
||||
new_template.m_spawn_distance_mode = eSquadSpawnDistance::CLOSEBY;
|
||||
new_template.m_combat_ability_level = eCombatAbilityLevel::AVERAGE;
|
||||
new_template.m_name.clear();
|
||||
@ -229,7 +229,7 @@ namespace big
|
||||
new_template.m_ped_model.clear();
|
||||
new_template.m_vehicle_model.clear();
|
||||
new_template.m_weapon_model.clear();
|
||||
new_template.m_persistent_vehicle = "None";
|
||||
new_template.m_persistent_vehicle = "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data();
|
||||
new_template.m_squad_size = 1;
|
||||
new_template.m_ped_invincibility = 0;
|
||||
new_template.m_veh_invincibility = 0;
|
||||
@ -249,57 +249,57 @@ namespace big
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::Spacing();
|
||||
if (ImGui::TreeNode("Advanced Options"))
|
||||
if (ImGui::TreeNode("VIEW_SELF_ANIMATIONS_ADVANCED_OPTIONS"_T.data()))
|
||||
{
|
||||
ImGui::BeginGroup(); //Toggleables
|
||||
|
||||
ImGui::Checkbox("Spawn Ahead", &new_template.m_spawn_ahead);
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_AHEAD"_T.data(), &new_template.m_spawn_ahead);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Will use the distance specified and apply it in a forward direction to find a position ahead of the target");
|
||||
ImGui::Checkbox("Favour Roads", &new_template.m_favour_roads);
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_AHEAD_TOOLTIP"_T.data());
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_FAVOR_ROADS"_T.data(), &new_template.m_favour_roads);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Will try and find a road first");
|
||||
ImGui::Checkbox("Disperse", &new_template.m_disperse);
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_FAVOR_ROADS_TOOLTIP"_T.data());
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_DISPERSE"_T.data(), &new_template.m_disperse);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("If the squad is on foot, will scatter units within the spawn distance");
|
||||
ImGui::Checkbox("Vehicle Catch Up", &new_template.m_spawn_behind_same_velocity);
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_DISPERSE_TOOLTIP"_T.data());
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_VEHICLE_CATCH_UP"_T.data(), &new_template.m_spawn_behind_same_velocity);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Will spawn the mobile squad behind the target with identical velocity if applicable.\nOnly for squads with a vehicle.");
|
||||
ImGui::Checkbox("Stay In Vehicle", &new_template.m_stay_in_veh);
|
||||
ImGui::Checkbox("Vehicle Mods Maxed", &new_template.m_max_vehicle);
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_VEHICLE_CATCH_UP_TOOLTIP"_T.data());
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_STAY_IN_VEHICLE"_T.data(), &new_template.m_stay_in_veh);
|
||||
ImGui::Checkbox("MAX_VEHICLE"_T.data(), &new_template.m_max_vehicle);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Ped God Mode", &new_template.m_ped_invincibility);
|
||||
ImGui::Checkbox("Vehicle God Mode", &new_template.m_veh_invincibility);
|
||||
ImGui::Checkbox("Headshot Proof", &new_template.m_ped_proofs[0]);
|
||||
ImGui::Checkbox("Bullet Proof", &new_template.m_ped_proofs[1]);
|
||||
ImGui::Checkbox("Flame Proof", &new_template.m_ped_proofs[2]);
|
||||
ImGui::Checkbox("Melee Proof", &new_template.m_ped_proofs[3]);
|
||||
ImGui::Checkbox("Explosion Proof", &new_template.m_ped_proofs[4]);
|
||||
ImGui::Checkbox("GOD_MODE"_T.data(), &new_template.m_ped_invincibility);
|
||||
ImGui::Checkbox("VEHICLE_GOD"_T.data(), &new_template.m_veh_invincibility);
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_HEADSHOT_PROOF"_T.data(), &new_template.m_ped_proofs[0]);
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_BULLET_PROOF"_T.data(), &new_template.m_ped_proofs[1]);
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_FLAME_PROOF"_T.data(), &new_template.m_ped_proofs[2]);
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_MELEE_PROOF"_T.data(), &new_template.m_ped_proofs[3]);
|
||||
ImGui::Checkbox("VIEW_SQUAD_SPAWN_EXPLOSION_PROOF"_T.data(), &new_template.m_ped_proofs[4]);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup(); //Slideables
|
||||
|
||||
ImGui::PushItemWidth(200);
|
||||
ImGui::Text("Ped Health");
|
||||
ImGui::Text("VIEW_PLAYER_INFO_HEALTH"_T.data());
|
||||
ImGui::SliderFloat("##pedhealth", &new_template.m_ped_health, 0, 2000);
|
||||
ImGui::Text("Ped Armor");
|
||||
ImGui::Text("VIEW_SQUAD_SPAWN_ARMOR"_T.data());
|
||||
ImGui::SliderFloat("##pedarmor", &new_template.m_ped_armor, 0, 2000);
|
||||
ImGui::Text("Ped Accuracy");
|
||||
ImGui::Text("VIEW_SQUAD_SPAWN_ACCURACY"_T.data());
|
||||
ImGui::SliderFloat("##pedaccuracy", &new_template.m_ped_accuracy, 0, 100);
|
||||
ImGui::Text("Custom Spawn Distance");
|
||||
ImGui::Text("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data());
|
||||
ImGui::SliderFloat("##customspawndistance", &new_template.m_spawn_distance, 0, 500);
|
||||
ImGui::EndGroup();
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Leave these values at 0 to default, except for accuracy.");
|
||||
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_DEFAULT_TOOLTIP"_T.data());
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup(); //Chooseables
|
||||
ImGui::Text("Combat Ability");
|
||||
ImGui::Text("VIEW_SQUAD_SPAWN_COMBAT_ABILITY"_T.data());
|
||||
if (ImGui::BeginCombo("##combatability", combat_ability_levels[(int)new_template.m_combat_ability_level]))
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
@ -310,11 +310,11 @@ namespace big
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
ImGui::Text("Persistent Vehicle");
|
||||
ImGui::Text("VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE"_T.data());
|
||||
if (ImGui::BeginCombo("##persistent_vehicle", new_template.m_persistent_vehicle.data()))
|
||||
{
|
||||
if (ImGui::Selectable("None", new_template.m_persistent_vehicle == "None"))
|
||||
new_template.m_persistent_vehicle = "None";
|
||||
if (ImGui::Selectable("VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(), new_template.m_persistent_vehicle == "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data()))
|
||||
new_template.m_persistent_vehicle = "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data();
|
||||
for (auto& p : persist_car_service::list_files())
|
||||
{
|
||||
if (ImGui::Selectable(p.data(), p == new_template.m_persistent_vehicle))
|
||||
@ -325,7 +325,7 @@ namespace big
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::EndGroup();
|
||||
|
||||
components::input_text_with_hint("##new_template.m_description", "Description", new_template.m_description);
|
||||
components::input_text_with_hint("##new_template.m_description", "VIEW_SQUAD_SPAWN_DESCRIPTION"_T, new_template.m_description);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
@ -333,12 +333,12 @@ namespace big
|
||||
static auto check_validity = [=](bool save) -> bool {
|
||||
if (!victim->is_valid() && !save)
|
||||
{
|
||||
g_notification_service->push_error("Squad spawner", "Choose a victim first");
|
||||
g_notification_service->push_error("GUI_TAB_SQUAD_SPAWNER"_T.data(), "VIEW_SQUAD_SPAWN_CHOOSE_FIRST"_T.data());
|
||||
return false;
|
||||
}
|
||||
if (std::string(new_template.m_ped_model).empty())
|
||||
{
|
||||
g_notification_service->push_error("Squad spawner", "A ped model is required");
|
||||
g_notification_service->push_error("GUI_TAB_SQUAD_SPAWNER"_T.data(), "VIEW_SQUAD_SPAWN_MODEL_REQUIRED"_T.data());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -360,32 +360,32 @@ namespace big
|
||||
return exists;
|
||||
};
|
||||
|
||||
components::button("Spawn Squad", [] {
|
||||
components::button("VIEW_SQUAD_SPAWN_SPAWN_SQUAD"_T, [] {
|
||||
try
|
||||
{
|
||||
if (check_validity(false))
|
||||
g_squad_spawner_service.spawn_squad({new_template.m_name,
|
||||
new_template.m_ped_model,
|
||||
new_template.m_weapon_model,
|
||||
new_template.m_vehicle_model,
|
||||
new_template.m_squad_size,
|
||||
new_template.m_ped_invincibility,
|
||||
new_template.m_veh_invincibility,
|
||||
new_template.m_ped_proofs,
|
||||
new_template.m_ped_health,
|
||||
new_template.m_ped_armor,
|
||||
new_template.m_spawn_distance,
|
||||
new_template.m_ped_accuracy,
|
||||
new_template.m_spawn_distance_mode,
|
||||
new_template.m_combat_ability_level,
|
||||
new_template.m_stay_in_veh,
|
||||
new_template.m_spawn_behind_same_velocity,
|
||||
new_template.m_description,
|
||||
new_template.m_disperse,
|
||||
new_template.m_spawn_ahead,
|
||||
new_template.m_favour_roads,
|
||||
new_template.m_max_vehicle,
|
||||
new_template.m_persistent_vehicle},
|
||||
new_template.m_ped_model,
|
||||
new_template.m_weapon_model,
|
||||
new_template.m_vehicle_model,
|
||||
new_template.m_squad_size,
|
||||
new_template.m_ped_invincibility,
|
||||
new_template.m_veh_invincibility,
|
||||
new_template.m_ped_proofs,
|
||||
new_template.m_ped_health,
|
||||
new_template.m_ped_armor,
|
||||
new_template.m_spawn_distance,
|
||||
new_template.m_ped_accuracy,
|
||||
new_template.m_spawn_distance_mode,
|
||||
new_template.m_combat_ability_level,
|
||||
new_template.m_stay_in_veh,
|
||||
new_template.m_spawn_behind_same_velocity,
|
||||
new_template.m_description,
|
||||
new_template.m_disperse,
|
||||
new_template.m_spawn_ahead,
|
||||
new_template.m_favour_roads,
|
||||
new_template.m_max_vehicle,
|
||||
new_template.m_persistent_vehicle},
|
||||
victim,
|
||||
new_template.m_spawn_distance_mode == eSquadSpawnDistance::CUSTOM,
|
||||
g_orbital_drone_service.m_ground_pos);
|
||||
@ -397,7 +397,7 @@ namespace big
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
components::button("Save", [] {
|
||||
components::button("SAVE"_T, [] {
|
||||
if (check_validity(true) && !check_if_exists(new_template.m_name))
|
||||
g_squad_spawner_service.save_squad(new_template);
|
||||
});
|
||||
|
@ -20,7 +20,7 @@ namespace big
|
||||
|
||||
if (g.world.override_weather)
|
||||
{
|
||||
if (ImGui::BeginCombo("Weather", weathers[g.world.local_weather]))
|
||||
if (ImGui::BeginCombo("VIEW_TIME_AND_WEATHER_WEATHER"_T.data(), weathers[g.world.local_weather]))
|
||||
{
|
||||
for (int i = 0; i < weathers.size(); i++)
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace big
|
||||
{
|
||||
void view::vfx()
|
||||
{
|
||||
ImGui::Checkbox("Enable Custom Sky Color", &g.vfx.enable_custom_sky_color);
|
||||
ImGui::Checkbox("VIEW_VFX_ENABLE_CUSTOM_SKY_COLOR"_T.data(), &g.vfx.enable_custom_sky_color);
|
||||
|
||||
ImGui::ColorEdit4("VFX_AZIMUTH_EAST"_T.data(), (float*)&g.vfx.azimuth_east);
|
||||
ImGui::ColorEdit4("VFX_AZIMUTH_WEST"_T.data(), (float*)&g.vfx.azimuth_west);
|
||||
|
@ -14,9 +14,9 @@ namespace big
|
||||
view::time_and_weather();
|
||||
}
|
||||
|
||||
ImGui::SeparatorText("Peds");
|
||||
ImGui::SeparatorText("PED"_T.data());
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("Kill", [] {
|
||||
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("VIEW_DEBUG_THREADS_KILL"_T, [] {
|
||||
for (auto peds : entity::get_entities(false, true))
|
||||
{
|
||||
if (!PED::IS_PED_A_PLAYER(peds))
|
||||
@ -25,7 +25,7 @@ namespace big
|
||||
});
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("Kill Enemies", [] {
|
||||
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("VIEW_WORLD_KILL_ENEMIES"_T, [] {
|
||||
for (auto ped : entity::get_entities(false, true))
|
||||
{
|
||||
if (!PED::IS_PED_A_PLAYER(ped))
|
||||
@ -48,14 +48,13 @@ namespace big
|
||||
components::command_checkbox<"pedrush">();
|
||||
ImGui::SameLine();
|
||||
components::command_checkbox<"autodisarm">();
|
||||
components::options_modal("Auto Disarm", [] {
|
||||
ImGui::Checkbox("Neutralize", &g.world.nearby.auto_disarm.neutralize);
|
||||
components::options_modal("VIEW_WORLD_AUTO_DISARM"_T.data(), [] {
|
||||
ImGui::Checkbox("VIEW_WORLD_NEUTRALIZE"_T.data(), &g.world.nearby.auto_disarm.neutralize);
|
||||
});
|
||||
|
||||
ImGui::SeparatorText("Vehicles");
|
||||
components::sub_title("Vehicles");
|
||||
ImGui::SeparatorText("VEHICLES"_T.data());
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>("Max Upgrade", [] {
|
||||
components::button<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>("MAX_VEHICLE"_T, [] {
|
||||
for (auto vehs : entity::get_entities(true, false))
|
||||
{
|
||||
if (entity::take_control_of(vehs))
|
||||
@ -67,7 +66,7 @@ namespace big
|
||||
});
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.4549f, 0.03529f, 0.03529f, 1.f)>("Downgrade", [] {
|
||||
components::button<ImVec2(110, 0), ImVec4(0.4549f, 0.03529f, 0.03529f, 1.f)>("VIEW_WORLD_DOWNGRADE"_T, [] {
|
||||
for (auto vehs : entity::get_entities(true, false))
|
||||
{
|
||||
if (entity::take_control_of(vehs))
|
||||
@ -80,26 +79,26 @@ namespace big
|
||||
|
||||
components::command_checkbox<"vehiclerain">();
|
||||
|
||||
ImGui::SeparatorText("Entities");
|
||||
ImGui::SeparatorText("VIEW_BLACKHOLE_ENTITIES"_T.data());
|
||||
|
||||
static bool included_entity_types[3];
|
||||
static bool own_vehicle, deleting, force;
|
||||
static int quantity, remaining;
|
||||
|
||||
ImGui::Text("Include:");
|
||||
ImGui::Checkbox("Vehicles", &included_entity_types[0]);
|
||||
ImGui::Text("VIEW_WORLD_INCLUDE"_T.data());
|
||||
ImGui::Checkbox("VEHICLES"_T.data(), &included_entity_types[0]);
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Peds", &included_entity_types[1]);
|
||||
ImGui::Checkbox("PED"_T.data(), &included_entity_types[1]);
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Props", &included_entity_types[2]);
|
||||
ImGui::Checkbox("VIEW_WORLD_PROPS"_T.data(), &included_entity_types[2]);
|
||||
|
||||
if (included_entity_types[0])
|
||||
{
|
||||
ImGui::Checkbox("Self vehicle", &own_vehicle);
|
||||
ImGui::Checkbox("VIEW_WORLD_SELF_VEHICLE"_T.data(), &own_vehicle);
|
||||
ImGui::SameLine();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Force", &force);
|
||||
ImGui::Checkbox("FORCE"_T.data(), &force);
|
||||
|
||||
if (deleting)
|
||||
{
|
||||
@ -108,12 +107,12 @@ namespace big
|
||||
}
|
||||
else
|
||||
{
|
||||
components::button("Delete all", [&] {
|
||||
components::button("VIEW_WORLD_DELETE_ALL"_T, [&] {
|
||||
auto list = entity::get_entities(included_entity_types[0], included_entity_types[1], included_entity_types[2], own_vehicle);
|
||||
|
||||
quantity = list.size();
|
||||
remaining = quantity;
|
||||
g_notification_service->push("Entity Deletion", std::format("Deleting {} entities", quantity));
|
||||
g_notification_service->push("GUI_TAB_TIME_N_WEATHER"_T.data(), std::format("Deleting {} entities", quantity));
|
||||
deleting = true;
|
||||
int failed = 0;
|
||||
|
||||
@ -153,7 +152,7 @@ namespace big
|
||||
}
|
||||
|
||||
if (failed > 0)
|
||||
g_notification_service->push_warning("Entity Deletion", std::format("Failed deleting {} entities", failed));
|
||||
g_notification_service->push_warning("GUI_TAB_TIME_N_WEATHER"_T.data(), std::format("Failed deleting {} entities", failed));
|
||||
|
||||
deleting = false;
|
||||
});
|
||||
|
Reference in New Issue
Block a user