More translation updates

This commit is contained in:
Grinch_ 2022-02-22 13:44:33 +06:00
parent 7c4e7fba14
commit 0d2b4bd1e8
6 changed files with 73 additions and 43 deletions

View File

@ -70,7 +70,7 @@
"QuickWepSpawnerCMDText": "Spawn weapons by typing their model names.\nExample: wep (wep_name)", "QuickWepSpawnerCMDText": "Spawn weapons by typing their model names.\nExample: wep (wep_name)",
"ResetConfig": "Reset config", "ResetConfig": "Reset config",
"ResetConfigMSG": "Config has been reset. Restart the game for it to take effect.", "ResetConfigMSG": "Config has been reset. Restart the game for it to take effect.",
"ResetSize": "Reset sonfig", "ResetSize": "Reset size",
"SetHealthCMD": "Set health", "SetHealthCMD": "Set health",
"SetHealthCMDText": "Set player health.\nExample: hp (health).", "SetHealthCMDText": "Set player health.\nExample: hp (health).",
"SetTimeCMD": "Set time", "SetTimeCMD": "Set time",
@ -221,16 +221,37 @@
"WeaponIconPosY": "Weapon icon posY", "WeaponIconPosY": "Weapon icon posY",
"WhiteScanlines": "White scanlines" "WhiteScanlines": "White scanlines"
}, },
"Weapon": {
"Ammo": "Ammo",
"DropAll": "Drop all",
"DropCurrent": "Drop current",
"DropWeapon": "Drop weapon",
"DualWeild": "Dual weild",
"DualWeildText": "Dual wield pistol, shawoff, uzi, tec9\n(Other weapons don't work)",
"FastAim": "Fast aim",
"FastAimText": "Enables aim assist on keyboard\n\nQ = left E = right\n\nPress Q and E to switch targets.\nMoving mouse removes the target!",
"FastReload": "Fast reload",
"HugeDamage": "Huge damage",
"HugeDamageText": "Also enable 'Long range' if weapon range is short",
"InfiniteAmmo": "Infinite ammo",
"LongRange": "Long range",
"MoveWhenAiming": "Move when aiming",
"MoveWhenFiring": "Move when firing",
"RapidFire": "Rapid fire",
"WeaponTweaksText": "Weapon tweaks apply globally\nto every ped weapon type"
},
"Window": { "Window": {
"AddNew": "Add new", "AddNew": "Add new",
"AnimationPage": "Animation", "AnimationPage": "Animation",
"CheckboxTab": "Checkboxes", "CheckboxTab": "Checkboxes",
"GamePage": "Game", "GamePage": "Game",
"Info": "Info",
"MenuPage": "Menu", "MenuPage": "Menu",
"MenusTab": "Menus", "MenusTab": "Menus",
"PedPage": "Ped", "PedPage": "Ped",
"PlayerPage": "Player", "PlayerPage": "Player",
"Search": "Search", "Search": "Search",
"SpawnTab": "Spawn",
"TeleportPage": "Teleport", "TeleportPage": "Teleport",
"VehiclePage": "Vehicle", "VehiclePage": "Vehicle",
"VisualPage": "Visual", "VisualPage": "Visual",

View File

@ -174,6 +174,25 @@ void CheatMenu::ProcessPages()
} }
} }
void CheatMenu::GenHeaderList()
{
CheatMenu::m_headerList =
{
{TEXT_S("Window.TeleportPage"), &Teleport::ShowPage, eMenuPages::TELEPORT},
{TEXT_S("Window.PlayerPage"), &Player::ShowPage, eMenuPages::PLAYER},
{TEXT_S("Window.PedPage"), &Ped::ShowPage, eMenuPages::PED},
{TEXT_S("Window.AnimationPage"), &Animation::ShowPage, eMenuPages::ANIMATION},
{TEXT_S("Window.VehiclePage"), &Vehicle::ShowPage, eMenuPages::VEHICLE},
{TEXT_S("Window.WeaponPage"), &Weapon::ShowPage, eMenuPages::WEAPON},
{TEXT_S("Window.GamePage"), &Game::ShowPage, eMenuPages::GAME},
{TEXT_S("Window.VisualPage"), &Visual::ShowPage, eMenuPages::VISUAL},
{TEXT_S("Window.MenuPage"), &Menu::ShowPage, eMenuPages::MENU},
{"Welcome", &ShowWelcomePage, eMenuPages::WELCOME, true},
{"Update", &ShowUpdatePage, eMenuPages::UPDATE, true},
{"Anniversary", &ShowAnniversaryPage, eMenuPages::ANNIVERSARY, true}
};
}
void CheatMenu::Init() void CheatMenu::Init()
{ {
if (!D3dHook::InjectHook(DrawWindow)) if (!D3dHook::InjectHook(DrawWindow))
@ -191,21 +210,7 @@ void CheatMenu::Init()
Locale::Init("CheatMenu/locale/"); Locale::Init("CheatMenu/locale/");
CheatMenu::m_headerList = CheatMenu::GenHeaderList();
{
{TEXT_S("Window.TeleportPage"), &Teleport::ShowPage, eMenuPages::TELEPORT},
{TEXT_S("Window.PlayerPage"), &Player::ShowPage, eMenuPages::PLAYER},
{TEXT_S("Window.PedPage"), &Ped::ShowPage, eMenuPages::PED},
{TEXT_S("Window.AnimationPage"), &Animation::ShowPage, eMenuPages::ANIMATION},
{TEXT_S("Window.VehiclePage"), &Vehicle::ShowPage, eMenuPages::VEHICLE},
{TEXT_S("Window.WeaponPage"), &Weapon::ShowPage, eMenuPages::WEAPON},
{TEXT_S("Window.GamePage"), &Game::ShowPage, eMenuPages::GAME},
{TEXT_S("Window.VisualPage"), &Visual::ShowPage, eMenuPages::VISUAL},
{TEXT_S("Window.MenuPage"), &Menu::ShowPage, eMenuPages::MENU},
{"Welcome", &ShowWelcomePage, eMenuPages::WELCOME, true},
{"Update", &ShowUpdatePage, eMenuPages::UPDATE, true},
{"Anniversary", &ShowAnniversaryPage, eMenuPages::ANNIVERSARY, true}
};
// Init menu parts // Init menu parts
Animation::Init(); Animation::Init();

View File

@ -45,4 +45,5 @@ public:
static void Init(); static void Init();
static void ResetMenuSize(); static void ResetMenuSize();
static void GenHeaderList();
}; };

