Converted all static strings to translation keys. (#2284)
This commit is contained in:
@ -14,10 +14,9 @@ namespace big
|
||||
auto wep_count = g_gta_data_service->weapons().size();
|
||||
auto wep_comp_count = g_gta_data_service->weapon_components().size();
|
||||
|
||||
components::sub_title("GTA cache stats:");
|
||||
ImGui::Text("Peds Cached: %d\nVehicles Cached: %d\nWeapons Cached: %d\nWeapon Components Cached: %d", ped_count, veh_count, wep_count, wep_comp_count);
|
||||
ImGui::Text(std::format("{}: {}\n{}: {}\n{}: {}\n{}: {}", "VIEW_GTA_CACHE_PEDS_CACHED"_T, ped_count, "VIEW_GTA_CACHE_VEHICLES_CACHED"_T, veh_count, "VIEW_GTA_CACHE_WEAPONS_CACHED"_T, wep_count, "VIEW_GTA_CACHE_WEAPON_COMPONENTS_CACHED"_T, wep_comp_count).c_str());
|
||||
|
||||
if (components::button("Rebuild Cache"))
|
||||
if (components::button("VIEW_GTA_CACHE_REBUILD_CACHE"_T))
|
||||
{
|
||||
g_gta_data_service->set_state(eGtaDataUpdateState::NEEDS_UPDATE);
|
||||
g_gta_data_service->update_now();
|
||||
|
@ -18,67 +18,67 @@ namespace big
|
||||
}
|
||||
|
||||
static ImVec4 col_text = ImGui::ColorConvertU32ToFloat4(g.window.text_color);
|
||||
if (ImGui::ColorEdit4("Text Color", (float*)&col_text, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
if (ImGui::ColorEdit4("VIEW_GUI_SETTINGS_TEXT_COLOR"_T.data(), (float*)&col_text, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.window.text_color = ImGui::ColorConvertFloat4ToU32(col_text);
|
||||
}
|
||||
|
||||
static ImVec4 col_button = ImGui::ColorConvertU32ToFloat4(g.window.button_color);
|
||||
if (ImGui::ColorEdit4("Button Color", (float*)&col_button, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
if (ImGui::ColorEdit4("VIEW_GUI_SETTINGS_BUTTON_COLOR"_T.data(), (float*)&col_button, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.window.button_color = ImGui::ColorConvertFloat4ToU32(col_button);
|
||||
}
|
||||
|
||||
static ImVec4 col_frame = ImGui::ColorConvertU32ToFloat4(g.window.frame_color);
|
||||
if (ImGui::ColorEdit4("Frame Color", (float*)&col_frame, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
if (ImGui::ColorEdit4("VIEW_GUI_SETTINGS_FRAME_COLOR"_T.data(), (float*)&col_frame, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.window.frame_color = ImGui::ColorConvertFloat4ToU32(col_frame);
|
||||
}
|
||||
|
||||
components::sub_title("In-Game Overlay");
|
||||
ImGui::Checkbox("Show Overlay", &g.window.ingame_overlay.opened);
|
||||
components::sub_title("VIEW_GUI_SETTINGS_INGAME_OVERLAY"_T);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_OVERLAY"_T.data(), &g.window.ingame_overlay.opened);
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Show When Menu Opened", &g.window.ingame_overlay.show_with_menu_opened);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_OVERLAY_SHOW_WHEN_MENU_OPENED"_T.data(), &g.window.ingame_overlay.show_with_menu_opened);
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Show FPS", &g.window.ingame_overlay.show_fps);
|
||||
ImGui::Checkbox("Show Players", &g.window.ingame_overlay.show_players);
|
||||
ImGui::Checkbox("Show Time", &g.window.ingame_overlay.show_time);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_FPS"_T.data(), &g.window.ingame_overlay.show_fps);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_PLAYERS"_T.data(), &g.window.ingame_overlay.show_players);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_TIME"_T.data(), &g.window.ingame_overlay.show_time);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Show time is currently disabled as it caused problems for some users.");
|
||||
ImGui::Checkbox("Show Indicators", &g.window.ingame_overlay.show_indicators);
|
||||
ImGui::SetTooltip("VIEW_GUI_SETTINGS_SHOW_TIME_TOOLTIP"_T.data());
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INDICATORS"_T.data(), &g.window.ingame_overlay.show_indicators);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Show Replay Interface", &g.window.ingame_overlay.show_replay_interface);
|
||||
ImGui::Checkbox("Show Position", &g.window.ingame_overlay.show_position);
|
||||
ImGui::Checkbox("Show Game Version", &g.window.ingame_overlay.show_game_versions);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_REPLAY_INTERFACE"_T.data(), &g.window.ingame_overlay.show_replay_interface);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_POSITION"_T.data(), &g.window.ingame_overlay.show_position);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_GAME_VERSION"_T.data(), &g.window.ingame_overlay.show_game_versions);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
if (g.window.ingame_overlay.show_indicators)
|
||||
{
|
||||
if (ImGui::TreeNode("Overlay Indicators"))
|
||||
if (ImGui::TreeNode("VIEW_GUI_SETTINGS_OVERLAY_INDICATORS"_T.data()))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Show Player Godmode", &g.window.ingame_overlay_indicators.show_player_godmode);
|
||||
ImGui::Checkbox("Show Off Radar", &g.window.ingame_overlay_indicators.show_off_radar);
|
||||
ImGui::Checkbox("Show Vehicle Godmode", &g.window.ingame_overlay_indicators.show_vehicle_godmode);
|
||||
ImGui::Checkbox("Show Never Wanted", &g.window.ingame_overlay_indicators.show_never_wanted);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_PLAYER_GODMODE"_T.data(), &g.window.ingame_overlay_indicators.show_player_godmode);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_OFF_THE_RADAR"_T.data(), &g.window.ingame_overlay_indicators.show_off_radar);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_VEHICLE_GODMODE"_T.data(), &g.window.ingame_overlay_indicators.show_vehicle_godmode);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_NEVER_WANTED"_T.data(), &g.window.ingame_overlay_indicators.show_never_wanted);
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Show Infinite Ammo", &g.window.ingame_overlay_indicators.show_infinite_ammo);
|
||||
ImGui::Checkbox("Show Always Full Ammo", &g.window.ingame_overlay_indicators.show_always_full_ammo);
|
||||
ImGui::Checkbox("Show Infinite Magazine", &g.window.ingame_overlay_indicators.show_infinite_mag);
|
||||
ImGui::Checkbox("Show Aimbot", &g.window.ingame_overlay_indicators.show_aimbot);
|
||||
ImGui::Checkbox("Show Triggerbot", &g.window.ingame_overlay_indicators.show_triggerbot);
|
||||
ImGui::Checkbox("Show Invisibility", &g.window.ingame_overlay_indicators.show_invisibility);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INFINITE_AMMO"_T.data(), &g.window.ingame_overlay_indicators.show_infinite_ammo);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_ALWAYS_FULL_AMMO"_T.data(), &g.window.ingame_overlay_indicators.show_always_full_ammo);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INFINITE_MAGAZINE"_T.data(), &g.window.ingame_overlay_indicators.show_infinite_mag);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_AIMBOT"_T.data(), &g.window.ingame_overlay_indicators.show_aimbot);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_TRIGGERBOT"_T.data(), &g.window.ingame_overlay_indicators.show_triggerbot);
|
||||
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INVISIBILITY"_T.data(), &g.window.ingame_overlay_indicators.show_invisibility);
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
|
@ -8,57 +8,57 @@ namespace big
|
||||
{
|
||||
ImGui::PushItemWidth(350.f);
|
||||
|
||||
if (ImGui::Hotkey("Menu Toggle", &g.settings.hotkeys.menu_toggle))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_MENU_TOGGLE"_T.data(), &g.settings.hotkeys.menu_toggle))
|
||||
g.settings.hotkeys.editing_menu_toggle = true; // make our menu reappear
|
||||
|
||||
if (ImGui::Hotkey("Teleport to Waypoint", &g.settings.hotkeys.teleport_waypoint))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TELEPORT_TO_WAYPOINT"_T.data(), &g.settings.hotkeys.teleport_waypoint))
|
||||
g_hotkey_service->update_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint);
|
||||
if (ImGui::Hotkey("Teleport to Objective", &g.settings.hotkeys.teleport_objective))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TELEPORT_TO_OBJECTIVE"_T.data(), &g.settings.hotkeys.teleport_objective))
|
||||
g_hotkey_service->update_hotkey("objective", g.settings.hotkeys.teleport_objective);
|
||||
if (ImGui::Hotkey("Teleport to Selected", &g.settings.hotkeys.teleport_selected))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TELEPORT_TO_SELECTED"_T.data(), &g.settings.hotkeys.teleport_selected))
|
||||
g_hotkey_service->update_hotkey("highlighttp", g.settings.hotkeys.teleport_selected);
|
||||
if (ImGui::Hotkey("Teleport into PV", &g.settings.hotkeys.teleport_pv))
|
||||
if (ImGui::Hotkey("TP_IN_PV"_T.data(), &g.settings.hotkeys.teleport_pv))
|
||||
g_hotkey_service->update_hotkey("pvtp", g.settings.hotkeys.teleport_pv);
|
||||
|
||||
if (ImGui::Hotkey("Toggle Noclip", &g.settings.hotkeys.noclip))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_NOCLIP"_T.data(), &g.settings.hotkeys.noclip))
|
||||
g_hotkey_service->update_hotkey("noclip", g.settings.hotkeys.noclip);
|
||||
if (ImGui::Hotkey("Bring PV", &g.settings.hotkeys.bringvehicle))
|
||||
if (ImGui::Hotkey("BRING_PV"_T.data(), &g.settings.hotkeys.bringvehicle))
|
||||
g_hotkey_service->update_hotkey("bringpv", g.settings.hotkeys.bringvehicle);
|
||||
if (ImGui::Hotkey("Toggle invisibility", &g.settings.hotkeys.invis))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_INVISIBILITY"_T.data(), &g.settings.hotkeys.invis))
|
||||
g_hotkey_service->update_hotkey("invis", g.settings.hotkeys.invis);
|
||||
if (ImGui::Hotkey("Toggle passive mode", &g.settings.hotkeys.passive))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_PASSIVE_MODE"_T.data(), &g.settings.hotkeys.passive))
|
||||
g_hotkey_service->update_hotkey("passive", g.settings.hotkeys.passive);
|
||||
if (ImGui::Hotkey("Heal", &g.settings.hotkeys.heal))
|
||||
if (ImGui::Hotkey("HEAL"_T.data(), &g.settings.hotkeys.heal))
|
||||
g_hotkey_service->update_hotkey("heal", g.settings.hotkeys.heal);
|
||||
if (ImGui::Hotkey("Fill Snacks", &g.settings.hotkeys.fill_inventory))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_FILL_SNACKS"_T.data(), &g.settings.hotkeys.fill_inventory))
|
||||
g_hotkey_service->update_hotkey("fillsnacks", g.settings.hotkeys.fill_inventory);
|
||||
if (ImGui::Hotkey("Skip Cutscene", &g.settings.hotkeys.skip_cutscene))
|
||||
if (ImGui::Hotkey("SKIP_CUTSCENE"_T.data(), &g.settings.hotkeys.skip_cutscene))
|
||||
g_hotkey_service->update_hotkey("skipcutscene", g.settings.hotkeys.skip_cutscene);
|
||||
if (ImGui::Hotkey("Toggle Freecam", &g.settings.hotkeys.freecam))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_FREECAM"_T.data(), &g.settings.hotkeys.freecam))
|
||||
g_hotkey_service->update_hotkey("freecam", g.settings.hotkeys.freecam);
|
||||
if (ImGui::Hotkey("Toggle Fastrun", &g.settings.hotkeys.superrun))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_FASTRUN"_T.data(), &g.settings.hotkeys.superrun))
|
||||
g_hotkey_service->update_hotkey("fastrun", g.settings.hotkeys.superrun);
|
||||
if (ImGui::Hotkey("Toggle Superjump", &g.settings.hotkeys.superjump))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_SUPERJUMP"_T.data(), &g.settings.hotkeys.superjump))
|
||||
g_hotkey_service->update_hotkey("superjump", g.settings.hotkeys.superjump);
|
||||
if (ImGui::Hotkey("Toggle Beastjump", &g.settings.hotkeys.beastjump))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_BEASTJUMP"_T.data(), &g.settings.hotkeys.beastjump))
|
||||
g_hotkey_service->update_hotkey("beastjump", g.settings.hotkeys.beastjump);
|
||||
if (ImGui::Hotkey("Toggle Vehicle Invisibility", &g.settings.hotkeys.invisveh))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_VEHICLE_INVISIBILITY"_T.data(), &g.settings.hotkeys.invisveh))
|
||||
g_hotkey_service->update_hotkey("invisveh", g.settings.hotkeys.invisveh);
|
||||
if (ImGui::Hotkey("Toggle Local Veh Invisibility", &g.settings.hotkeys.localinvisveh))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_LOCAL_VEHICLE_INVISIBILITY"_T.data(), &g.settings.hotkeys.localinvisveh))
|
||||
g_hotkey_service->update_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh);
|
||||
if (ImGui::Hotkey("Fill Ammo", &g.settings.hotkeys.fill_ammo));
|
||||
if (ImGui::Hotkey("FILL_AMMO"_T.data(), &g.settings.hotkeys.fill_ammo));
|
||||
g_hotkey_service->update_hotkey("fillammo", g.settings.hotkeys.fill_ammo);
|
||||
if (ImGui::Hotkey("Rage Quit (Like Alt + F4)", &g.settings.hotkeys.fast_quit))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_RAGE_QUIT"_T.data(), &g.settings.hotkeys.fast_quit))
|
||||
g_hotkey_service->update_hotkey("fastquit", g.settings.hotkeys.fast_quit);
|
||||
if (ImGui::Hotkey("Toggle Command Executor", &g.settings.hotkeys.cmd_excecutor))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_COMMAND_EXECUTOR"_T.data(), &g.settings.hotkeys.cmd_excecutor))
|
||||
g_hotkey_service->update_hotkey("cmdexecutor", g.settings.hotkeys.cmd_excecutor);
|
||||
if (ImGui::Hotkey("Repair PV", &g.settings.hotkeys.repairpv))
|
||||
if (ImGui::Hotkey("REPAIR_PV"_T.data(), &g.settings.hotkeys.repairpv))
|
||||
g_hotkey_service->update_hotkey("repairpv", g.settings.hotkeys.repairpv);
|
||||
if (ImGui::Hotkey("Vehicle controller", &g.settings.hotkeys.open_vehicle_controller))
|
||||
if (ImGui::Hotkey("VEHICLE_CONTROLLER"_T.data(), &g.settings.hotkeys.open_vehicle_controller))
|
||||
g_hotkey_service->update_hotkey("vehiclecontroller", g.settings.hotkeys.open_vehicle_controller);
|
||||
if (ImGui::Hotkey("Toggle Vehicle Fly", &g.settings.hotkeys.vehicle_flymode))
|
||||
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_VEHICLE_FLY"_T.data(), &g.settings.hotkeys.vehicle_flymode))
|
||||
g_hotkey_service->update_hotkey("vehiclefly", g.settings.hotkeys.vehicle_flymode);
|
||||
if (ImGui::Hotkey("Clear Wanted", &g.settings.hotkeys.clear_wanted))
|
||||
if (ImGui::Hotkey("CLEAR_WANTED_LEVEL"_T.data(), &g.settings.hotkeys.clear_wanted))
|
||||
g_hotkey_service->update_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
@ -12,7 +12,7 @@ namespace big
|
||||
void view::lua_scripts()
|
||||
{
|
||||
ImGui::PushItemWidth(250);
|
||||
components::sub_title("Loaded Lua Scipts");
|
||||
components::sub_title("VIEW_LUA_SCRIPTS_LOADED_LUA_SCRIPTS"_T);
|
||||
|
||||
if (ImGui::BeginListBox("##empty", ImVec2(200, 200)))
|
||||
{
|
||||
@ -31,11 +31,11 @@ namespace big
|
||||
|
||||
if (!selected_module.expired())
|
||||
{
|
||||
ImGui::Text("Scripts Registered: %d", selected_module.lock()->m_registered_scripts.size());
|
||||
ImGui::Text("Memory Patches Registered: %d", selected_module.lock()->m_registered_patches.size());
|
||||
ImGui::Text("GUI Tabs Registered: %d", selected_module.lock()->m_gui.size());
|
||||
ImGui::Text(std::format("{}: {}", "VIEW_LUA_SCRIPTS_SCRIPTS_REGISTERED"_T, selected_module.lock()->m_registered_scripts.size()).c_str());
|
||||
ImGui::Text(std::format("{}: {}", "VIEW_LUA_SCRIPTS_MEMORY_PATCHES_REGISTERED"_T, selected_module.lock()->m_registered_patches.size()).c_str());
|
||||
ImGui::Text(std::format("{}: {}", "VIEW_LUA_SCRIPTS_GUI_TABS_REGISTERED"_T, selected_module.lock()->m_gui.size()).c_str());
|
||||
|
||||
if (components::button("Reload"))
|
||||
if (components::button("VIEW_LUA_SCRIPTS_RELOAD"_T))
|
||||
{
|
||||
const std::filesystem::path module_path = selected_module.lock()->module_path();
|
||||
const auto id = selected_module.lock()->module_id();
|
||||
@ -48,15 +48,15 @@ namespace big
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
if (components::button("Reload All"))
|
||||
if (components::button("VIEW_LUA_SCRIPTS_RELOAD_ALL"_T))
|
||||
{
|
||||
g_lua_manager->unload_all_modules();
|
||||
g_lua_manager->load_all_modules();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Auto Reload Changed Scripts", &g.lua.enable_auto_reload_changed_scripts);
|
||||
ImGui::Checkbox("VIEW_LUA_SCRIPTS_AUTO_RELOAD_CHANGED_SCRIPTS"_T.data(), &g.lua.enable_auto_reload_changed_scripts);
|
||||
|
||||
if (components::button("Open Lua Scripts Folder"))
|
||||
if (components::button("VIEW_LUA_SCRIPTS_OPEN_LUA_SCRIPTS_FOLDER"_T))
|
||||
{
|
||||
std::string command = "explorer.exe /select," + g_lua_manager->get_scripts_folder().get_path().string();
|
||||
|
||||
|
@ -53,21 +53,21 @@ namespace big
|
||||
ImGui::SetTooltip("BLOCK_RID_JOINING_DESCRIPTION"_T.data());
|
||||
ImGui::Checkbox("RECEIVE_PICKUP"_T.data(), &g.protections.receive_pickup);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("This prevents the collection of pickups such as unwanted money bags\nNote: Normal pickups are also no longer possible to collect with this enabled");
|
||||
ImGui::SetTooltip("VIEW_PROTECTION_SETTINGS_RECEIVE_PICKUP_TOOLTIP"_T.data());
|
||||
ImGui::Checkbox("ADMIN_CHECK"_T.data(), &g.protections.admin_check);
|
||||
ImGui::Checkbox("Kick Rejoin", &g.protections.kick_rejoin);
|
||||
ImGui::Checkbox("VIEW_PROTECTION_SETTINGS_KICK_REJOIN"_T.data(), &g.protections.kick_rejoin);
|
||||
components::command_checkbox<"forcerelays">();
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SeparatorText("Options");
|
||||
ImGui::SeparatorText("VIEW_PROTECTION_SETTINGS_OPTIONS"_T.data());
|
||||
ImGui::BeginGroup();
|
||||
if (ImGui::Button("Enable All Protections"))
|
||||
if (ImGui::Button("VIEW_PROTECTION_SETTINGS_ENABLE_ALL_PROTECTIONS"_T.data()))
|
||||
set_all_protections(true);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Disable All Protections"))
|
||||
if (ImGui::Button("VIEW_PROTECTION_SETTINGS_DISABLE_ALL_PROTECTIONS"_T.data()))
|
||||
set_all_protections(false);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset Protections"))
|
||||
if (ImGui::Button("VIEW_PROTECTION_SETTINGS_RESET_PROTECTIONS"_T.data()))
|
||||
reset_protections();
|
||||
ImGui::EndGroup();
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ namespace big
|
||||
|
||||
ImGui::SeparatorText("SETTINGS_LANGUAGES"_T.data());
|
||||
|
||||
if (language_entries.contains(current_pack) && ImGui::BeginCombo("Menu Language", language_entries.at(current_pack).name.c_str()))
|
||||
if (language_entries.contains(current_pack) && ImGui::BeginCombo("VIEW_SETTINGS_MENU_LANGUAGE"_T.data(), language_entries.at(current_pack).name.c_str()))
|
||||
{
|
||||
for (auto& i : language_entries)
|
||||
{
|
||||
@ -27,7 +27,7 @@ namespace big
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (ImGui::BeginCombo("Game Language", languages[*g_pointers->m_gta.m_language].name))
|
||||
if (ImGui::BeginCombo("VIEW_SETTINGS_GAME_LANGUAGE"_T.data(), languages[*g_pointers->m_gta.m_language].name))
|
||||
{
|
||||
for (auto& language : languages)
|
||||
{
|
||||
@ -49,19 +49,19 @@ namespace big
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (components::button("Force Update Languages"))
|
||||
if (components::button("VIEW_SETTINGS_FORCE_UPDATE_LANGUAGES"_T))
|
||||
{
|
||||
g_thread_pool->push([] {
|
||||
g_translation_service.update_n_reload_language_packs();
|
||||
|
||||
g_notification_service->push_success("Translations", "Finished updating translations.");
|
||||
g_notification_service->push_success("LANGUAGE"_T.data(), "VIEW_SETTINGS_FINISHED_UPDATING_TRANSLATIONS"_T.data());
|
||||
});
|
||||
}
|
||||
|
||||
ImGui::SeparatorText("SETTINGS_MISC"_T.data());
|
||||
ImGui::Checkbox("SETTINGS_MISC_DEV_DLC"_T.data(), &g.settings.dev_dlc);
|
||||
|
||||
if (ImGui::Button("Reset Settings"))
|
||||
if (ImGui::Button("VIEW_SETTINGS_RESET"_T.data()))
|
||||
{
|
||||
g.write_default_config();
|
||||
g.load();
|
||||
|
@ -107,9 +107,9 @@ namespace big
|
||||
|
||||
static void tab_item_stat()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Stat"))
|
||||
if (ImGui::BeginTabItem("VIEW_STAT_EDITOR_STAT"_T.data()))
|
||||
{
|
||||
ImGui::Text("Stat: prefix with $ for string ($MPX_CHAR_SET_RP_GIFT_ADMIN)");
|
||||
ImGui::Text("VIEW_STAT_EDITOR_STAT_HELP"_T.data());
|
||||
|
||||
enum Mode
|
||||
{
|
||||
@ -146,111 +146,112 @@ namespace big
|
||||
{
|
||||
case INT:
|
||||
{
|
||||
components::input_text("Stat", stat_int_text, sizeof(stat_int_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_int_text, sizeof(stat_int_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.int_text = stat_int_text;
|
||||
});
|
||||
components::input_text("Value", stat_int_value, sizeof(stat_int_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_int_value, sizeof(stat_int_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.int_value = stat_int_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_int(stat_int_text, stat_int_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.stat.int_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.int_read);
|
||||
components::input_text("##read_result", stat_int_read_result, sizeof(stat_int_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
case BOOLEAN:
|
||||
{
|
||||
components::input_text("Stat", stat_bool_text, sizeof(stat_bool_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_bool_text, sizeof(stat_bool_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.bool_text = stat_bool_text;
|
||||
});
|
||||
components::input_text("Value", stat_bool_value, sizeof(stat_bool_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_bool_value, sizeof(stat_bool_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.bool_value = stat_bool_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_bool(stat_bool_text, stat_bool_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.stat.bool_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.bool_read);
|
||||
components::input_text("##read_result", stat_bool_read_result, sizeof(stat_bool_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
case FLOAT:
|
||||
{
|
||||
components::input_text("Stat", stat_float_text, sizeof(stat_float_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_float_text, sizeof(stat_float_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.float_text = stat_float_text;
|
||||
});
|
||||
components::input_text("Value", stat_float_value, sizeof(stat_float_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_float_value, sizeof(stat_float_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.float_value = stat_float_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_float(stat_float_text, stat_float_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.stat.float_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.float_read);
|
||||
components::input_text("##read_result", stat_float_read_result, sizeof(stat_float_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
case INCREMENT:
|
||||
{
|
||||
components::input_text("Stat", stat_increment_text, sizeof(stat_increment_text), ImGuiInputTextFlags_None, [] {
|
||||
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_increment_text, sizeof(stat_increment_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.increment_text = stat_increment_text;
|
||||
});
|
||||
components::input_text("Value", stat_increment_value, sizeof(stat_increment_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_increment_value, sizeof(stat_increment_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.increment_value = stat_increment_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_increment(stat_increment_text, stat_increment_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Loop Write", &g.stat_editor.stat.increment_loop_write);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_LOOP_WRITE"_T.data(), &g.stat_editor.stat.increment_loop_write);
|
||||
}
|
||||
break;
|
||||
case DATE:
|
||||
{
|
||||
components::input_text("Stat", stat_date_text, sizeof(stat_date_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_date_text, sizeof(stat_date_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.date_text = stat_date_text;
|
||||
});
|
||||
components::input_text("Value", stat_date_value, sizeof(stat_date_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_date_value, sizeof(stat_date_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.date_value = stat_date_value;
|
||||
});
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("year month day hour minute second millisecond\nexample: 2022 1 17 21 34 55");
|
||||
components::button("Apply", [] {
|
||||
ImGui::SetTooltip("VIEW_STAT_EDITOR_DATE_TOOLTIP"_T.data());
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_date(stat_date_text, stat_date_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.stat.date_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.date_read);
|
||||
components::input_text("##read_result", stat_date_read_result, sizeof(stat_date_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
case STRING:
|
||||
{
|
||||
components::input_text("Stat", stat_string_text, sizeof(stat_string_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_string_text, sizeof(stat_string_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.string_text = stat_string_text;
|
||||
});
|
||||
components::input_text("Value", stat_string_value, sizeof(stat_string_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_string_value, sizeof(stat_string_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.string_value = stat_string_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_string(stat_string_text, stat_string_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.stat.string_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.string_read);
|
||||
components::input_text("##read_result", stat_string_read_result, sizeof(stat_string_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
case LABEL:
|
||||
{
|
||||
components::input_text("Stat", stat_label_text, sizeof(stat_label_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_label_text, sizeof(stat_label_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.label_text = stat_label_text;
|
||||
});
|
||||
components::input_text("Value", stat_label_value, sizeof(stat_label_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_label_value, sizeof(stat_label_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.label_value = stat_label_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_label(stat_label_text, stat_label_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
@ -258,17 +259,17 @@ namespace big
|
||||
break;
|
||||
case USER_ID:
|
||||
{
|
||||
components::input_text("Stat", stat_user_id_text, sizeof(stat_user_id_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_user_id_text, sizeof(stat_user_id_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.user_id_text = stat_user_id_text;
|
||||
});
|
||||
components::input_text("Value", stat_user_id_value, sizeof(stat_user_id_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_user_id_value, sizeof(stat_user_id_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.stat.user_id_value = stat_user_id_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::stat_set_user_id(stat_user_id_text, stat_user_id_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.stat.user_id_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.user_id_read);
|
||||
components::input_text("##read_result", stat_user_id_read_result, sizeof(stat_user_id_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
@ -276,7 +277,7 @@ namespace big
|
||||
{
|
||||
ImGui::Text("0:Int\n1:Bool\n2:Float\n3:Increment\n4:Date\n5:String\n6:Label\n7:User Id");
|
||||
ImGui::Text("Example:\n$MPX_CHAR_NAME\n5:name\n$MPX_DEFAULT_STATS_SET\n1:0");
|
||||
components::button("Import From Clipboard", [] {
|
||||
components::button("IMPORT_FROM_CLIPBOARD"_T, [] {
|
||||
std::string clipboard_text = ImGui::GetClipboardText();
|
||||
std::vector<std::string> lines;
|
||||
std::string line;
|
||||
@ -320,9 +321,9 @@ namespace big
|
||||
|
||||
static void tab_item_packed_stat()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Packed Stat"))
|
||||
if (ImGui::BeginTabItem("VIEW_STAT_EDITOR_PACKED_STAT"_T.data()))
|
||||
{
|
||||
ImGui::Text("Index: enter two numbers to represent a range (31786 32786)");
|
||||
ImGui::Text("VIEW_STAT_EDITOR_PACKED_STAT_INDEX_HELP"_T.data());
|
||||
|
||||
enum Mode
|
||||
{
|
||||
@ -341,33 +342,33 @@ namespace big
|
||||
{
|
||||
case INT:
|
||||
{
|
||||
components::input_text("Index", packed_stat_int_text, sizeof(packed_stat_int_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_PACKED_STAT_INDEX"_T, packed_stat_int_text, sizeof(packed_stat_int_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.packed_stat.int_text = packed_stat_int_text;
|
||||
});
|
||||
components::input_text("Value", packed_stat_int_value, sizeof(packed_stat_int_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, packed_stat_int_value, sizeof(packed_stat_int_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.packed_stat.int_value = packed_stat_int_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::packed_stat_set_int(packed_stat_int_text, packed_stat_int_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.packed_stat.int_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.packed_stat.int_read);
|
||||
components::input_text("##read_result", packed_stat_int_read_result, sizeof(packed_stat_int_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
case BOOLEAN:
|
||||
{
|
||||
components::input_text("Index", packed_stat_bool_text, sizeof(packed_stat_bool_text), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_STAT_EDITOR_PACKED_STAT_INDEX"_T, packed_stat_bool_text, sizeof(packed_stat_bool_text), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.packed_stat.bool_text = packed_stat_bool_text;
|
||||
});
|
||||
components::input_text("Value", packed_stat_bool_value, sizeof(packed_stat_bool_value), ImGuiInputTextFlags_None, [] {
|
||||
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, packed_stat_bool_value, sizeof(packed_stat_bool_value), ImGuiInputTextFlags_None, [] {
|
||||
g.stat_editor.packed_stat.bool_value = packed_stat_bool_value;
|
||||
});
|
||||
components::button("Apply", [] {
|
||||
components::button("APPLY"_T, [] {
|
||||
helper::packed_stat_set_bool(packed_stat_bool_text, packed_stat_bool_value);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Read", &g.stat_editor.packed_stat.bool_read);
|
||||
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.packed_stat.bool_read);
|
||||
components::input_text("##read_result", packed_stat_bool_read_result, sizeof(packed_stat_bool_read_result), ImGuiInputTextFlags_ReadOnly);
|
||||
}
|
||||
break;
|
||||
@ -375,7 +376,7 @@ namespace big
|
||||
{
|
||||
ImGui::Text("0:Int\n1:Bool");
|
||||
ImGui::Text("Example:\n31786\n0:123\n31786 32786\n1:1");
|
||||
components::button("Import From Clipboard", [] {
|
||||
components::button("IMPORT_FROM_CLIPBOARD"_T, [] {
|
||||
std::string clipboard_text = ImGui::GetClipboardText();
|
||||
std::vector<std::string> lines;
|
||||
std::string line;
|
||||
@ -468,9 +469,9 @@ namespace big
|
||||
helper::packed_stat_get_bool(packed_stat_bool_text).c_str());
|
||||
});
|
||||
|
||||
components::sub_title(std::format("Posix Time: {}-{}-{} {}:{}:{}", year, month, day, hour, minute, second));
|
||||
components::sub_title(std::format("Character Index: {}", self::char_index));
|
||||
components::sub_title("Be aware of stat limits, use with caution, modifying some stats are risky.");
|
||||
components::sub_title(std::format("{}: {}-{}-{} {}:{}:{}", "VIEW_STAT_EDITOR_POSIX_TIME"_T, year, month, day, hour, minute, second));
|
||||
components::sub_title(std::format("{}: {}", "VIEW_STAT_EDITOR_CHAR_INDEX"_T, self::char_index));
|
||||
components::sub_title("VIEW_STAT_EDITOR_WARNING"_T);
|
||||
|
||||
if (ImGui::BeginTabBar("##stat_editor_tab_bar"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user