feat: Translation Service (#844)

Co-authored-by: mrwoowoo <github@hiqaq.com>
Co-authored-by: LiamD-Flop <40887493+LiamD-Flop@users.noreply.github.com>
This commit is contained in:
Yimura
2023-02-01 19:46:33 +01:00
committed by GitHub
parent ef3decba53
commit d4f2960c77
79 changed files with 1183 additions and 779 deletions

View File

@ -8,39 +8,39 @@ namespace big
void view::mobile() {
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
components::sub_title("Merryweather");
components::sub_title("MERRYWEATHER"_T);
ImGui::Separator();
components::button("Request Ammo Drop", [] {
components::button("MW_AMMO_DROP"_T, [] {
mobile::merry_weather::request_ammo_drop();
});
components::button("Helicopter Pickup", [] {
components::button("MW_HELI_PICKUP"_T, [] {
mobile::merry_weather::request_helicopter_pickup();
});
components::button("Request Backup Helicopter", [] {
components::button("MW_BACKUP_HELI"_T, [] {
mobile::merry_weather::request_backup_helicopter();
});
components::button("Request Airstrike", [] {
components::button("MW_AIRSTRIKE"_T, [] {
mobile::merry_weather::request_airstrike();
});
components::sub_title("Mors Mutual");
components::sub_title("MORS_MUTUAL"_T);
ImGui::Separator();
components::button("Mors Mutual Fix All Vehicles", [] {
components::button("MORS_FIX_ALL"_T, [] {
int amount_fixed = mobile::mors_mutual::fix_all();
g_notification_service->push("Mobile",
std::format("{} vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
g_notification_service->push("MOBILE"_T.data(),
std::vformat("VEHICLE_FIX_AMOUNT"_T, std::make_format_args(amount_fixed, amount_fixed == 1 ? "VEHICLE_FIX_HAS"_T.data() : "VEHICLE_FIX_HAVE"_T.data()))
);
});
components::sub_title("CEO Abilities");
components::sub_title("CEO_ABILITIES"_T);
ImGui::Separator();
components::button("Bullshark Testosterone", [] {
components::button("CEO_BULLSHARK"_T, [] {
mobile::ceo_abilities::request_bullshark_testosterone();
});

View File

@ -21,7 +21,7 @@ namespace big
ImGui::Separator();
components::sub_title("General");
components::sub_title("GENERAL"_T);
ImGui::BeginGroup();
@ -39,7 +39,7 @@ namespace big
components::command_checkbox<"noclip">();
components::command_checkbox<"noragdoll">();
components::command_checkbox<"fastrun">();
ImGui::Checkbox("No Idle Kick", &g.tunables.no_idle_kick);
ImGui::Checkbox("NO_IDLE_KICK"_T.data(), &g.tunables.no_idle_kick);
components::command_checkbox<"walkunder">();
if(!g.self.super_jump)
components::command_checkbox<"beastjump">();
@ -56,15 +56,15 @@ namespace big
components::command_checkbox<"nocollision">();
components::command_checkbox<"mobileradio">();
ImGui::Checkbox("Dance Mode", &g.self.dance_mode);
ImGui::Checkbox("DANCE_MODE"_T.data(), &g.self.dance_mode);
ImGui::EndGroup();
ImGui::Separator();
components::sub_title("Proofs");
components::sub_title("PROOFS"_T);
if (ImGui::Button("Check all"))
if (ImGui::Button("CHECK_ALL"_T.data()))
{
g.self.proof_bullet = true;
g.self.proof_fire = true;
@ -78,7 +78,7 @@ namespace big
ImGui::SameLine();
if (ImGui::Button("Uncheck all"))
if (ImGui::Button("UNCHECK_ALL"_T.data()))
{
g.self.proof_bullet = false;
g.self.proof_fire = false;
@ -92,42 +92,42 @@ namespace big
ImGui::BeginGroup();
ImGui::Checkbox("Bullet", &g.self.proof_bullet);
ImGui::Checkbox("Fire", &g.self.proof_fire);
ImGui::Checkbox("BULLET"_T.data(), &g.self.proof_bullet);
ImGui::Checkbox("FIRE"_T.data(), &g.self.proof_fire);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Collision", &g.self.proof_collision);
ImGui::Checkbox("Melee", &g.self.proof_melee);
ImGui::Checkbox("COLLISION"_T.data(), &g.self.proof_collision);
ImGui::Checkbox("MELEE"_T.data(), &g.self.proof_melee);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Explosion", &g.self.proof_explosion);
ImGui::Checkbox("Steam", &g.self.proof_steam);
ImGui::Checkbox("EXPLOSION"_T.data(), &g.self.proof_explosion);
ImGui::Checkbox("STEAM"_T.data(), &g.self.proof_steam);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Drown", &g.self.proof_drown);
ImGui::Checkbox("Water", &g.self.proof_water);
ImGui::Checkbox("DROWN"_T.data(), &g.self.proof_drown);
ImGui::Checkbox("WATER"_T.data(), &g.self.proof_water);
ImGui::EndGroup();
ImGui::Separator();
components::sub_title("Police");
components::sub_title("POLICE"_T);
ImGui::Checkbox("Never Wanted", &g.self.never_wanted);
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
if (!g.self.never_wanted)
{
ImGui::Checkbox("Force Wanted Level", &g.self.force_wanted_level);
ImGui::Text("Wanted Level");
ImGui::Checkbox("FORCE_WANTED_LVL"_T.data(), &g.self.force_wanted_level);
ImGui::Text("WANTED_LVL"_T.data());
if (
ImGui::SliderInt("###wanted_level", &g.self.wanted_level, 0, 5) &&
!g.self.force_wanted_level &&
@ -139,31 +139,31 @@ namespace big
ImGui::Separator();
components::sub_title("HUD");
components::sub_title("HUD"_T);
ImGui::BeginGroup();
ImGui::Checkbox("Hide Radar", &g.self.hide_radar);
ImGui::Checkbox("HIDE_RADAR"_T.data(), &g.self.hide_radar);
ImGui::SameLine();
ImGui::Checkbox("Hide Ammo", &g.self.hide_ammo);
ImGui::Checkbox("HIDE_AMMO"_T.data(), &g.self.hide_ammo);
ImGui::SameLine();
ImGui::Checkbox("Force show HUD", &g.self.force_show_hud);
ImGui::Checkbox("FORCE_SHOW_HUD"_T.data(), &g.self.force_show_hud);
ImGui::Combo("##hud_comp_combo", &g.self.selected_hud_component, hud_component_names, (int)HudComponents::HUD_WEAPONS);
ImGui::SameLine();
components::button("Hide", [] {
components::button("HIDE"_T, [] {
g.self.hud_components_states[g.self.selected_hud_component] = true;
});
ImGui::SameLine();
components::button("Show", [] {
components::button("SHOW"_T, [] {
g.self.hud_components_states[g.self.selected_hud_component] = false;
});
components::button("Hide all", [] {
components::button("HIDE_ALL"_T, [] {
g.self.hide_radar = true;
g.self.hide_ammo = true;
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
@ -172,7 +172,7 @@ namespace big
}
});
ImGui::SameLine();
components::button("Show all", [] {
components::button("SHOW_ALL"_T, [] {
g.self.hide_radar = false;
g.self.hide_ammo = false;
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
@ -181,9 +181,9 @@ namespace big
}
});
ImGui::SameLine();
ImGui::Checkbox("Force show HUD element", &g.self.force_show_hud_element);
ImGui::Checkbox("FORCE_SHOW_HUD_ELEMENT"_T.data(), &g.self.force_show_hud_element);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("To force show a HUD specific element, click Hide all then click Show on the desired element.");
ImGui::SetTooltip("FORCE_SHOW_HUD_ELEMENT_DESC"_T.data());
ImGui::EndGroup();

View File

@ -9,14 +9,14 @@ namespace big
{
void view::teleport()
{
ImGui::Text("Blips:");
ImGui::Text("BLIPS"_T.data());
components::command_button<"waypointtp">({}, "Waypoint");
ImGui::SameLine();
components::command_button<"objectivetp">({}, "Objective");
components::command_checkbox<"autotptowp">();
ImGui::Text("Vehicles:");
ImGui::Text("VEHICLES"_T.data());
components::command_button<"lastvehtp">();
ImGui::SameLine();
components::command_button<"bringpv">();

View File

@ -11,7 +11,7 @@
namespace big
{
void view::weapons() {
components::sub_title("Ammo");
components::sub_title("AMMO"_T);
ImGui::BeginGroup();
@ -22,7 +22,7 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
if (ImGui::Checkbox("Bypass C4 Limit", &g.weapons.bypass_c4_limit))
if (ImGui::Checkbox("BYPASS_C4_LIM"_T.data(), &g.weapons.bypass_c4_limit))
{
if (g.weapons.bypass_c4_limit)
g_pointers->m_bypass_max_count_of_active_sticky_bombs->apply();
@ -35,12 +35,12 @@ namespace big
ImGui::Separator();
ImGui::Checkbox("Enable Special Ammo", &g.weapons.ammo_special.toggle);
ImGui::Checkbox("ENABLE_SPECIAL_AMMO"_T.data(), &g.weapons.ammo_special.toggle);
eAmmoSpecialType selected_ammo = g.weapons.ammo_special.type;
eExplosionTag selected_explosion = g.weapons.ammo_special.explosion_tag;
if (ImGui::BeginCombo("Special Ammo", SPECIAL_AMMOS[(int)selected_ammo].name))
if (ImGui::BeginCombo("SPECIAL_AMMO"_T.data(), SPECIAL_AMMOS[(int)selected_ammo].name))
{
for (const auto& special_ammo : SPECIAL_AMMOS)
{
@ -58,7 +58,7 @@ namespace big
ImGui::EndCombo();
}
if (ImGui::BeginCombo("Bullet Impact", BULLET_IMPACTS[selected_explosion]))
if (ImGui::BeginCombo("BULLET_IMPACT"_T.data(), BULLET_IMPACTS[selected_explosion]))
{
for (const auto& [type, name] : BULLET_IMPACTS)
{
@ -78,7 +78,7 @@ namespace big
ImGui::Separator();
components::sub_title("Misc");
components::sub_title("MISC"_T);
components::command_checkbox<"crosshairs">();
ImGui::SameLine();
@ -86,7 +86,7 @@ namespace big
ImGui::SameLine();
components::command_checkbox<"nospread">();
components::button("Get All Weapons", []
components::button("GET_ALL_WEAPONS"_T, []
{
for (const auto& [_, weapon] : g_gta_data_service->weapons())
{
@ -97,7 +97,7 @@ namespace big
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(self::ped, parachute_hash, 0, true);
});
ImGui::SameLine();
components::button("Remove Current Weapon", []
components::button("REMOVE_CUR_WEAPON"_T, []
{
Hash weaponHash;
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weaponHash, 1);
@ -107,15 +107,15 @@ namespace big
}
});
ImGui::SliderFloat("Damage Multiplier", &g.weapons.increased_damage, 1.f, 10.f, "%.1f");
ImGui::SliderFloat("DMG_MULTIPLR"_T.data(), &g.weapons.increased_damage, 1.f, 10.f, "%.1f");
ImGui::Separator();
components::sub_title("Custom Weapons");
components::sub_title("CUSTOM_WEAPONS"_T);
CustomWeapon selected = g.weapons.custom_weapon;
if (ImGui::BeginCombo("Weapon", custom_weapons[(int)selected].name))
if (ImGui::BeginCombo("WEAPON"_T.data(), custom_weapons[(int)selected].name))
{
for (const custom_weapon& weapon : custom_weapons)
{
@ -142,7 +142,7 @@ namespace big
// this some ugly ass looking code
static char vehicle_gun[12];
std::memcpy(vehicle_gun, g.weapons.vehicle_gun_model.c_str(), 12);
if (ImGui::InputTextWithHint("Shooting Model", "Name of the vehicle model", vehicle_gun, sizeof(vehicle_gun)))
if (ImGui::InputTextWithHint("SHOOTING_MODEL"_T.data(), "NAME_VEHICLE_MODEL"_T.data(), vehicle_gun, sizeof(vehicle_gun)))
{
g.weapons.vehicle_gun_model = vehicle_gun;
}