View File

@ -374,7 +374,11 @@ void Menu::ShowPage()
{ {
if (Ui::ListBox(TEXT("Menu.Language"), vec, selected)) if (Ui::ListBox(TEXT("Menu.Language"), vec, selected))
{ {
if (Locale::SetLocale(selected) != Locale::eReturnCodes::SUCCESS) if (Locale::SetLocale(selected) == Locale::eReturnCodes::SUCCESS)
{
CheatMenu::GenHeaderList();
}
else
{ {
SetHelpMessage(TEXT("Menu.LanguageChangeFailed")); SetHelpMessage(TEXT("Menu.LanguageChangeFailed"));
} }

View File

@ -2,5 +2,5 @@
#define MENU_NAME "Cheat Menu" #define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "3.2" #define MENU_VERSION_NUMBER "3.2"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta" #define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20220218" #define BUILD_NUMBER "20220221"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION #define MENU_TITLE MENU_NAME " v" MENU_VERSION

View File

@ -231,7 +231,7 @@ void Weapon::ShowPage()
uint hplayer = CPools::GetPedRef(pPlayer); uint hplayer = CPools::GetPedRef(pPlayer);
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::Button("Drop weapon", Ui::GetSize(3))) if (ImGui::Button(TEXT("Weapon.DropWeapon"), Ui::GetSize(3)))
{ {
float x, y, z; float x, y, z;
Command<Commands::GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS>(hplayer, 0.0, 3.0, 0.0, &x, &y, &z); Command<Commands::GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS>(hplayer, 0.0, 3.0, 0.0, &x, &y, &z);
@ -260,13 +260,13 @@ void Weapon::ShowPage()
} }
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Remove all", Ui::GetSize(3))) if (ImGui::Button(TEXT("Weapon.DropAll"), Ui::GetSize(3)))
{ {
pPlayer->ClearWeapons(); pPlayer->ClearWeapons();
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Remove current", Ui::GetSize(3))) if (ImGui::Button(TEXT("Weapon.DropCurrent"), Ui::GetSize(3)))
{ {
#ifdef GTASA #ifdef GTASA
Command<Commands::REMOVE_WEAPON_FROM_CHAR>(hplayer, pPlayer->m_aWeapons[pPlayer->m_nActiveWeaponSlot].m_nType); Command<Commands::REMOVE_WEAPON_FROM_CHAR>(hplayer, pPlayer->m_aWeapons[pPlayer->m_nActiveWeaponSlot].m_nType);
@ -280,19 +280,18 @@ void Weapon::ShowPage()
if (ImGui::BeginTabBar("Ped", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll)) if (ImGui::BeginTabBar("Ped", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
{ {
if (ImGui::BeginTabItem("Checkboxes")) if (ImGui::BeginTabItem(TEXT("Window.CheckboxTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
ImGui::BeginChild("CheckboxesChild"); ImGui::BeginChild("CheckboxesChild");
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();
ImGui::Text("Info"); ImGui::Text(TEXT("Window.Info"));
Ui::ShowTooltip("Weapon tweaks apply globally\nto every ped weapon type"); Ui::ShowTooltip(TEXT("Weapon.WeaponTweaksText"));
ImGui::Columns(2, 0, false); ImGui::Columns(2, 0, false);
#ifdef GTASA #ifdef GTASA
Ui::CheckboxWithHint("Fast aim", &m_bAutoAim, "Enables aim assist on keyboard\n\nQ = left E = right\n\nPress Q and E to switch targets.\nMoving mouse removes the target!"); Ui::CheckboxWithHint(TEXT("Weapon.FastAim"), &m_bAutoAim, TEXT("Weapon.FastAimText"));
if (Ui::CheckboxWithHint("Dual wield", &m_bDualWeild, if (Ui::CheckboxWithHint(TEXT("Weapon.DualWeild"), &m_bDualWeild,TEXT("Weapon.DualWeildText")))
"Dual wield pistol, shawoff, uzi, tec9\n(Other weapons don't work)"))
{ {
if (!m_bDualWeild) if (!m_bDualWeild)
{ {
@ -300,26 +299,26 @@ void Weapon::ShowPage()
} }
} }
#endif #endif
if (Ui::CheckboxWithHint("Huge damage", &m_bHugeDamage, "Also enable 'Long range' if weapon range is short")) if (Ui::CheckboxWithHint(TEXT("Weapon.HugeDamage"), &m_bHugeDamage, TEXT("Weapon.HugeDamageText")))
{ {
if (!m_bHugeDamage) if (!m_bHugeDamage)
{ {
CWeaponInfo::LoadWeaponData(); CWeaponInfo::LoadWeaponData();
} }
} }
if (Ui::CheckboxWithHint("Fast reload", &m_bFastReload)) if (Ui::CheckboxWithHint(TEXT("Weapon.FastReload"), &m_bFastReload))
{ {
Command<Commands::SET_PLAYER_FAST_RELOAD>(hplayer, m_bFastReload); Command<Commands::SET_PLAYER_FAST_RELOAD>(hplayer, m_bFastReload);
} }
#ifdef GTASA #ifdef GTASA
Ui::CheckboxAddress("Infinite ammo", 0x969178); Ui::CheckboxAddress(TEXT("Weapon.InfiniteAmmo"), 0x969178);
ImGui::NextColumn(); ImGui::NextColumn();
#else #else
ImGui::NextColumn(); ImGui::NextColumn();
Ui::CheckboxWithHint("Infinite ammo", &m_bInfiniteAmmo); Ui::CheckboxWithHint(TEXT("Weapon.InfiniteAmmo"), &m_bInfiniteAmmo);
#endif #endif
if (Ui::CheckboxWithHint("Long range", &m_bLongRange)) if (Ui::CheckboxWithHint(TEXT("Weapon.LongRange"), &m_bLongRange))
{ {
if (!m_bLongRange) if (!m_bLongRange)
{ {
@ -327,21 +326,21 @@ void Weapon::ShowPage()
} }
} }
#ifdef GTASA #ifdef GTASA
if (Ui::CheckboxWithHint("Move when aiming", &m_bMoveAim)) if (Ui::CheckboxWithHint(TEXT("Weapon.MoveWhenAiming"), &m_bMoveAim))
{ {
if (!m_bMoveAim) if (!m_bMoveAim)
{ {
CWeaponInfo::LoadWeaponData(); CWeaponInfo::LoadWeaponData();
} }
} }
if (Ui::CheckboxWithHint("Move when firing", &m_bMoveFire)) if (Ui::CheckboxWithHint(TEXT("Weapon.MoveWhenFiring"), &m_bMoveFire))
{ {
if (!m_bMoveFire) if (!m_bMoveFire)
{ {
CWeaponInfo::LoadWeaponData(); CWeaponInfo::LoadWeaponData();
} }
} }
if (Ui::CheckboxWithHint("Rapid fire", &m_bRapidFire)) if (Ui::CheckboxWithHint(TEXT("Weapon.RapidFire"), &m_bRapidFire))
{ {
if (!m_bRapidFire) if (!m_bRapidFire)
{ {
@ -353,10 +352,10 @@ void Weapon::ShowPage()
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Spawn")) if (ImGui::BeginTabItem(TEXT("Window.SpawnTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::InputInt("Ammo", &m_nAmmoCount)) if (ImGui::InputInt(TEXT("Weapon.Ammo"), &m_nAmmoCount))
{ {
m_nAmmoCount = (m_nAmmoCount < 0) ? 0 : m_nAmmoCount; m_nAmmoCount = (m_nAmmoCount < 0) ? 0 : m_nAmmoCount;
m_nAmmoCount = (m_nAmmoCount > 99999) ? 99999 : m_nAmmoCount; m_nAmmoCount = (m_nAmmoCount > 99999) ? 99999 : m_nAmmoCount;
@ -378,21 +377,21 @@ void Weapon::ShowPage()
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
#ifdef GTASA #ifdef GTASA
if (ImGui::BeginTabItem("Gang weapon editor")) if (ImGui::BeginTabItem(TEXT("Weapon.GangWeaponEditor")))
{ {
ImGui::Spacing(); ImGui::Spacing();
Ui::ListBox("Select gang", m_GangList, m_nSelectedGang); Ui::ListBox(TEXT("Weapon.SelectGang"), m_GangList, m_nSelectedGang);
ImGui::Columns(3, 0, false); ImGui::Columns(3, 0, false);
ImGui::RadioButton("Weap 1", &m_nSelectedWeapon, 0); ImGui::RadioButton(TEXT("Weapon.Weapon1"), &m_nSelectedWeapon, 0);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::RadioButton("Weap 2", &m_nSelectedWeapon, 1); ImGui::RadioButton(TEXT("Weapon.Weapon2"), &m_nSelectedWeapon, 1);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::RadioButton("Weap 3", &m_nSelectedWeapon, 2); ImGui::RadioButton(TEXT("Weapon.Weapon3"), &m_nSelectedWeapon, 2);
ImGui::Columns(1); ImGui::Columns(1);
ImGui::Spacing(); ImGui::Spacing();
ImGui::Text("Current weapon: %s", ImGui::Text(TEXT("Weapon.CurrentWeapon"),
m_WeaponData.m_pJson->m_Data[std::to_string(m_nGangWeaponList[m_nSelectedGang][m_nSelectedWeapon])].get< m_WeaponData.m_pJson->m_Data[std::to_string(m_nGangWeaponList[m_nSelectedGang][m_nSelectedWeapon])].get<
std::string>().c_str()); std::string>().c_str());
ImGui::Spacing(); ImGui::Spacing();