diff --git a/resource/common/locale/English.json b/resource/common/locale/English.json index 3c83b17..e18dea0 100644 --- a/resource/common/locale/English.json +++ b/resource/common/locale/English.json @@ -1,99 +1,127 @@ { - "Main" : - { - "TranslatorName" : "Grinch_", - "TranslationLanguage" : "English", - "TranslationLanguageDisclaimer" : "Translated to English by Grinch_" + "Animation": { + "AddAnimation": "Add animation", + "AddParticle": "Add particle", + "AnimationRemoved": "Animation removed", + "AnimationTab": "Animation##TABBAR", + "AnimName": "Anim name", + "CustomAnimsOnly": "You can only remove custom animations", + "CustomParticlesOnly": "You can only remove custom particles", + "CutsceneRunning": "Another cutscene is running", + "CutsceneTab": "Cutscene##TABBAR", + "FightingStyle": "Fighting style", + "FightingStyleSet": "Fighting style set", + "IFPName": "IFP name", + "InvisiblePlayer": "Invisible player", + "LoopCheckbox": "Loop", + "LoopCheckboxText": "Keep playing the animation on repeat", + "NoTarget": "No player target found. Aim a ped with a weapon to select it for animation player.", + "ParticleName": "Particle name", + "ParticleRemoved": "Particle removed", + "ParticleTab": "Particle##TABBAR", + "PedAnim": "Ped anim", + "PedAnimText": "Play animation on other peds.\nSelect with weapon target.", + "RemoveAll": "Remove all", + "RemoveLatest": "Remove latest", + "SecondaryCheckbox": "Secondary", + "SecondaryCheckboxText": "Player can move while playing the animation", + "StopAnimation": "Stop Animation", + "StopCutscene": "Stop cutscene", + "Styles": "Styles", + "WalkingStyle": "Walking style", + "WalkingStyleSet": "Walking style set" }, - "Teleport" : - { - "TargetBlipText" : "Target blip not found. You need to place it on the map first", - "InvalidLocation" : "Invalid location", - "LocationRemoved" : "Location removed", - "CustomLocationRemoveOnly" : "You can only remove custom location", - "InsertCoord" : "Insert coordinates", - "QuickTeleport" : "Quick teleport", - "QuickTeleportHint" : "Teleport to the location of your radar\ntarget blip using ", - "Coordinates" : "Coordinates", - "TeleportToCoord" : "Teleport to coordinates", - "InvalidCoord" : "Invalid coordinates", - "TeleportMarker" : "Teleport to marker", - "TeleportCenter" : "Teleport to center", - "Location" : "Location", - "LocationHint" : "Groove Street", - "AddLocation" : "Add location" + "Main": { + "TranslationLanguage": "English", + "TranslationLanguageDisclaimer": "Translated to English by Grinch_", + "TranslatorName": "Grinch_" }, - "Window" : - { - "TeleportPage" : "Teleport", - "PlayerPage" : "Player", - "PedPage" : "Ped", - "VehiclePage" : "Vehicle", - "WeaponPage" : "Weapon", - "AnimationPage" : "Animation", - "GamePage" : "Game", - "VisualPage" : "Visual", - "MenuPage" : "Menu", - "Search" : "Search", - "AddNew" : "Add new" + "Menu": { + "About": "About", + "Author": "Author", + "BugDisclaimer": "If you find bugs or have suggestions, let me know on discord.", + "Build": "Build", + "CheckUpdate": "Check update", + "Commands": "Commands", + "Config": "Config", + "CopyrightDisclaimer": "Copyright Grinch_ 2019-2022. All rights reserved.", + "Credits": "Credits", + "DiscordServer": "Discord server", + "FixVehKey": "Fix current vehicle", + "FlipVehKey": "Flip current vehicle", + "FreecamKey": "Toggle freecam", + "GitHubRepo": "GitHub repo", + "GodModeKey": "Toggle god mode", + "Hotkeys": "Hotkeys", + "Language": "Language", + "LanguageChangeFailed": "Failed to change language!", + "Name": "Name", + "NoBG": "No background", + "OpenCMDKey": "Open/ close command window", + "OpenCMDUsing": "Open or close command window using %s", + "OpenMenuKey": "Open/ close cheat menu", + "Overlay": "Overlay", + "Position": "Position", + "QuickSSKey": "Quick screenshot", + "QuickTPKey": "Toogle quick teleport", + "QuickVehSpawnerCMD": "Quick vehicle spawner", + "QuickVehSpawnerCMDText": "Spawn vehicles by typing their model names.\nExample: veh (veh_name)", + "QuickWepSpawnerCMD": "Quick weapon spawner", + "QuickWepSpawnerCMDText": "Spawn weapons by typing their model names.\nExample: wep (wep_name)", + "ResetConfig": "Reset config", + "ResetConfigMSG": "Config has been reset. Restart the game for it to take effect.", + "ResetSize": "Reset sonfig", + "SetHealthCMD": "Set health", + "SetHealthCMDText": "Set player health.\nExample: hp (health).", + "SetTimeCMD": "Set time", + "SetTimeCMDText": "Set current game time.\nExample: time (hour) (minute).\n", + "SetTimeCMDText2": "Writing something like 'time 12' would be interpreted as 'time 12 12'", + "ShowCoords": "Show coordinates", + "ShowCPU": "Show CPU usage", + "ShowFPS": "Show FPS", + "ShowLocation": "Show location", + "ShowRAM": "Show RAM usage", + "ShowVehHealth": "Show veh health", + "ShowVehSpeed": "Show veh speed", + "SkinChangerKey": "Activate aim skin changer", + "TeleportCMD": "Teleport", + "TeleportCMDText": "Teleports player to specified coordinates.\nExample: tp x y z", + "TextColor": "Text color", + "Usage": "Usage", + "UsageText": "Left-click selects hotkey.\nLeft clicking outside deselects.\nRight click disables hotkey.", + "VehEngineKey": "Toggle vehicle engine", + "VehStartKey": "Vehicle instant start", + "VehStopKey": "Vehicle instant start", + "Version": "Version" }, - "Menu" : - { - "BugDisclaimer" : "If you find bugs or have suggestions, let me know on discord.", - "CopyrightDisclaimer" : "Copyright Grinch_ 2019-2022. All rights reserved.", - "Author" : "Author", - "Version" : "Version", - "Build" : "Build", - "CheckUpdate" : "Check update", - "DiscordServer" : "Discord server", - "GitHubRepo" : "GitHub repo", - "Usage" : "Usage", - "UsageText" : "Left-click selects hotkey.\nLeft clicking outside deselects.\nRight click disables hotkey.", - "OpenMenuKey" : "Open/ close cheat menu", - "OpenCMDKey" : "Open/ close command window", - "SkinChangerKey" : "Activate aim skin changer", - "Config" : "Config", - "Name" : "Name", - "Credits" : "Credits", - "FreecamKey" : "Toggle freecam", - "QuickTPKey" : "Toogle quick teleport", - "ResetConfig" : "Reset config", - "FixVehKey" : "Fix current vehicle", - "FlipVehKey" : "Flip current vehicle", - "GodModeKey" : "Toggle god mode", - "VehEngineKey" : "Toggle vehicle engine", - "VehStartKey" : "Vehicle instant start", - "VehStopKey" : "Vehicle instant start", - "QuickSSKey" : "Quick screenshot", - "OpenCMDUsing" : "Open or close command window using %s", - "SetHealthCMD" : "Set health", - "SetHealthCMDText" : "Set player health.\nExample: hp (health).", - "SetTimeCMD" : "Set time", - "SetTimeCMDText" : "Set current game time.\nExample: time (hour) (minute).\n", - "SetTimeCMDText2" : "Writing something like 'time 12' would be interpreted as 'time 12 12'", - "TeleportCMD" : "Teleport", - "TeleportCMDText" : "Teleports player to specified coordinates.\nExample: tp x y z", - "ResetConfigMSG" : "Config has been reset. Restart the game for it to take effect.", - "QuickVehSpawnerCMD" : "Quick vehicle spawner", - "QuickVehSpawnerCMDText" : "Spawn vehicles by typing their model names.\nExample: veh (veh_name)", - "QuickWepSpawnerCMD" : "Quick weapon spawner", - "QuickWepSpawnerCMDText" : "Spawn weapons by typing their model names.\nExample: wep (wep_name)", - "ResetSize" : "Reset sonfig", - "Overlay" : "Overlay", - "Position" : "Position", - "Language" : "Language", - "TextColor" : "Text color", - "NoBG" : "No background", - "ShowCoords" : "Show coordinates", - "ShowCPU" : "Show CPU usage", - "ShowFPS" : "Show FPS", - "ShowLocation" : "Show location", - "ShowRAM" : "Show RAM usage", - "ShowVehHealth" : "Show veh health", - "ShowVehSpeed" : "Show veh speed", - "Hotkeys" : "Hotkeys", - "Commands" : "Commands", - "About" : "About", - "LanguageChangeFailed" : "Failed to change language!" + "Teleport": { + "AddLocation": "Add location", + "Coordinates": "Coordinates", + "CustomLocationRemoveOnly": "You can only remove custom location", + "InsertCoord": "Insert coordinates", + "InvalidCoord": "Invalid coordinates", + "InvalidLocation": "Invalid location", + "Location": "Location", + "LocationHint": "Groove Street", + "LocationRemoved": "Location removed", + "QuickTeleport": "Quick teleport", + "QuickTeleportHint": "Teleport to the location of your radar\ntarget blip using ", + "TargetBlipText": "Target blip not found. You need to place it on the map first", + "TeleportCenter": "Teleport to center", + "TeleportMarker": "Teleport to marker", + "TeleportToCoord": "Teleport to coordinates" + }, + "Window": { + "AddNew": "Add new", + "AnimationPage": "Animation", + "GamePage": "Game", + "MenuPage": "Menu", + "PedPage": "Ped", + "PlayerPage": "Player", + "Search": "Search", + "TeleportPage": "Teleport", + "VehiclePage": "Vehicle", + "VisualPage": "Visual", + "WeaponPage": "Weapon" } -} \ No newline at end of file + } \ No newline at end of file diff --git a/src/animation.cpp b/src/animation.cpp index 5cfda78..7f39f4c 100644 --- a/src/animation.cpp +++ b/src/animation.cpp @@ -23,7 +23,7 @@ void Animation::PlayCutscene(std::string& rootKey, std::string& cutsceneId, std: { if (Util::IsOnCutscene()) { - SetHelpMessage("Another cutscene is running", false, false, false); + SetHelpMessage(TEXT("Animation.CutsceneRunning"), false, false, false); return; } @@ -62,11 +62,11 @@ void Animation::RemoveParticle(std::string& ifp, std::string& particle, std::str { m_Particle::m_Data.m_pJson->m_Data["Custom"].erase(particle); m_Particle::m_Data.m_pJson->WriteToDisk(); - SetHelpMessage("Particle removed", false, false, false); + SetHelpMessage(TEXT("Animation.ParticleRemoved")); } else { - SetHelpMessage("You can only remove custom particles", false, false, false); + SetHelpMessage(TEXT("Animation.CustomParticlesOnly")); } } @@ -285,10 +285,10 @@ void Animation::ShowPage() ImGui::Spacing(); - if (ImGui::BeginTabItem("Animation##TABBAR")) + if (ImGui::BeginTabItem(TEXT("Animation.AnimationTab"))) { ImGui::Spacing(); - if (ImGui::Button("Stop animation", Ui::GetSize())) + if (ImGui::Button(TEXT("Animation.StopAnimation"), Ui::GetSize())) { if (hPlayer) { @@ -302,27 +302,27 @@ void Animation::ShowPage() ImGui::Spacing(); ImGui::Columns(2, nullptr, false); - Ui::CheckboxWithHint("Loop", &m_Loop, "Keep playing the animation on repeat"); - Ui::CheckboxWithHint("Secondary", &m_bSecondary, "Player can move while playing the animation"); + Ui::CheckboxWithHint(TEXT("Animation.LoopCheckbox"), &m_Loop, TEXT("Animation.LoopCheckboxText")); + Ui::CheckboxWithHint(TEXT("Animation.SecondaryCheckbox"), &m_bSecondary, TEXT("Animation.SecondaryCheckboxText")); ImGui::NextColumn(); #ifdef GTASA - Ui::CheckboxWithHint("Ped anim", &m_PedAnim, "Play animation on other peds.\nSelect with weapon target."); + Ui::CheckboxWithHint(TEXT("Animation.PedAnim"), &m_PedAnim, TEXT("Animation.PedAnimText")); #endif ImGui::Columns(1); ImGui::Spacing(); if (m_PedAnim && !m_pTarget) { - ImGui::TextWrapped("No player target found. Aim a ped with a weapon to select it for animation player."); + ImGui::TextWrapped(TEXT("Animation.NoTarget")); } else { - if (ImGui::CollapsingHeader("Add new")) + if (ImGui::CollapsingHeader(TEXT("Window.AddNew"))) { - ImGui::InputTextWithHint("IFP name", "ped", m_nIfpBuffer, INPUT_BUFFER_SIZE); - ImGui::InputTextWithHint("Anim name", "cower", m_nAnimBuffer, INPUT_BUFFER_SIZE); + ImGui::InputTextWithHint(TEXT("Animation.IFPName"), "ped", m_nIfpBuffer, INPUT_BUFFER_SIZE); + ImGui::InputTextWithHint(TEXT("Animation.AnimName"), "cower", m_nAnimBuffer, INPUT_BUFFER_SIZE); ImGui::Spacing(); - if (ImGui::Button("Add animation", Ui::GetSize())) + if (ImGui::Button(TEXT("Animation.AddAnimation"), Ui::GetSize())) { m_AnimData.m_pJson->m_Data["Custom"][m_nAnimBuffer] = ("0, " + std::string(m_nIfpBuffer)); m_AnimData.m_pJson->WriteToDisk(); @@ -340,10 +340,10 @@ void Animation::ShowPage() ImGui::EndTabItem(); } #ifdef GTASA - if (ImGui::BeginTabItem("Cutscene")) + if (ImGui::BeginTabItem(TEXT("Animation.CutsceneTab"))) { ImGui::Spacing(); - if (ImGui::Button("Stop cutscene", Ui::GetSize())) + if (ImGui::Button(TEXT("Animation.StopCutscene"), Ui::GetSize())) { if (m_Cutscene::m_bRunning) { @@ -367,10 +367,10 @@ void Animation::ShowPage() } ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Particle##TABBAR")) + if (ImGui::BeginTabItem(TEXT("Animation.ParticleTab"))) { ImGui::Spacing(); - if (ImGui::Button("Remove all", Ui::GetSize(2))) + if (ImGui::Button(TEXT("Animation.RemoveAll"), Ui::GetSize(2))) { for (int& p : m_Particle::m_nParticleList) { @@ -379,22 +379,22 @@ void Animation::ShowPage() m_Particle::m_nParticleList.clear(); } ImGui::SameLine(); - if (ImGui::Button("Remove latest", Ui::GetSize(2))) + if (ImGui::Button(TEXT("Animation.RemoveLatest"), Ui::GetSize(2))) { Command(m_Particle::m_nParticleList.back()); // stop if anything is running m_Particle::m_nParticleList.pop_back(); } ImGui::Spacing(); - if (Ui::CheckboxBitFlag("Invisible player", pPlayer->m_nPedFlags.bDontRender)) + if (Ui::CheckboxBitFlag(TEXT("Animation.InvisiblePlayer"), pPlayer->m_nPedFlags.bDontRender)) { pPlayer->m_nPedFlags.bDontRender = (pPlayer->m_nPedFlags.bDontRender == 1) ? 0 : 1; } ImGui::Spacing(); - if (ImGui::CollapsingHeader("Add new")) + if (ImGui::CollapsingHeader(TEXT("Window.AddNew"))) { - ImGui::InputTextWithHint("Particle name", "kkjj_on_fire", m_Particle::m_NameBuffer, INPUT_BUFFER_SIZE); + ImGui::InputTextWithHint(TEXT("Animation.ParticleName"), "kkjj_on_fire", m_Particle::m_NameBuffer, INPUT_BUFFER_SIZE); ImGui::Spacing(); - if (ImGui::Button("Add animation", Ui::GetSize())) + if (ImGui::Button(TEXT("Animation.AddParticle"), Ui::GetSize())) { m_Particle::m_Data.m_pJson->m_Data["Custom"][m_Particle::m_NameBuffer] = "Dummy"; m_Particle::m_Data.m_pJson->WriteToDisk(); @@ -409,15 +409,15 @@ void Animation::ShowPage() } ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Style")) + if (ImGui::BeginTabItem(TEXT("Animation.Styles"))) { ImGui::Spacing(); - if (Ui::ListBox("Fighting style", m_FightingStyleList, m_nFightingStyle)) + if (Ui::ListBox(TEXT("Animation.FightingStyle"), m_FightingStyleList, m_nFightingStyle)) { Command(hPlayer, m_nFightingStyle + 4, 6); - SetHelpMessage("Fighting anim set", false, false, false); + SetHelpMessage(TEXT("Animation.FightingStyleSet")); } - if (Ui::ListBoxStr("Walking style", m_WalkingStyleList, m_nWalkingStyle)) + if (Ui::ListBoxStr(TEXT("Animation.WalkingStyle"), m_WalkingStyleList, m_nWalkingStyle)) { if (m_nWalkingStyle == "default") { @@ -432,7 +432,7 @@ void Animation::ShowPage() Command(hPlayer, m_nWalkingStyle.c_str()); Command(m_nWalkingStyle.c_str()); } - SetHelpMessage("Walking anim set", false, false, false); + SetHelpMessage(TEXT("Animation.WalkingStyleSet")); } ImGui::EndTabItem(); } @@ -447,10 +447,10 @@ void Animation::RemoveAnimation(std::string& ifp, std::string& anim, std::string { m_AnimData.m_pJson->m_Data["Custom"].erase(anim); m_AnimData.m_pJson->WriteToDisk(); - SetHelpMessage("Animation removed", false, false, false); + SetHelpMessage(TEXT("Animation.AnimationRemoved")); } else { - SetHelpMessage("You can only remove custom anims", false, false, false); + SetHelpMessage(TEXT("Animation.CustomAnimsOnly")); } } \ No newline at end of file diff --git a/src/version.h b/src/version.h index d122893..3912c9d 100644 --- a/src/version.h +++ b/src/version.h @@ -2,5 +2,5 @@ #define MENU_NAME "Cheat Menu" #define MENU_VERSION_NUMBER "3.2" #define MENU_VERSION MENU_VERSION_NUMBER"-beta" -#define BUILD_NUMBER "20220212" +#define BUILD_NUMBER "20220214" #define MENU_TITLE MENU_NAME " v" MENU_VERSION