Converted all static strings to translation keys. (#2284)

This commit is contained in:
gir489
2023-10-20 12:24:44 -04:00
committed by GitHub
parent d6c32533be
commit 37468ca7b0
133 changed files with 1027 additions and 1021 deletions

View File

@ -9,7 +9,7 @@ namespace big
{
ImGui::BeginGroup();
static std::string category = "Default";
static std::string category = "DEFAULT"_T.data();
static ped_animation deletion_ped_animation{};
if (!std::string(deletion_ped_animation.name).empty())
@ -17,18 +17,18 @@ namespace big
if (ImGui::BeginPopupModal("##deletepedanimation", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove))
{
ImGui::Text(std::format("Are you sure you want to delete {}", deletion_ped_animation.name).data());
ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_ped_animation.name);
ImGui::Spacing();
if (ImGui::Button("Yes"))
if (ImGui::Button("YES"_T.data()))
{
g_ped_animation_service.delete_saved_animation(category, deletion_ped_animation);
deletion_ped_animation.name = "";
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No"))
if (ImGui::Button("NO"_T.data()))
{
deletion_ped_animation.name = "";
ImGui::CloseCurrentPopup();
@ -38,37 +38,37 @@ namespace big
}
ImGui::PushItemWidth(250);
components::input_text_with_hint("##dict", "Dict", g_ped_animation_service.current_animation.dict);
components::input_text_with_hint("##dict", "DICT"_T, g_ped_animation_service.current_animation.dict);
components::options_modal(
"Debug animations",
"VIEW_SELF_ANIMATIONS_DEBUG_ANIMATIONS"_T.data(),
[] {
debug::animations(&g_ped_animation_service.current_animation.dict, &g_ped_animation_service.current_animation.anim);
},
true,
"List From Debug");
components::input_text_with_hint("##anim", "Anim", g_ped_animation_service.current_animation.anim);
"VIEW_SELF_ANIMATIONS_LIST_FROM_DEBUG"_T.data());
components::input_text_with_hint("##anim", "ANIMATION"_T, g_ped_animation_service.current_animation.anim);
ImGui::SameLine();
components::button("Play", [] {
components::button("VIEW_DEBUG_ANIMATIONS_PLAY"_T.data(), [] {
g_ped_animation_service.play_saved_ped_animation(g_ped_animation_service.current_animation, self::ped);
});
ImGui::SameLine();
components::button("Stop", [] {
components::button("VIEW_DEBUG_ANIMATIONS_STOP"_T.data(), [] {
TASK::CLEAR_PED_TASKS(self::ped);
});
if (ImGui::TreeNode("Advanced Options"))
if (ImGui::TreeNode("VIEW_SELF_ANIMATIONS_ADVANCED_OPTIONS"_T.data()))
{
ImGui::SliderFloat("Blend in", &g_ped_animation_service.current_animation.blendin, -5, 10);
ImGui::SliderFloat("Blend out", &g_ped_animation_service.current_animation.blendout, -5, 10);
ImGui::InputInt("Duration in ms", &g_ped_animation_service.current_animation.time_to_play);
ImGui::SliderFloat("VIEW_SELF_ANIMATIONS_BLEND_IN"_T.data(), &g_ped_animation_service.current_animation.blendin, -5, 10);
ImGui::SliderFloat("VIEW_SELF_ANIMATIONS_BLEND_OUT"_T.data(), &g_ped_animation_service.current_animation.blendout, -5, 10);
ImGui::InputInt("VIEW_SELF_ANIMATIONS_DURATION"_T.data(), &g_ped_animation_service.current_animation.time_to_play);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("-1 will make the duration indefinite, assuming it is looped");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_DURATION_TOOLTIP"_T.data());
ImGui::PopItemWidth();
ImGui::Checkbox("Ambient", &g_ped_animation_service.current_animation.ambient);
ImGui::Checkbox("VIEW_SELF_ANIMATIONS_AMBIENT"_T.data(), &g_ped_animation_service.current_animation.ambient);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Current location and rotation will be saved and used");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_AMBIENT_TOOLTIP"_T.data());
if (g_ped_animation_service.current_animation.ambient)
{
@ -93,71 +93,72 @@ namespace big
ImGui::BeginGroup(); //Regular flags
ImGui::CheckboxFlags("Looped", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::LOOPING));
ImGui::CheckboxFlags("Hold Last Frame", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HOLD_LAST_FRAME));
ImGui::CheckboxFlags("Uninterruptable", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::NOT_INTERRUPTABLE));
ImGui::CheckboxFlags("Only Upperbody", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::UPPERBODY));
ImGui::CheckboxFlags("Secondary slot", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::SECONDARY));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_LOOPED"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::LOOPING));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_HOLD_LAST_FRAME"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HOLD_LAST_FRAME));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_UNINTERRUPTABLE"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::NOT_INTERRUPTABLE));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_ONLY_UPPERBODY"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::UPPERBODY));
ImGui::CheckboxFlags("SECONDARY"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::SECONDARY));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Allow primary animations to run simultaniously, such as walking");
ImGui::CheckboxFlags("Realize Animation Orientation", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::REORIENT_WHEN_FINISHED));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SECONDARY_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_REALIZE_ANIMATION_ORIENTATION"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::REORIENT_WHEN_FINISHED));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Use the final orientation achieved in the animation");
ImGui::CheckboxFlags("Hide Weapon", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HIDE_WEAPON));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_REALIZE_ANIMATION_ORIENTATION_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_HIDE_WEAPON"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HIDE_WEAPON));
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
//Sync flags
ImGui::CheckboxFlags("Sync In", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_IN));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_IN"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_IN));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Seamless transition into the animation, for example from walking");
ImGui::CheckboxFlags("Sync Out", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_OUT));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SYNC_IN_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_OUT"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_OUT));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Seamless transition out of the animation, for example to continue walking");
ImGui::CheckboxFlags("Sync Continuous", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_CONTINUOUS));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SYNC_OUT_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_CONTINUOUS"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_CONTINUOUS));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Seamless transition during the animation, especially usefull for upperbody animations");
ImGui::CheckboxFlags("Force Start", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::FORCE_START));
ImGui::CheckboxFlags("Disable Colission", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TURN_OFF_COLLISION));
ImGui::CheckboxFlags("Override Physics", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::OVERRIDE_PHYSICS));
ImGui::CheckboxFlags("Ignore Gravity", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::IGNORE_GRAVITY));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SYNC_CONTINUOUS_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_FORCE_START"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::FORCE_START));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_DISABLE_COLLISION"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TURN_OFF_COLLISION));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_OVERRIDE_PHYSICS"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::OVERRIDE_PHYSICS));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_IGNORE_GRAVITY"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::IGNORE_GRAVITY));
ImGui::EndGroup();
ImGui::TreePop();
}
ImGui::SeparatorText("Saving");
ImGui::SeparatorText("CREATOR_SAVE_TO_FILE"_T.data());
components::input_text_with_hint("Category", "Category", category);
components::input_text_with_hint("Name", "Name", g_ped_animation_service.current_animation.name);
components::input_text_with_hint("VIEW_SELF_ANIMATIONS_CATEGORY"_T, "VIEW_SELF_ANIMATIONS_CATEGORY_DESC"_T, category);
components::input_text_with_hint("NAME"_T, "FILE_NAME"_T, g_ped_animation_service.current_animation.name);
static auto save_response = [=]() -> bool {
if (!STREAMING::DOES_ANIM_DICT_EXIST(g_ped_animation_service.current_animation.dict.data()))
{
g_notification_service->push_warning("Animations",
std::format("Dict with the name {} does not exist", g_ped_animation_service.current_animation.dict));
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(),
std::vformat("VIEW_SELF_ANIMATIONS_DICT_DOES_NOT_EXIST"_T, std::make_format_args(g_ped_animation_service.current_animation.dict)));
return false;
}
if (g_ped_animation_service.get_animation_by_name(g_ped_animation_service.current_animation.name))
{
g_notification_service->push_warning("Animations",
std::format("Animation with the name {} already exists", g_ped_animation_service.current_animation.name));
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(),
std::vformat("VIEW_SELF_ANIMATIONS_ANIM_ALREADY_EXISTS"_T, std::make_format_args(g_ped_animation_service.current_animation.name)));
return false;
}
if (category.empty())
{
g_notification_service->push_warning("Animations", "Category can't be empty");
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(), "VIEW_SELF_ANIMATIONS_CATEGORY_EMPTY_ERROR"_T.data());
return false;
}
if (g_ped_animation_service.current_animation.anim.empty())
{
g_notification_service->push_warning("Animations", "Animation name can't be empty");
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(), "VIEW_SELF_ANIMATIONS_ANIM_EMPTY_ERROR"_T.data());
return false;
}
@ -166,34 +167,35 @@ namespace big
ImGui::SameLine();
components::button("Save", [] {
components::button("SAVE"_T, [] {
if (save_response())
g_ped_animation_service.save_new_animation(category, g_ped_animation_service.current_animation);
});
ImGui::EndGroup();
ImGui::SeparatorText("Saved");
components::button("Refresh", [] {
ImGui::SeparatorText("VIEW_SELF_ANIMATIONS_SAVED"_T.data());
components::button("REFRESH"_T, [] {
g_ped_animation_service.fetch_saved_animations();
});
components::small_text("Double click to play\nShift click to delete");
components::small_text("VIEW_SELF_ANIMATIONS_HINT"_T);
components::small_text("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T);
ImGui::SameLine();
ImGui::Checkbox("Prompt Ambient", &g.self.prompt_ambient_animations);
ImGui::Checkbox("VIEW_SELF_ANIMATIONS_PROMPT_AMBIENT"_T.data(), &g.self.prompt_ambient_animations);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Ambient animations will be prompted if you are close to one");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_PROMPT_AMBIENT_TOOLTIP"_T.data());
static std::string filter;
ImGui::BeginGroup();
components::input_text_with_hint("##filter", "Search", filter);
components::input_text_with_hint("##filter", "SEARCH"_T, filter);
ImGui::BeginGroup();
components::small_text("Categories");
components::small_text("VIEW_SELF_ANIMATIONS_CATEGORIES"_T);
if (ImGui::BeginListBox("##categories", {200, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.4)}))
{
for (auto& l : g_ped_animation_service.all_saved_animations | std::ranges::views::keys)
@ -208,7 +210,7 @@ namespace big
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::small_text("Animations");
components::small_text("GUI_TAB_ANIMATIONS"_T);
if (ImGui::BeginListBox("##animations", {200, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.4)}))
{
if (g_ped_animation_service.all_saved_animations.find(category)
@ -246,10 +248,10 @@ namespace big
if (p.name.length() > 25)
ImGui::Text(p.name.data());
ImGui::Text(std::format("Dict: {}\nAnim: {}", p.dict, p.anim).data());
ImGui::Text(std::format("{}: {}\n{}: {}", "DICT"_T.data(), p.dict, "ANIMATION"_T.data(), p.anim).c_str());
if (p.ambient)
ImGui::BulletText("Ambient animation");
ImGui::BulletText("VIEW_SELF_ANIMATIONS_AMBIENT_ANIMATION"_T.data());
ImGui::EndTooltip();
}
}

View File

@ -49,18 +49,18 @@ namespace big
if (ImGui::BeginPopupModal("##deletelocation", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove))
{
ImGui::Text("Are you sure you want to delete %s?", deletion_telelocation.name);
ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_telelocation.name);
ImGui::Spacing();
if (ImGui::Button("Yes"))
if (ImGui::Button("YES"_T.data()))
{
g_custom_teleport_service.delete_saved_location(category, deletion_telelocation.name);
deletion_telelocation.name = "";
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No"))
if (ImGui::Button("NO"_T.data()))
{
deletion_telelocation.name = "";
ImGui::CloseCurrentPopup();
@ -70,18 +70,18 @@ namespace big
}
ImGui::PushItemWidth(300);
components::input_text_with_hint("Category", "Category", category);
components::input_text_with_hint("Location name", "New location", new_location_name);
components::input_text_with_hint("VIEW_SELF_ANIMATIONS_CATEGORY"_T, "VIEW_SELF_ANIMATIONS_CATEGORY_DESC"_T, category);
components::input_text_with_hint("VIEW_SELF_CUSTOM_TELEPORT_LOCATION"_T, "VIEW_SELF_CUSTOM_TELEPORT_LOCATION_DESC"_T, new_location_name);
ImGui::PopItemWidth();
components::button("Save current location", [] {
components::button("VIEW_SELF_CUSTOM_TELEPORT_SAVE_CURRENT_LOCATION"_T, [] {
if (new_location_name.empty())
{
g_notification_service->push_warning("Custom Teleport", "Please enter a valid name.");
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "VIEW_SELF_CUSTOM_TELEPORT_INVALID_NAME"_T.data());
}
else if (g_custom_teleport_service.get_saved_location_by_name(new_location_name))
{
g_notification_service->push_warning("Custom Teleport", std::format("Location with the name {} already exists", new_location_name));
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), std::vformat("VIEW_SELF_CUSTOM_TELEPORT_LOCATION_ALREADY_EXISTS"_T, std::make_format_args(new_location_name)));
}
else
{
@ -101,18 +101,18 @@ namespace big
}
});
ImGui::SameLine();
components::button("Save current selected blip", [] {
components::button("VIEW_SELF_CUSTOM_TELEPORT_SAVE_BLIP"_T, [] {
if (new_location_name.empty())
{
g_notification_service->push_warning("Custom Teleport", "Please enter a valid name.");
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "VIEW_SELF_CUSTOM_TELEPORT_INVALID_NAME"_T.data());
}
else if (g_custom_teleport_service.get_saved_location_by_name(new_location_name))
{
g_notification_service->push_warning("Custom Teleport", std::format("Location with the name {} already exists", new_location_name));
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), std::vformat("VIEW_SELF_CUSTOM_TELEPORT_LOCATION_ALREADY_EXISTS"_T, std::make_format_args(new_location_name)));
}
else if (!*g_pointers->m_gta.m_is_session_started)
{
g_notification_service->push_warning("Custom Teleport", "TELEPORT_NOT_ONLINE"_T.data());
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "TELEPORT_NOT_ONLINE"_T.data());
return;
}
else
@ -121,7 +121,7 @@ namespace big
auto blip = blip::get_selected_blip();
if (blip == nullptr)
{
g_notification_service->push_warning("Custom Teleport", std::format("Cannot find selected blip."));
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "VIEW_SELF_CUSTOM_TELEPORT_INVALID_BLIP"_T.data());
return;
}
teleport_location.name = new_location_name;
@ -137,13 +137,14 @@ namespace big
ImGui::Separator();
components::small_text("Double click to teleport\nShift click to delete");
components::small_text("VIEW_SELF_CUSTOM_TELEPORT_DOUBLE_CLICK_TO_TELEPORT"_T);
components::small_text("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T);
ImGui::Spacing();
components::input_text_with_hint("##filter", "Search", filter);
components::input_text_with_hint("##filter", "SEARCH"_T, filter);
ImGui::BeginGroup();
components::small_text("Categories");
components::small_text("VIEW_SELF_ANIMATIONS_CATEGORIES"_T);
if (ImGui::BeginListBox("##categories", {250, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.5)}))
{
for (auto& l : g_custom_teleport_service.all_saved_locations | std::ranges::views::keys)
@ -158,7 +159,7 @@ namespace big
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::small_text("Locations");
components::small_text("VIEW_SELF_CUSTOM_TELEPORT_LOCATIONS"_T);
if (ImGui::BeginListBox("##telelocations", {250, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.5)}))
{
if (g_custom_teleport_service.all_saved_locations.find(category)
@ -194,7 +195,7 @@ namespace big
ImGui::BeginTooltip();
if (l.name.length() > 27)
ImGui::Text(l.name.data());
ImGui::Text("Distance: %f", get_distance_to_telelocation(l));
ImGui::Text(std::format("{}: {}", "VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T, get_distance_to_telelocation(l)).c_str());
ImGui::EndTooltip();
}
}

View File

@ -40,7 +40,7 @@ namespace big
components::command_button<"ballisticarmor">();
ImGui::SeparatorText("Services");
ImGui::SeparatorText("VIEW_SELF_MOBILE_SERVICES"_T.data());
components::command_button<"avenger">();
components::command_button<"kosatka">();
@ -49,7 +49,7 @@ namespace big
components::command_button<"acidlab">();
components::command_button<"acidbike">();
ImGui::SeparatorText("Miscellaneous");
ImGui::SeparatorText("DEBUG_TAB_MISC"_T.data());
components::command_button<"taxi">();

View File

@ -226,18 +226,18 @@ namespace big
}
ImGui::SameLine();
ImGui::BeginGroup();
if (ImGui::Button("Set Persist Outfit"))
if (ImGui::Button("VIEW_SELF_OUTFIT_SET_PERSIST_OUTFIT"_T.data()))
{
g.self.persist_outfit = saved_outfits[selected_index];
}
ImGui::SameLine();
if (ImGui::Button("Clear Persist Outfit"))
if (ImGui::Button("VIEW_SELF_OUTFIT_CLEAR_PERSIST_OUTFIT"_T.data()))
{
g.self.persist_outfit.clear();
}
ImGui::SameLine();
ImGui::Checkbox("Disable During Missions?", &g.self.persist_outfits_mis);
ImGui::Text(std::format("Current Persisted Outfit: {}", g.self.persist_outfit).c_str());
ImGui::Checkbox("VIEW_SELF_OUTFIT_DISABLE_DURING_MISSIONS"_T.data(), &g.self.persist_outfits_mis);
ImGui::Text(std::format("{}: {}", "VIEW_SELF_OUTFIT_CURRENT_PERSISTED_OUTFIT"_T.data(), g.self.persist_outfit).c_str());
ImGui::EndGroup();
}
}

View File

@ -87,7 +87,7 @@ namespace big
ImGui::Checkbox("DANCE_MODE"_T.data(), &g.self.dance_mode);
components::command_checkbox<"orbitaldrone">();
components::options_modal("Orbital drone", [] {
components::options_modal("VIEW_SELF_ORBITAL_DRONE"_T.data(), [] {
ImGui::Separator();
ImGui::BeginGroup();
ImGui::Text("ORBITAL_DRONE_USAGE_DESCR"_T.data());
@ -149,9 +149,9 @@ namespace big
});
components::command_checkbox<"ptfx">();
components::options_modal("PTFX", [] {
ImGui::SliderFloat("PTFX Size", &g.self.ptfx_effects.size, 0.1f, 2.f);
if (ImGui::BeginCombo("Asset", ptfx_named[g.self.ptfx_effects.select].friendly_name))
components::options_modal("VIEW_SELF_PTFX"_T.data(), [] {
ImGui::SliderFloat("VIEW_SELF_PTFX_SIZE"_T.data(), &g.self.ptfx_effects.size, 0.1f, 2.f);
if (ImGui::BeginCombo("VIEW_SELF_ASSET"_T.data(), ptfx_named[g.self.ptfx_effects.select].friendly_name))
{
for (int i = 0; i < IM_ARRAYSIZE(ptfx_named); i++)
{
@ -169,7 +169,7 @@ namespace big
ImGui::EndCombo();
}
if (ImGui::BeginCombo("Effect", g.self.ptfx_effects.effect))
if (ImGui::BeginCombo("VIEW_SELF_EFFECT"_T.data(), g.self.ptfx_effects.effect))
{
for (const auto& ptfx_type : ptfx_named[g.self.ptfx_effects.select].effect_names)
{
@ -185,7 +185,7 @@ namespace big
});
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
components::options_modal("Police", [] {
components::options_modal("POLICE"_T.data(), [] {
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
components::command_button<"clearwantedlvl">();
if (!g.self.never_wanted)
@ -315,7 +315,7 @@ namespace big
if (g.self.hud.color_override)
{
ImGui::Combo("Color Index", &color_select_index, hud_colors.data(), hud_colors.size());
ImGui::Combo("VIEW_SELF_COLOR_INDEX"_T.data(), &color_select_index, hud_colors.data(), hud_colors.size());
auto& ovr_color = g.self.hud.hud_color_overrides[color_select_index];
@ -325,7 +325,7 @@ namespace big
col[2] = ovr_color.b / 255.0f;
col[3] = ovr_color.a / 255.0f;
if (ImGui::ColorPicker4("Override Color", col))
if (ImGui::ColorPicker4("VIEW_SELF_COLOR_OVERRIDE"_T.data(), col))
{
ovr_color.r = (int)(col[0] * 255);
ovr_color.g = (int)(col[1] * 255);
@ -338,7 +338,7 @@ namespace big
});
}
components::button("Restore Default Color", [] {
components::button("VIEW_SELF_RESTORE_DEFAULT_COLOR"_T, [] {
g.self.hud.hud_color_overrides[color_select_index] = g.self.hud.hud_color_defaults[color_select_index];
auto& col = g.self.hud.hud_color_defaults[color_select_index];
@ -347,7 +347,7 @@ namespace big
ImGui::SameLine();
components::button("Restore All Defaults", [] {
components::button("VIEW_SELF_RESTORE_ALL_DEFAULTS"_T, [] {
for (int i = 0; i < hud_colors.size(); i++)
{
auto& col = g.self.hud.hud_color_defaults[i];

View File

@ -13,18 +13,18 @@ namespace big
ImGui::SeparatorText("BLIPS"_T.data());
ImGui::Spacing();
components::command_button<"waypointtp">({}, "Waypoint");
components::command_button<"waypointtp">({}, "VIEW_PLAYER_TELEPORT_WAYPOINT"_T);
ImGui::SameLine();
components::command_button<"objectivetp">({}, "Objective");
components::command_button<"objectivetp">({}, "VIEW_TELEPORT_OBJECTIVE"_T);
ImGui::SameLine();
components::command_button<"highlighttp">({}, "Selected");
components::command_button<"highlighttp">({}, "VIEW_TELEPORT_SELECTED"_T);
components::command_checkbox<"autotptowp">();
ImGui::SeparatorText("Movement");
ImGui::SeparatorText("VIEW_TELEPORT_MOVEMENT"_T.data());
ImGui::Spacing();
components::small_text("Current coordinates");
components::small_text("VIEW_TELEPORT_CURRENT_COORDINATES"_T);
float coords[3] = {self::pos.x, self::pos.y, self::pos.z};
static float new_location[3];
static float increment = 1;
@ -32,30 +32,30 @@ namespace big
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##currentcoordinates", coords, "%f", ImGuiInputTextFlags_ReadOnly);
ImGui::SameLine();
components::button("Copy to custom", [coords] {
components::button("VIEW_TELEPORT_COPY_TO_CUSTOM"_T, [coords] {
std::copy(std::begin(coords), std::end(coords), std::begin(new_location));
});
components::small_text("Custom teleport");
components::small_text("GUI_TAB_CUSTOM_TELEPORT"_T);
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##Customlocation", new_location);
ImGui::SameLine();
components::button("Teleport", [] {
components::button("GUI_TAB_TELEPORT"_T, [] {
teleport::to_coords({new_location[0], new_location[1], new_location[2]});
});
ImGui::Spacing();
components::small_text("Specific movement");
components::small_text("VIEW_TELEPORT_SPECIFIC_MOVEMENT"_T);
ImGui::Spacing();
ImGui::SetNextItemWidth(200);
ImGui::InputFloat("Distance", &increment);
ImGui::InputFloat("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data(), &increment);
ImGui::BeginGroup();
components::button("Forward", [] {
components::button("VIEW_TELEPORT_FORWARD"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, increment, 0));
});
components::button("Backward", [] {
components::button("VIEW_TELEPORT_BACKWARD"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, -increment, 0));
});
ImGui::EndGroup();
@ -63,10 +63,10 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Left", [] {
components::button("LEFT"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, -increment, 0, 0));
});
components::button("Right", [] {
components::button("RIGHT"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, increment, 0, 0));
});
ImGui::EndGroup();
@ -74,10 +74,10 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Up", [] {
components::button("VIEW_TELEPORT_UP"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, 0, increment));
});
components::button("Down", [] {
components::button("VIEW_TELEPORT_DOWN"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, 0, -increment));
});
ImGui::EndGroup();
@ -108,7 +108,7 @@ namespace big
}
const auto& selected_ipl = ipls[g.self.ipls.select];
if (components::button("LOAD_IPL"_T.data()))
if (components::button("LOAD_IPL"_T))
{
//unload all previous ipls
for (auto& ipl : ipls)
@ -128,13 +128,13 @@ namespace big
ImGui::SameLine();
if (components::button("TP_TO_IPL"_T.data()))
if (components::button("TP_TO_IPL"_T))
{
teleport::to_coords(selected_ipl.location);
}
ImGui::Spacing();
components::small_text("IPL_INFOS"_T.data());
components::small_text("IPL_INFOS"_T);
ImGui::Text(std::vformat("IPL_CNT"_T, std::make_format_args(selected_ipl.ipl_names.size())).data());
ImGui::Text(std::vformat("IPL_POSITION"_T,

View File

@ -1,5 +1,4 @@
#include "core/data/bullet_impact_types.hpp"
#include "core/data/custom_weapons.hpp"
#include "core/data/special_ammo_types.hpp"
#include "fiber_pool.hpp"
#include "gta/joaat.hpp"
@ -12,6 +11,24 @@
namespace big
{
struct custom_weapon
{
big::CustomWeapon id;
const std::string_view name;
};
const custom_weapon custom_weapons[] = {
{big::CustomWeapon::NONE, "VIEW_SELF_WEAPONS_NONE"_T},
{big::CustomWeapon::CAGE_GUN, "VIEW_SELF_WEAPONS_CAGE_GUN"_T},
{big::CustomWeapon::DELETE_GUN, "VIEW_SELF_WEAPONS_DELETE_GUN"_T},
{big::CustomWeapon::GRAVITY_GUN, "VIEW_SELF_WEAPONS_GRAVITY_GUN"_T},
{big::CustomWeapon::STEAL_VEHICLE_GUN, "BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T},
{big::CustomWeapon::REPAIR_GUN, "BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T},
{big::CustomWeapon::VEHICLE_GUN, "BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T},
{big::CustomWeapon::TP_GUN, "VIEW_SELF_WEAPONS_TP_GUN"_T},
{big::CustomWeapon::PAINT_GUN, "VIEW_SELF_WEAPONS_PAINT_GUN"_T},
};
void view::weapons()
{
ImGui::SeparatorText("AMMO"_T.data());
@ -22,19 +39,19 @@ namespace big
components::command_checkbox<"alwaysfullammo">();
components::command_checkbox<"infclip">();
components::command_checkbox<"infrange">();
ImGui::Checkbox("Allow Weapons In Interiors", &g.weapons.interior_weapon);
ImGui::Checkbox("VIEW_WEAPON_ALLOW_WEAPONS_IN_INTERIORS"_T.data(), &g.weapons.interior_weapon);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Increase C4 Limit (Max = 50)", &g.weapons.increased_c4_limit);
ImGui::Checkbox("Increase Flare Limit (Max = 50)", &g.weapons.increased_flare_limit);
ImGui::Checkbox("VIEW_WEAPON_INCREASE_C4_LIMIT"_T.data(), &g.weapons.increased_c4_limit);
ImGui::Checkbox("VIEW_WEAPON_INCREASE_FLARE_LIMIT"_T.data(), &g.weapons.increased_flare_limit);
components::command_checkbox<"rapidfire">();
ImGui::Checkbox("ENABLE_SPECIAL_AMMO"_T.data(), &g.weapons.ammo_special.toggle);
components::options_modal("Special ammo", [] {
components::options_modal("SPECIAL_AMMO"_T.data(), [] {
eAmmoSpecialType selected_ammo = g.weapons.ammo_special.type;
eExplosionTag selected_explosion = g.weapons.ammo_special.explosion_tag;
@ -76,7 +93,7 @@ namespace big
ImGui::EndGroup();
ImGui::SeparatorText("MISC"_T.data());
ImGui::SeparatorText("DEBUG_TAB_MISC"_T.data());
components::command_checkbox<"norecoil">();
ImGui::SameLine();
@ -102,18 +119,18 @@ namespace big
});
components::command_checkbox<"incrdamage">();
ImGui::InputFloat("Damage", &g.weapons.increased_damage, .1, 10, "%.1f");
ImGui::InputFloat("VIEW_WEAPON_DAMAGE"_T.data(), &g.weapons.increased_damage, .1, 10, "%.1f");
ImGui::SeparatorText("CUSTOM_WEAPONS"_T.data());
ImGui::Checkbox("Custom Gun only fires when weapon is out", &g.self.custom_weapon_stop);
ImGui::Checkbox("VIEW_WEAPON_CUSTOM_GUN_ONLY_FIRES_WHEN_THE_WEAPON_IS_OUT"_T.data(), &g.self.custom_weapon_stop);
CustomWeapon selected = g.weapons.custom_weapon;
if (ImGui::BeginCombo("WEAPON"_T.data(), custom_weapons[(int)selected].name))
if (ImGui::BeginCombo("WEAPON"_T.data(), custom_weapons[(int)selected].name.data()))
{
for (const custom_weapon& weapon : custom_weapons)
{
if (ImGui::Selectable(weapon.name, weapon.id == selected))
if (ImGui::Selectable(weapon.name.data(), weapon.id == selected))
{
g.weapons.custom_weapon = weapon.id;
}
@ -130,7 +147,7 @@ namespace big
switch (selected)
{
case CustomWeapon::GRAVITY_GUN:
ImGui::Checkbox("Launch on release", &g.weapons.gravity_gun.launch_on_release);
ImGui::Checkbox("VIEW_WEAPON_LAUNCH_ON_RELEASE"_T.data(), &g.weapons.gravity_gun.launch_on_release);
break;
case CustomWeapon::VEHICLE_GUN:
// this some ugly ass looking code
@ -145,12 +162,12 @@ namespace big
break;
case CustomWeapon::PAINT_GUN:
ImGui::Checkbox("Rainbow Color", &g.weapons.paintgun.rainbow);
ImGui::SliderFloat("Rainbow Speed", &g.weapons.paintgun.speed, 0.f, 10.f);
if (!g.weapons.paintgun.rainbow) { ImGui::ColorEdit4("Paint Gun Color", g.weapons.paintgun.col); }
ImGui::Checkbox("RAINBOW_PAINT"_T.data(), &g.weapons.paintgun.rainbow);
ImGui::SliderFloat("VIEW_WEAPON_RAINBOW_SPEED"_T.data(), &g.weapons.paintgun.speed, 0.f, 10.f);
if (!g.weapons.paintgun.rainbow) { ImGui::ColorEdit4("VIEW_WEAPON_PAINT_GUN_COLOR"_T.data(), g.weapons.paintgun.col); }
}
ImGui::SeparatorText("Aim Assistance");
ImGui::SeparatorText("VIEW_WEAPON_AIM_ASSISTANCE"_T.data());
components::command_checkbox<"triggerbot">();
ImGui::SameLine();
components::command_checkbox<"aimbot">();
@ -170,21 +187,21 @@ namespace big
{
ImGui::SameLine();
ImGui::PushItemWidth(220);
ImGui::SliderFloat("Speed", &g.weapons.aimbot.smoothing_speed, 1.f, 12.f, "%.1f");
ImGui::SliderFloat("VIEW_WEAPON_AIM_SPEED"_T.data(), &g.weapons.aimbot.smoothing_speed, 1.f, 12.f, "%.1f");
ImGui::PopItemWidth();
}
ImGui::PushItemWidth(350);
ImGui::SliderFloat("FOV", &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
ImGui::SliderFloat("Distance", &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
ImGui::SliderFloat("VIEW_WEAPON_AIM_FOV"_T.data(), &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
ImGui::SliderFloat("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data(), &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
ImGui::PopItemWidth();
}
if (ImGui::CollapsingHeader("Ammunation"))
if (ImGui::CollapsingHeader("Ammunation"_T.data()))
{
static Hash selected_weapon_hash, selected_weapon_attachment_hash{};
static std::string selected_weapon, selected_weapon_attachment;
ImGui::PushItemWidth(300);
if (ImGui::BeginCombo("Weapons", selected_weapon.c_str()))
if (ImGui::BeginCombo("GUI_TAB_WEAPONS"_T.data(), selected_weapon.c_str()))
{
for (auto& weapon : g_gta_data_service->weapons())
{
@ -205,16 +222,16 @@ namespace big
}
ImGui::PopItemWidth();
ImGui::SameLine();
components::button("Give Weapon", [] {
components::button("VIEW_WEAPON_GIVE_WEAPON"_T, [] {
WEAPON::GIVE_WEAPON_TO_PED(self::ped, selected_weapon_hash, 9999, false, true);
});
ImGui::SameLine();
components::button("Remove Weapon", [] {
components::button("VIEW_WEAPON_REMOVE_WEAPON"_T, [] {
WEAPON::REMOVE_WEAPON_FROM_PED(self::ped, selected_weapon_hash);
});
ImGui::PushItemWidth(250);
if (ImGui::BeginCombo("Attachments", selected_weapon_attachment.c_str()))
if (ImGui::BeginCombo("VIEW_WEAPON_ATTACHMENTS"_T.data(), selected_weapon_attachment.c_str()))
{
weapon_item weapon = g_gta_data_service->weapon_by_hash(selected_weapon_hash);
if (!weapon.m_attachments.empty())
@ -246,11 +263,11 @@ namespace big
ImGui::EndCombo();
}
ImGui::SameLine();
components::button("Add to Weapon", [] {
components::button("VIEW_WEAPON_ADD_TO_WEAPON"_T, [] {
WEAPON::GIVE_WEAPON_COMPONENT_TO_PED(self::ped, selected_weapon_hash, selected_weapon_attachment_hash);
});
ImGui::SameLine();
components::button("Remove from Weapon", [] {
components::button("VIEW_WEAPON_REMOVE_TO_WEAPON"_T, [] {
WEAPON::REMOVE_WEAPON_COMPONENT_FROM_PED(self::ped, selected_weapon_hash, selected_weapon_attachment_hash);
});
ImGui::PopItemWidth();
@ -261,24 +278,26 @@ namespace big
if (selected_weapon.ends_with("Mk II"))
{
ImGui::Combo("Tints", &tint, mk2_tints, IM_ARRAYSIZE(mk2_tints));
ImGui::Combo("VIEW_WEAPON_TINTS"_T.data(), &tint, mk2_tints, IM_ARRAYSIZE(mk2_tints));
}
else
{
ImGui::Combo("Tints", &tint, default_tints, IM_ARRAYSIZE(default_tints));
ImGui::Combo("VIEW_WEAPON_TINTS"_T.data(), &tint, default_tints, IM_ARRAYSIZE(default_tints));
}
ImGui::SameLine();
components::button("Apply", [] {
components::button("APPLY"_T, [] {
WEAPON::SET_PED_WEAPON_TINT_INDEX(self::ped, selected_weapon_hash, tint);
});
}
if (ImGui::CollapsingHeader("Persist Weapons"))
if (ImGui::CollapsingHeader("VIEW_WEAPON_PERSIST_WEAPONS"_T.data()))
{
ImGui::Checkbox("Enabled##persist_weapons", &g.persist_weapons.enabled);
ImGui::PushID(1);
ImGui::Checkbox("ENABLED"_T.data(), &g.persist_weapons.enabled);
ImGui::PopID();
static std::string selected_loadout = g.persist_weapons.weapon_loadout_file;
ImGui::PushItemWidth(250);
if (ImGui::BeginListBox("Saved Loadouts", ImVec2(200, 200)))
if (ImGui::BeginListBox("VIEW_WEAPON_PERSIST_WEAPONS_SAVED_LOADOUTS"_T.data(), ImVec2(200, 200)))
{
for (std::string filename : persist_weapons::list_weapon_loadouts())
{
@ -292,36 +311,38 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
static std::string input_file_name;
components::input_text_with_hint("Weapon Loadout Filename", "Loadout Name", input_file_name);
components::button("Save Loadout", [] {
components::input_text_with_hint("VIEW_WEAPON_PERSIST_WEAPONS_WEAPON_LOADOUT_FILENAME"_T, "VIEW_WEAPON_PERSIST_WEAPONS_LOADOUT_NAME"_T, input_file_name);
components::button("VIEW_WEAPON_PERSIST_WEAPONS_SAVE"_T, [] {
persist_weapons::save_weapons(input_file_name);
input_file_name.clear();
});
ImGui::SameLine();
components::button("Load Loadout", [] {
components::button("VIEW_WEAPON_PERSIST_WEAPONS_LOAD"_T, [] {
persist_weapons::give_player_loadout(selected_loadout);
});
ImGui::SameLine();
components::button("Set Loadout", [] {
components::button("VIEW_WEAPON_PERSIST_WEAPONS_SET_LOADOUT"_T, [] {
persist_weapons::set_weapon_loadout(selected_loadout);
});
ImGui::Text(std::format("Current Loadout: {}:", g.persist_weapons.weapon_loadout_file).data());
ImGui::Text(std::format("{}: {}:", "VIEW_WEAPON_PERSIST_WEAPONS_CURRENT_LOADOUT"_T, g.persist_weapons.weapon_loadout_file).data());
ImGui::EndGroup();
ImGui::PopItemWidth();
}
if (ImGui::CollapsingHeader("Weapon Hotkeys"))
if (ImGui::CollapsingHeader("VIEW_WEAPON_WEAPON_HOTKEYS"_T.data()))
{
ImGui::Checkbox("Enabled##weapon_hotkeys", &g.weapons.enable_weapon_hotkeys);
ImGui::PushID(2);
ImGui::Checkbox("ENABLED"_T.data(), &g.weapons.enable_weapon_hotkeys);
ImGui::PopID();
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip("This will select the next weapon in the hotkey list.\r\nThe first weapon in the list is the first weapon it will select, then the second is the one it will select after and so on.\r\nAfter the end of the list, it will wrap back to the first weapon.");
ImGui::SetTooltip("VIEW_WEAPON_WEAPON_HOTKEYS_TOOLTIP"_T.data());
}
static int selected_key = 0;
const char* const keys[]{"1", "2", "3", "4", "5", "6"};
ImGui::PushItemWidth(250);
ImGui::Combo("Key", &selected_key, keys, IM_ARRAYSIZE(keys));
ImGui::Combo("VIEW_WEAPON_WEAPON_HOTKEYS_KEY"_T.data(), &selected_key, keys, IM_ARRAYSIZE(keys));
ImGui::PopItemWidth();
if (!g.weapons.weapon_hotkeys[selected_key].empty())
@ -332,7 +353,7 @@ namespace big
ImGui::PushID(counter);
weapon_item weapon = g_gta_data_service->weapon_by_hash(weapon_hash);
ImGui::PushItemWidth(300);
if (ImGui::BeginCombo("Weapons", weapon.m_display_name.c_str()))
if (ImGui::BeginCombo("GUI_TAB_WEAPONS"_T.data(), weapon.m_display_name.c_str()))
{
for (auto& weapon : g_gta_data_service->weapons())
{
@ -353,7 +374,7 @@ namespace big
ImGui::EndCombo();
}
ImGui::SameLine();
components::button("Set To Current Weapon", [&weapon_hash] {
components::button("VIEW_WEAPON_WEAPON_HOTKEYS_SET_TO_CURRENT_WEAPON"_T, [&weapon_hash] {
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weapon_hash, NULL);
if (weapon_hash == NULL)
{
@ -361,7 +382,7 @@ namespace big
}
});
ImGui::SameLine();
if (ImGui::Button("Remove Weapon"))
if (ImGui::Button("VIEW_WEAPON_REMOVE_WEAPON"_T.data()))
{
g.weapons.weapon_hotkeys[selected_key].erase(g.weapons.weapon_hotkeys[selected_key].begin() + counter);
}
@ -371,7 +392,7 @@ namespace big
}
}
if (ImGui::Button("Add Weapon"))
if (ImGui::Button("VIEW_WEAPON_WEAPON_ADD_WEAPON"_T.data()))
{
g.weapons.weapon_hotkeys[selected_key].push_back(WEAPON_UNARMED);
}