diff --git a/src/backend/commands/player/kick/end_session_kick.cpp b/src/backend/commands/player/kick/end_session_kick.cpp index 11dcffbf..723a43f4 100644 --- a/src/backend/commands/player/kick/end_session_kick.cpp +++ b/src/backend/commands/player/kick/end_session_kick.cpp @@ -21,7 +21,7 @@ namespace big return; if (!scripts::force_host(RAGE_JOAAT("freemode"))) { - g_notification_service->push_error("Kick", "Force script host failed!"); + g_notification_service->push_error("END_KICK"_T.data(), "BACKEND_END_SESSION_KICK_FORCE_SCRIPT_HOST_FAILED"_T.data()); return; } diff --git a/src/backend/commands/player/kick/host_kick.cpp b/src/backend/commands/player/kick/host_kick.cpp index 23809047..9330ef4d 100644 --- a/src/backend/commands/player/kick/host_kick.cpp +++ b/src/backend/commands/player/kick/host_kick.cpp @@ -18,7 +18,7 @@ namespace big return; if (!g_player_service->get_self()->is_host()) { - g_notification_service->push_error("Host kick", "Host kick failed"); + g_notification_service->push_error("HOST_KICK"_T.data(), "BACKEND_HOST_KICK_FAILED"_T.data()); return; } diff --git a/src/backend/commands/player/misc/enter_interior.cpp b/src/backend/commands/player/misc/enter_interior.cpp index db32b1fe..8c1dd400 100644 --- a/src/backend/commands/player/misc/enter_interior.cpp +++ b/src/backend/commands/player/misc/enter_interior.cpp @@ -43,7 +43,7 @@ namespace big } else { - ctx->report_error("Player does not appear to be in an interior"); + ctx->report_error("BACKEND_ENTER_INTERIOR_NOT_IN_INTERIOR"_T.data()); } } }; diff --git a/src/backend/commands/player/toxic/set_wanted_level.cpp b/src/backend/commands/player/toxic/set_wanted_level.cpp index 9fce34d6..97bf81e4 100644 --- a/src/backend/commands/player/toxic/set_wanted_level.cpp +++ b/src/backend/commands/player/toxic/set_wanted_level.cpp @@ -19,7 +19,7 @@ namespace big if (level < 0 || level > 5) { - ctx->report_error(std::format("Wanted level {} is invalid [0 - 5]", level)); + ctx->report_error(std::format("{}: '{}' {} [0 - 5]", "WANTED_LEVEL"_T, level, "VIEW_MODEL_SWAPPER_INVALID_INDEX"_T)); return std::nullopt; } diff --git a/src/backend/commands/player/toxic/start_script.cpp b/src/backend/commands/player/toxic/start_script.cpp index 4dabbea1..821ea1bd 100644 --- a/src/backend/commands/player/toxic/start_script.cpp +++ b/src/backend/commands/player/toxic/start_script.cpp @@ -44,13 +44,13 @@ namespace big } }; - start_script<20> g_start_tutorial("tutorial", "Start Tutorial", "Plays that unskippable cutscene used in the tutorial", 0); - start_script<200> g_start_golf("golf", "Start Golf", "Starts golf", 0); - start_script<203> g_start_flight_school("flightschool", "Start Flight School", "Teleports player to the airport and starts flight school", 0); - start_script<9> g_start_darts("darts", "Start Darts", "Starts darts in a Sandy Shores bar", 0); - start_script<218> g_start_badlands("badlands", "Start Badlands Revenge II", "Starts the arcade game Badlands Revenge II in fullscreen", 0); - start_script<223> g_start_space_monkey("spacemonkey", "Start Space Monkey 3", "Starts the arcade game Space Monkey 3 in fullscreen", 0); - start_script<219> g_start_wizards_ruin("wizard", "Start The Wizard's Ruin", "Starts the arcade game The Wizard's Ruin in fullscreen", 0); - start_script<224> g_start_qub3d("qub3d", "Start Qub3D", "Starts the arcade game Qub3D in fullscreen", 0); - start_script<225> g_start_camhedz("camhedz", "Start Camhedz", "Starts the arcade game Camhedz in fullscreen", 0); + start_script<20> g_start_tutorial("tutorial", "BACKEND_START_SCRIPT_START_TUTORIAL", "BACKEND_START_SCRIPT_START_TUTORIAL_DESC", 0); + start_script<200> g_start_golf("golf", "BACKEND_START_SCRIPT_START_GOLF", "BACKEND_START_SCRIPT_START_GOLF_DESC", 0); + start_script<203> g_start_flight_school("flightschool", "BACKEND_START_SCRIPT_START_FLIGHT_SCHOOL", "BACKEND_START_SCRIPT_START_FLIGHT_SCHOOL_DESC", 0); + start_script<9> g_start_darts("darts", "BACKEND_START_SCRIPT_START_DARTS", "BACKEND_START_SCRIPT_START_DARTS_DESC", 0); + start_script<218> g_start_badlands("badlands", "BACKEND_START_SCRIPT_START_BADLANDS_REVENGE_II", "BACKEND_START_SCRIPT_START_BADLANDS_REVENGE_II_DESC", 0); + start_script<223> g_start_space_monkey("spacemonkey", "BACKEND_START_SCRIPT_START_SPACE_MONKEY", "BACKEND_START_SCRIPT_START_SPACE_MONKEY_DESC", 0); + start_script<219> g_start_wizards_ruin("wizard", "BACKEND_START_SCRIPT_START_WIZARD", "BACKEND_START_SCRIPT_START_WIZARD_DESC", 0); + start_script<224> g_start_qub3d("qub3d", "BACKEND_START_SCRIPT_START_QUB3D", "BACKEND_START_SCRIPT_START_QUB3D_DESC", 0); + start_script<225> g_start_camhedz("camhedz", "BACKEND_START_SCRIPT_START_CAMHEDZ", "BACKEND_START_SCRIPT_START_CAMHEDZ_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/toxic/turn_into_beast.cpp b/src/backend/commands/player/toxic/turn_into_beast.cpp index cbffd02a..155c8e9e 100644 --- a/src/backend/commands/player/toxic/turn_into_beast.cpp +++ b/src/backend/commands/player/toxic/turn_into_beast.cpp @@ -23,11 +23,11 @@ namespace big { if (!NETWORK::NETWORK_IS_PLAYER_A_PARTICIPANT_ON_SCRIPT(id, "am_launcher", -1)) { - g_notification_service->push_error("Turn to Beast", "Cannot start the Hunt the Beast event, player not a participant of am_launcher"); + g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_CANNOT_START_AM_LAUNCHER"_T.data()); return; } - g_notification_service->push("Turn to Beast", "Starting Hunt The Beast event. Please wait..."); + g_notification_service->push("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_STARTING"_T.data()); scripts::start_launcher_script(47); @@ -35,7 +35,7 @@ namespace big { if (i >= 1000) { - g_notification_service->push_error("Turn to Beast", "Failed to start the Hunt The Beast event"); + g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED"_T.data()); return; } @@ -48,7 +48,7 @@ namespace big if (!scripts::force_host(RAGE_JOAAT("am_hunt_the_beast"))) { - g_notification_service->push_error("Turn to Beast", "Failed to take control of am_hunt_the_beast"); + g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED_CONTROL"_T.data()); return; } @@ -89,7 +89,7 @@ namespace big { if (i >= 7000) { - g_notification_service->push_error("Turn to Beast", "Failed to start the Hunt The Beast event"); + g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED"_T.data()); return; } @@ -100,7 +100,7 @@ namespace big if (!scripts::force_host(RAGE_JOAAT("am_hunt_the_beast"))) { - g_notification_service->push_error("Turn to Beast", "Failed to take control of am_hunt_the_beast"); + g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED_CONTROL"_T.data()); return; } diff --git a/src/backend/commands/player/vehicle/boost_vehicle.cpp b/src/backend/commands/player/vehicle/boost_vehicle.cpp index 53b88e3b..9a6b0f43 100644 --- a/src/backend/commands/player/vehicle/boost_vehicle.cpp +++ b/src/backend/commands/player/vehicle/boost_vehicle.cpp @@ -22,7 +22,7 @@ namespace big if (entity::take_control_of(vehicle)) { - VEHICLE::SET_VEHICLE_FORWARD_SPEED(vehicle, 79); + VEHICLE::SET_VEHICLE_FORWARD_SPEED(vehicle, VEHICLE::GET_VEHICLE_ESTIMATED_MAX_SPEED(vehicle)); } else { @@ -32,5 +32,5 @@ namespace big } }; - boost_vehicle g_boost_vehicle("boostveh", "Boost Vehicle", "Boosts their car very fast.", 0); + boost_vehicle g_boost_vehicle("boostveh", "BACKEND_BOOST_VEHICLE", "BACKEND_BOOST_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/break_doors.cpp b/src/backend/commands/player/vehicle/break_doors.cpp index b683ec48..fc60c821 100644 --- a/src/backend/commands/player/vehicle/break_doors.cpp +++ b/src/backend/commands/player/vehicle/break_doors.cpp @@ -42,5 +42,5 @@ namespace big } }; - break_doors g_break_doors("breakdoors", "Break Vehicle Doors", "Breaks all vehicle doors", 0); + break_doors g_break_doors("breakdoors", "BACKEND_BREAK_VEHICLE_DOORS", "BACKEND_BREAK_VEHICLE_DOORS_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/burst_tyres.cpp b/src/backend/commands/player/vehicle/burst_tyres.cpp index 51bd318f..338f6866 100644 --- a/src/backend/commands/player/vehicle/burst_tyres.cpp +++ b/src/backend/commands/player/vehicle/burst_tyres.cpp @@ -33,5 +33,5 @@ namespace big } }; - burst_tyres g_burst_tyres("burstwheels", "Burst Vehicle Tyres", "Removes their tyres", 0); + burst_tyres g_burst_tyres("burstwheels", "BACKEND_BURST_VEHICLE_TIRES", "BACKEND_BURST_VEHICLE_TIRES_DESC", 0); } diff --git a/src/backend/commands/player/vehicle/close_doors.cpp b/src/backend/commands/player/vehicle/close_doors.cpp index afb1af52..0cdb2330 100644 --- a/src/backend/commands/player/vehicle/close_doors.cpp +++ b/src/backend/commands/player/vehicle/close_doors.cpp @@ -26,11 +26,11 @@ namespace big } else { - g_notification_service->push_warning("Toxic", "Failed to take control of vehicle."); + g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; - close_doors g_close_doors("closedoors", "Close Vehicle Doors", "Closes all vehicle doors", 0); + close_doors g_close_doors("closedoors", "BACKEND_CLOSE_VEHICLE_DOORS", "BACKEND_CLOSE_VEHICLE_DOORS_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/downgrade_vehicle.cpp b/src/backend/commands/player/vehicle/downgrade_vehicle.cpp index a9bcfe00..d3428636 100644 --- a/src/backend/commands/player/vehicle/downgrade_vehicle.cpp +++ b/src/backend/commands/player/vehicle/downgrade_vehicle.cpp @@ -33,5 +33,5 @@ namespace big } }; - downgrade_vehicle g_downgrade_vehicle("downgradeveh", "Downgrade Vehicle", "Removes all upgrades", 0); + downgrade_vehicle g_downgrade_vehicle("downgradeveh", "BACKEND_DOWNGRADE_VEHICLE", "BACKEND_DOWNGRADE_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/flip_180.cpp b/src/backend/commands/player/vehicle/flip_180.cpp index b300fc32..e7cb7153 100644 --- a/src/backend/commands/player/vehicle/flip_180.cpp +++ b/src/backend/commands/player/vehicle/flip_180.cpp @@ -40,7 +40,5 @@ namespace big } }; - flip_180 - g_flip_180("flip180", "Rotate 180", "Rotates the player's car around", 0) - ; + flip_180 g_flip_180("flip180", "BACKEND_FLIP", "BACKEND_FLIP_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/flying_vehicle.cpp b/src/backend/commands/player/vehicle/flying_vehicle.cpp index 58cf33aa..ccb27b49 100644 --- a/src/backend/commands/player/vehicle/flying_vehicle.cpp +++ b/src/backend/commands/player/vehicle/flying_vehicle.cpp @@ -29,5 +29,5 @@ namespace big } }; - flying_vehicle g_flying_vehicle("flyingveh", "Flying Vehicle", "Catapults the player's car to the sky", 0); + flying_vehicle g_flying_vehicle("flyingveh", "BACKEND_FLYING_VEHICLE", "BACKEND_FLYING_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/kill_engine.cpp b/src/backend/commands/player/vehicle/kill_engine.cpp index 5b8148b6..83ef224c 100644 --- a/src/backend/commands/player/vehicle/kill_engine.cpp +++ b/src/backend/commands/player/vehicle/kill_engine.cpp @@ -25,11 +25,11 @@ namespace big } else { - g_notification_service->push_warning("Toxic", "Failed to take control of player vehicle."); + g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; - kill_engine g_kill_engine("killengine", "Kill Vehicle Engine", "Breaks their engine", 0); + kill_engine g_kill_engine("killengine", "BACKEND_KILL_VEHICLE_ENGINE", "BACKEND_KILL_VEHICLE_ENGINE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/lock_doors.cpp b/src/backend/commands/player/vehicle/lock_doors.cpp index f6b84f2c..1e25dd89 100644 --- a/src/backend/commands/player/vehicle/lock_doors.cpp +++ b/src/backend/commands/player/vehicle/lock_doors.cpp @@ -31,5 +31,5 @@ namespace big } }; - lock_vehicle g_lock_vehicle("lockveh", "Lock Vehicle", "Locks vehicle doors", 0); + lock_vehicle g_lock_vehicle("lockveh", "BACKEND_LOCK_VEHICLE", "BACKEND_LOCK_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/open_doors.cpp b/src/backend/commands/player/vehicle/open_doors.cpp index 4602890b..35525605 100644 --- a/src/backend/commands/player/vehicle/open_doors.cpp +++ b/src/backend/commands/player/vehicle/open_doors.cpp @@ -29,11 +29,11 @@ namespace big } else { - g_notification_service->push_warning("Toxic", "Failed to take control of vehicle"); + g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; - open_doors g_open_doors("opendoors", "Opens Vehicle Doors", "Opens all vehicle doors", 0); + open_doors g_open_doors("opendoors", "BACKEND_OPEN_VEHICLE_DOORS", "BACKEND_OPEN_VEHICLE_DOORS_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/remote_control_vehicle.cpp b/src/backend/commands/player/vehicle/remote_control_vehicle.cpp index d362f55c..9e1f95a9 100644 --- a/src/backend/commands/player/vehicle/remote_control_vehicle.cpp +++ b/src/backend/commands/player/vehicle/remote_control_vehicle.cpp @@ -15,9 +15,9 @@ namespace big if (veh == 0) { if (g.player.spectating) - g_notification_service->push_warning("Remote Control", "Player not in a vehicle"); + g_notification_service->push_warning("REMOTE_CONTROL"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); else - g_notification_service->push_warning("Remote Control", "Player not in a vehicle, try spectating the player"); + g_notification_service->push_warning("REMOTE_CONTROL"_T.data(), std::format("{} {}", "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T, "BACKEND_REMOTE_CONTROL_VEHICLE_SPECTATE"_T).c_str()); return; } @@ -26,5 +26,5 @@ namespace big } }; - remote_control_vehicle g_remote_control_vehicle("rcplayer", "Remote Control Vehicle", "Take control of the player's vehicle. Spectate the player beforehand for best results", 0, false); + remote_control_vehicle g_remote_control_vehicle("rcplayer", "BACKEND_REMOTE_CONTROL_VEHICLE", "BACKEND_REMOTE_CONTROL_VEHICLE_DESC", 0, false); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/smash_windows.cpp b/src/backend/commands/player/vehicle/smash_windows.cpp index 33aaf171..4ab9dbb4 100644 --- a/src/backend/commands/player/vehicle/smash_windows.cpp +++ b/src/backend/commands/player/vehicle/smash_windows.cpp @@ -29,5 +29,5 @@ namespace big } }; - smash_windows g_smash_windows("smashwindows", "Smash Vehicle Windows", "Smashes all their windows", 0); + smash_windows g_smash_windows("smashwindows", "BACKEND_SMASH_VEHICLE_WINDOWS", "BACKEND_SMASH_VEHICLE_WINDOWS_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/special_ability.cpp b/src/backend/commands/player/vehicle/special_ability.cpp index 4b5f078c..cd824feb 100644 --- a/src/backend/commands/player/vehicle/special_ability.cpp +++ b/src/backend/commands/player/vehicle/special_ability.cpp @@ -24,8 +24,8 @@ namespace big } }; - vehicle_special_ability<0> g_special_jump_vehicle("svehjump", "Special: Jump", "Activates the vehicle jump on the player's vehicle. This may cause undefined behavior if the vehicle cannot jump", 0); - vehicle_special_ability<1> g_special_boost_vehicle("svehboost", "Special: Boost", "Activates the boost on the player's vehicle. This may cause undefined behavior if the vehicle cannot boost", 0); - vehicle_special_ability<3> g_special_shunt_left("sshuntleft", "Special: Shunt Left", "Shunts the player's vehicle to the left", 0); - vehicle_special_ability<2> g_special_shunt_right("sshuntright", "Special: Shunt Right", "Shunts the player's vehicle to the right", 0); + vehicle_special_ability<0> g_special_jump_vehicle("svehjump", "BACKEND_SPECIAL_ABILITY_JUMP", "BACKEND_SPECIAL_ABILITY_JUMP_DESC", 0); + vehicle_special_ability<1> g_special_boost_vehicle("svehboost", "BACKEND_SPECIAL_ABILITY_BOOST", "BACKEND_SPECIAL_ABILITY_BOOST_DESC", 0); + vehicle_special_ability<3> g_special_shunt_left("sshuntleft", "BACKEND_SPECIAL_ABILITY_LEFT", "BACKEND_SPECIAL_ABILITY_LEFT_DESC", 0); + vehicle_special_ability<2> g_special_shunt_right("sshuntright", "BACKEND_SPECIAL_ABILITY_RIGHT", "BACKEND_SPECIAL_ABILITY_RIGHT_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/stop_vehicle.cpp b/src/backend/commands/player/vehicle/stop_vehicle.cpp index 225097c2..dd6bccc0 100644 --- a/src/backend/commands/player/vehicle/stop_vehicle.cpp +++ b/src/backend/commands/player/vehicle/stop_vehicle.cpp @@ -25,11 +25,11 @@ namespace big } else { - g_notification_service->push_warning("Toxic", "Failed to take control of player vehicle."); + g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; - stop_vehicle g_stop_vehicle("stopveh", "Stop Vehicle", "Stops the player's vehicle", 0); + stop_vehicle g_stop_vehicle("stopveh", "BACKEND_STOP_VEHICLE", "BACKEND_STOP_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/unlock_doors.cpp b/src/backend/commands/player/vehicle/unlock_doors.cpp index 33ddee73..1f1d965e 100644 --- a/src/backend/commands/player/vehicle/unlock_doors.cpp +++ b/src/backend/commands/player/vehicle/unlock_doors.cpp @@ -18,5 +18,5 @@ namespace big } }; - unlock_vehicle g_unlock_vehicle("unlockveh", "Unlock Vehicle Doors", "Unlocks all vehicle doors", 0); + unlock_vehicle g_unlock_vehicle("unlockveh", "BACKEND_UNLOCK_DOORS", "BACKEND_UNLOCK_DOORS_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/upgrade_vehicle.cpp b/src/backend/commands/player/vehicle/upgrade_vehicle.cpp index eb597f75..1cb7accb 100644 --- a/src/backend/commands/player/vehicle/upgrade_vehicle.cpp +++ b/src/backend/commands/player/vehicle/upgrade_vehicle.cpp @@ -26,5 +26,5 @@ namespace big } }; - upgrade_vehicle g_upgrade_vehicle("upgradeveh", "Upgrade Vehicle", "Upgrades players vehicle", 0); + upgrade_vehicle g_upgrade_vehicle("upgradeveh", "MAX_VEHICLE", "BACKEND_UPGRADE_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/player/vehicle/window_tint.cpp b/src/backend/commands/player/vehicle/window_tint.cpp index d1b25626..8e22c92d 100644 --- a/src/backend/commands/player/vehicle/window_tint.cpp +++ b/src/backend/commands/player/vehicle/window_tint.cpp @@ -24,5 +24,5 @@ namespace big } }; - black_tint g_black_tint("blacktint", "Black Window Tint", "Makes the player's vehicle windows black", 0); + black_tint g_black_tint("blacktint", "WINDOW_TINT", "BACKEND_WINDOW_TINT_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/session/join_session.cpp b/src/backend/commands/session/join_session.cpp index b75a0e29..4cc4221b 100644 --- a/src/backend/commands/session/join_session.cpp +++ b/src/backend/commands/session/join_session.cpp @@ -85,5 +85,5 @@ namespace big session::join_type(args.shift()); } }; - switch_session g_switch_session("joinsession", "Join Session", "Join a specific session type.", 1); + switch_session g_switch_session("joinsession", "JOIN_SESSION", "BACKEND_SESSION_JOIN_SESSION_DESC", 1); } \ No newline at end of file diff --git a/src/backend/commands/session/wipe_session.cpp b/src/backend/commands/session/wipe_session.cpp index 2f5a8f3c..be66f76f 100644 --- a/src/backend/commands/session/wipe_session.cpp +++ b/src/backend/commands/session/wipe_session.cpp @@ -15,8 +15,8 @@ namespace big { player_mgr->RemovePlayer(plyr->get_net_game_player()); } - g_notification_service->push("Empty Session", "Completed"); + g_notification_service->push("EMPTY_SESSION"_T.data(), "BACKEND_WIPE_SESSION_COMPLETE"_T.data()); } }; - empty_session g_empty_session("emptysession", "EMPTY_SESSION", "Removes everyone from the session", 0); + empty_session g_empty_session("emptysession", "EMPTY_SESSION", "BACKEND_WIPE_SESSION_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/spawn/spawn_vehicle.cpp b/src/backend/commands/spawn/spawn_vehicle.cpp index 167869d9..03dd0584 100644 --- a/src/backend/commands/spawn/spawn_vehicle.cpp +++ b/src/backend/commands/spawn/spawn_vehicle.cpp @@ -28,7 +28,7 @@ namespace big const auto hash = args.get(0); if (!STREAMING::IS_MODEL_IN_CDIMAGE(hash) || !STREAMING::IS_MODEL_A_VEHICLE(hash)) { - ctx->report_error("Specified model is invalid"); + ctx->report_error("BACKEND_SPAWN_VEHICLE_INVALID_MODEL"_T.data()); return; } @@ -42,7 +42,7 @@ namespace big if (veh == 0) { - g_notification_service->push_error("Vehicle", "Unable to spawn vehicle"); + g_notification_service->push_error("GUI_TAB_SPAWN_VEHICLE"_T.data(), "UNABLE_TO_SPAWN_VEHICLE"_T.data()); } else { @@ -60,7 +60,7 @@ namespace big } }; - spawn_vehicle g_spawn_vehicle("spawn", "Spawn Vehicle", "Spawn a vehicle with the specified model", 1); + spawn_vehicle g_spawn_vehicle("spawn", "GUI_TAB_SPAWN_VEHICLE", "BACKEND_SPAWN_VEHICLE_DESC", 1); bool_command g_spawn_maxed("spawnmaxed", "SPAWN_MAXED", "SPAWN_MAXED_DESC", g.spawn_vehicle.spawn_maxed); bool_command g_spawn_inside("spawnin", "SPAWN_IN", "SPAWN_IN_DESC", diff --git a/src/backend/commands/system/fast_quit.cpp b/src/backend/commands/system/fast_quit.cpp index 9c60fc82..2768ebcb 100644 --- a/src/backend/commands/system/fast_quit.cpp +++ b/src/backend/commands/system/fast_quit.cpp @@ -12,5 +12,5 @@ namespace big } }; - fast_quit g_fast_quit("fastquit", "Rage Quit", "We all have bad times sometimes. Close your GTA instant.", 0); + fast_quit g_fast_quit("fastquit", "VIEW_HOTKEY_SETTINGS_RAGE_QUIT", "BACKEND_FAST_QUIT_DESC", 0); } diff --git a/src/backend/commands/system/window_hook.cpp b/src/backend/commands/system/window_hook.cpp index 664dbbcf..ead6f53c 100644 --- a/src/backend/commands/system/window_hook.cpp +++ b/src/backend/commands/system/window_hook.cpp @@ -25,6 +25,5 @@ namespace big } }; - window_hook g_window_hook("windowhook", "GTA Window Hook", "Only enable this if you know what you are doing, this will prevent AHK scripts from working.", - g.debug.window_hook); + window_hook g_window_hook("windowhook", "BACKEND_GTA_WINDOW_HOOK", "BACKEND_GTA_WINDOW_HOOK_DESC", g.debug.window_hook); } diff --git a/src/backend/commands/teleport/bring_personal_vehicle.cpp b/src/backend/commands/teleport/bring_personal_vehicle.cpp index 14101581..e6c11697 100644 --- a/src/backend/commands/teleport/bring_personal_vehicle.cpp +++ b/src/backend/commands/teleport/bring_personal_vehicle.cpp @@ -16,5 +16,5 @@ namespace big } }; - bring_personal_vehicle g_bring_personal_vehicle("bringpv", "Bring Personal Vehicle", "Teleports your PV near you", 0); + bring_personal_vehicle g_bring_personal_vehicle("bringpv", "BRING_PV", "BACKEND_BRING_PERSONAL_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/teleport/teleport_to_highlighted_blip.cpp b/src/backend/commands/teleport/teleport_to_highlighted_blip.cpp index 63be1eda..ab2fdebf 100644 --- a/src/backend/commands/teleport/teleport_to_highlighted_blip.cpp +++ b/src/backend/commands/teleport/teleport_to_highlighted_blip.cpp @@ -14,5 +14,5 @@ namespace big } }; - teleport_to_highlighted_blip g_teleport_to_highlighted_blip("highlighttp", "Teleport to Selected Blip", "Teleports you to whichever blip you have in your crosshairs on the map.", 0); + teleport_to_highlighted_blip g_teleport_to_highlighted_blip("highlighttp", "VIEW_HOTKEY_SETTINGS_TELEPORT_TO_SELECTED", "BACKEND_TELEPORT_TO_HIGHLIGHTED_BLIP_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/teleport/teleport_to_last_vehicle.cpp b/src/backend/commands/teleport/teleport_to_last_vehicle.cpp index d2bed250..4a05a8a1 100644 --- a/src/backend/commands/teleport/teleport_to_last_vehicle.cpp +++ b/src/backend/commands/teleport/teleport_to_last_vehicle.cpp @@ -18,5 +18,5 @@ namespace big } }; - teleport_to_last_vehicle g_teleport_to_last_vehicle("lastvehtp", "Teleport To Last Vehicle", "Teleports you into your last driven vehicle", 0); + teleport_to_last_vehicle g_teleport_to_last_vehicle("lastvehtp", "BACKEND_TELEPORT_TO_LAST_VEHICLE", "BACKEND_TELEPORT_TO_LAST_VEHICLE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/teleport/teleport_to_objective.cpp b/src/backend/commands/teleport/teleport_to_objective.cpp index 2206ee34..0facdf5f 100644 --- a/src/backend/commands/teleport/teleport_to_objective.cpp +++ b/src/backend/commands/teleport/teleport_to_objective.cpp @@ -14,5 +14,5 @@ namespace big } }; - teleport_to_objective g_teleport_to_objective("objectivetp", "Teleport To Objective", "Teleports you to your mission objective", 0); + teleport_to_objective g_teleport_to_objective("objectivetp", "VIEW_HOTKEY_SETTINGS_TELEPORT_TO_OBJECTIVE", "BACKEND_TELEPORT_TO_OBJECTIVE_DESC", 0); } \ No newline at end of file diff --git a/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp b/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp index 99ac0362..1f1af26e 100644 --- a/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp +++ b/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp @@ -16,5 +16,5 @@ namespace big } }; - teleport_to_personal_vehicle g_teleport_to_personal_vehicle("pvtp", "Teleport To Personal Vehicle", "Teleports you into your PV", 0); + teleport_to_personal_vehicle g_teleport_to_personal_vehicle("pvtp", "TP_IN_PV", "BACKEND_TELEPORT_TO_PERSONAL_VEHICLE", 0); } \ No newline at end of file diff --git a/src/backend/commands/teleport/teleport_to_waypoint.cpp b/src/backend/commands/teleport/teleport_to_waypoint.cpp index 29e5e344..e6d45b9b 100644 --- a/src/backend/commands/teleport/teleport_to_waypoint.cpp +++ b/src/backend/commands/teleport/teleport_to_waypoint.cpp @@ -14,5 +14,5 @@ namespace big } }; - teleport_to_waypoint g_teleport_to_waypoint("waypointtp", "Teleport To Waypoint", "Teleports you to your waypoint", 0); + teleport_to_waypoint g_teleport_to_waypoint("waypointtp", "VIEW_HOTKEY_SETTINGS_TELEPORT_TO_WAYPOINT", "BACKEND_TELEPORT_TO_WAYPOINT_DESC", 0); } \ No newline at end of file diff --git a/src/backend/context/default_command_context.cpp b/src/backend/context/default_command_context.cpp index a34e5072..146973b8 100644 --- a/src/backend/context/default_command_context.cpp +++ b/src/backend/context/default_command_context.cpp @@ -14,11 +14,11 @@ namespace big void default_command_context::report_output(const std::string& output) const { - g_notification_service->push("Command", output); + g_notification_service->push("BACKEND_COMMAND"_T.data(), output); } void default_command_context::report_error(const std::string& error) const { - g_notification_service->push_error("Command", error); + g_notification_service->push_error("BACKEND_COMMAND"_T.data(), error); } } \ No newline at end of file diff --git a/src/backend/looped/hud/hud_transition_state.cpp b/src/backend/looped/hud/hud_transition_state.cpp index 994d1d1d..67ce751f 100644 --- a/src/backend/looped/hud/hud_transition_state.cpp +++ b/src/backend/looped/hud/hud_transition_state.cpp @@ -11,7 +11,29 @@ namespace big { static float old_percent = NAN; - constexpr char transition_states[][48] = {"TRANSITION_STATE_EMPTY", "Singleplayer Swoop Up", "Multiplayer Swoop Up", "Creator Swoop Up", "Pre-HUD Checks", "Wait HUD Exit", "Wait For Summon", "Singleplayer Swoop Down", "Multiplayer Swoop Down", "Cancel Joining", "Retry Loading", "Retry Loading Slot 1", "Retry Loading Slot 2", "Retry Loading Slot 3", "Retry Loading Slot 4", "Wait On Invite", "Prejoining Freemode Session Checks", "Look For Fresh Join Freemode", "Look To Join Another Session Freemode", "Confirm Freemode Session Joining", "Wait Join Freemode Session", "Creation Enter Session", "Pre-Freemode Launch Script", "Freemode Teamfull Check", "Start Freemode Launch Script", "Freemode Transition Create Player", "Is Freemode And Transition Ready", "Freemode Swoop Down", "Post Bink Video Warp", "Freemode Final Setup Player", "Move Freemode To Running State", "Freemode How To Terminate", "Start Creator Pre-Launch Script Check", "Start Creator Launch Script", "Creator Transition Create Player", "Is Creator And Transition Ready", "Creator Swoop Down", "Creator Final Setup Player", "Move Creator To Running State", "Prejoining Testbed Session Checks", "Look For Fresh Join Testbed", "Look For Fresh Host Testbed", "Look To Join Another Session Testbed", "Look To Host Session Testbed", "Confirm Testbed Session Joining", "Wait Join Testbed Session", "Start Testbed Launch Script", "Testbed Transition Create Player", "Is Testbed And Transition Ready", "Testbed Swoop Down", "Testbed Final Setup Player", "Move Testbed To Running State", "Testbed How To Terminate", "Quit Current Session Prompt", "Wait For Transition Session To Setup", "Terminate Singleplayer", "Wait Terminate Singleplayer", "Kick Terminate Session", "Terminate Session", "Wait Terminate Session", "Terminate Session And Hold", "Terminate Session And Move Into Holding State", "Team Swapping Checks", "Return To Singleplayer", "Wait For Singleplayer To Start", "Waiting For External Termination Call", "Terminate Maintransition", "Wait For Dirty Load Confirm", "DLC Intro Bink", "Spawn Into Personal Vehicle"}; + const std::vector transition_states = + { "TRANSITION_STATE_EMPTY"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_SINGLEPLAYER_SWOOP_UP"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_MULTIPLAYER_SWOOP_UP"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_CREATOR_SWOOP_UP"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_PRE_HUD_CHECKS"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_HUD_EXIT"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_FOR_SUMMON"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_SINGLEPLAYER_SWOOP_DOWN"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_MULTIPLAYER_SWOOP_DOWN"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_CANCEL_JOINING"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_RETRY_LOADING"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_RETRY_LOADING_SLOT_1"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_RETRY_LOADING_SLOT_2"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_RETRY_LOADING_SLOT_3"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_RETRY_LOADING_SLOT_4"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_ON_INVITE"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_PREJOINING_FREEMODE_SESSION_CHECKS"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_LOOK_FOR_FRESH_JOIN_FREEMODE"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_LOOK_TO_JOIN_ANOTHER_SESSION_FREEMODE"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_CONFIRM_FREEMODE_SESSION_JOINING"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_JOIN_FREEMODE_SESSION"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_CREATION_ENTER_SESSION"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_PRE_FREEMODE_LAUNCH_SCRIPT"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_FREEMODE_TEAMFULL_CHECK"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_START_FREEMODE_LAUNCH_SCRIPT"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_FREEMODE_TRANSITION_CREATE_PLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_IS_FREEMODE_AND_TRANSITION_READY"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_FREEMODE_SWOOP_DOWN"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_POST_BINK_VIDEO_WARP"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_FREEMODE_FINAL_SETUP_PLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_MOVE_FREEMODE_TO_RUNNING_STATE"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_FREEMODE_HOW_TO_TERMINATE"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_START_CREATOR_PRE_LAUNCH_SCRIPT_CHECK"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_START_CREATOR_LAUNCH_SCRIPT"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_CREATOR_TRANSITION_CREATE_PLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_IS_CREATOR_AND_TRANSITION_READY"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_CREATOR_SWOOP_DOWN"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_CREATOR_FINAL_SETUP_PLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_MOVE_CREATOR_TO_RUNNING_STATE"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_PREJOINING_TESTBED_SESSION_CHECKS"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_LOOK_FOR_FRESH_JOIN_TESTBED"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_LOOK_FOR_FRESH_HOST_TESTBED"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_LOOK_TO_JOIN_ANOTHER_SESSION_TESTBED"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_LOOK_TO_HOST_SESSION_TESTBED"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_CONFIRM_TESTBED_SESSION_JOINING"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_JOIN_TESTBED_SESSION"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_START_TESTBED_LAUNCH_SCRIPT"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_TESTBED_TRANSITION_CREATE_PLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_IS_TESTBED_AND_TRANSITION_READY"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_TESTBED_SWOOP_DOWN"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_TESTBED_FINAL_SETUP_PLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_MOVE_TESTBED_TO_RUNNING_STATE"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_TESTBED_HOW_TO_TERMINATE"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_QUIT_CURRENT_SESSION_PROMPT"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_FOR_TRANSITION_SESSION_TO_SETUP"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_TERMINATE_SINGLEPLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_TERMINATE_SINGLEPLAYER"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_KICK_TERMINATE_SESSION"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_TERMINATE_SESSION"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_TERMINATE_SESSION"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_TERMINATE_SESSION_AND_HOLD"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_TERMINATE_SESSION_AND_MOVE_INTO_HOLDING_STATE"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_TEAM_SWAPPING_CHECKS"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_RETURN_TO_SINGLEPLAYER"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_FOR_SINGLEPLAYER_TO_START"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAITING_FOR_EXTERNAL_TERMINATION_CALL"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_TERMINATE_MAINTRANSITION"_T, + "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAIT_FOR_DIRTY_LOAD_CONFIRM"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_DLC_INTRO_BINK"_T, "BACKEND_LOOPED_HUD_TRANSITION_STATE_SPAWN_INTO_PERSONAL_VEHICLE"_T}; eTransitionState last_state = eTransitionState::TRANSITION_STATE_EMPTY; void looped::hud_transition_state() @@ -37,7 +59,7 @@ namespace big HUD::BUSYSPINNER_OFF(); } - if ((int)state > 0 && (int)state < std::size(transition_states)) + if ((int)state > 0 && (int)state < transition_states.size()) { rage::scrThread* freemode{}; if (state == eTransitionState::TRANSITION_STATE_FM_TRANSITION_CREATE_PLAYER @@ -59,8 +81,7 @@ namespace big if (percent != old_percent) { HUD::BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING"); - HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME( - std::format("Wait For Host Broadcast Data: {}%", (percent)).c_str()); + HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(std::format("{}: {}%", "BACKEND_LOOPED_HUD_TRANSITION_STATE_WAITING_FOR_HOST_BROADCAST_DATA"_T, percent).c_str()); HUD::END_TEXT_COMMAND_BUSYSPINNER_ON(5); } @@ -70,7 +91,7 @@ namespace big { old_percent = NAN; HUD::BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING"); - HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(transition_states[(int)state]); + HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(transition_states[(int)state].data()); HUD::END_TEXT_COMMAND_BUSYSPINNER_ON(5); } } diff --git a/src/backend/looped/self/off_radar.cpp b/src/backend/looped/self/off_radar.cpp index b456bf0f..11284bbb 100644 --- a/src/backend/looped/self/off_radar.cpp +++ b/src/backend/looped/self/off_radar.cpp @@ -27,6 +27,6 @@ namespace big } }; - off_radar g_off_radar("otr", "OFF_RADAR", "OFF_RADAR_DESC", g.self.off_radar); + off_radar g_off_radar("otr", "OFF_THE_RADAR", "OFF_RADAR_DESC", g.self.off_radar); bool_command ghost_org("ghostorg", "GHOST_ORG", "GHOST_ORG_DESC", g.self.ghost_org); } diff --git a/src/backend/looped/self/toggle_passive.cpp b/src/backend/looped/self/toggle_passive.cpp index c2532906..bd632d30 100644 --- a/src/backend/looped/self/toggle_passive.cpp +++ b/src/backend/looped/self/toggle_passive.cpp @@ -19,7 +19,7 @@ namespace big { on_disable(); g.self.passive = false; - g_notification_service->push_warning("Disabled passive mode", "Disabled passive mode because you started mission / joined CEO/MC"); + g_notification_service->push_warning("PASSIVE"_T.data(), "BACKEND_LOOPED_SELF_TOGGLE_PASSIVE_DISABLED_PASSIVE_MODE_MESSAGE"_T.data()); return; } *g_tunables_service->get_tunable(-29732167) = 0; // End Passive Time = 0s diff --git a/src/backend/looped/system/auto_tp_to_waypoint.cpp b/src/backend/looped/system/auto_tp_to_waypoint.cpp index 80b8f421..ff877206 100644 --- a/src/backend/looped/system/auto_tp_to_waypoint.cpp +++ b/src/backend/looped/system/auto_tp_to_waypoint.cpp @@ -14,6 +14,5 @@ namespace big } }; - auto_tp_to_waypoint g_auto_tp_to_waypoint("autotptowp", "Auto-Teleport To Waypoint", "Automatically teleports you to a waypoint as soon as you set one", - g.self.auto_tp); + auto_tp_to_waypoint g_auto_tp_to_waypoint("autotptowp", "BACKEND_LOOPED_AUTO_TP_TO_WAYPOINT", "BACKEND_LOOPED_AUTO_TP_TO_WAYPOINT_DESC", g.self.auto_tp); } diff --git a/src/backend/looped/system/voice_chat_audio.cpp b/src/backend/looped/system/voice_chat_audio.cpp index 94f034be..b76abf2c 100644 --- a/src/backend/looped/system/voice_chat_audio.cpp +++ b/src/backend/looped/system/voice_chat_audio.cpp @@ -27,6 +27,5 @@ namespace big } }; - voice_chat_audio g_voice_chat_audio("vcaudio", "Play Audio Through Voice Chat", "Plays the audio.wav file in the project folder through voice chat. The wave file must be encoded with a mono 16 bit 16kHz PCM format. You have to reset voice chat settings whenever you load the menu for the sound to play", - g.spoofing.voice_chat_audio); + voice_chat_audio g_voice_chat_audio("vcaudio", "BACKEND_LOOPED_SYSTEM_VOICE_CHAT_AUDIO", "BACKEND_LOOPED_SYSTEM_VOICE_CHAT_AUDIO_DESC", g.spoofing.voice_chat_audio); } diff --git a/src/backend/looped/tunables/no_idle_kick.cpp b/src/backend/looped/tunables/no_idle_kick.cpp index 99534bf2..4fa77d48 100644 --- a/src/backend/looped/tunables/no_idle_kick.cpp +++ b/src/backend/looped/tunables/no_idle_kick.cpp @@ -55,5 +55,5 @@ namespace big } }; - no_idle_kick g_no_idle_kick("noidlekick", "NO_IDLE_KICK", "Prevents you from being kicked while idling.", g.tunables.no_idle_kick); + no_idle_kick g_no_idle_kick("noidlekick", "NO_IDLE_KICK", "NO_IDLE_KICK_DESC", g.tunables.no_idle_kick); } diff --git a/src/backend/looped/vehicle/auto_drive.cpp b/src/backend/looped/vehicle/auto_drive.cpp index 57ed26a7..31c81feb 100644 --- a/src/backend/looped/vehicle/auto_drive.cpp +++ b/src/backend/looped/vehicle/auto_drive.cpp @@ -29,7 +29,7 @@ namespace big { current_destination = AutoDriveDestination::STOPPED; changing_driving_styles = false; - g_notification_service->push_warning("Warning", "Please be in a car first then try again."); + g_notification_service->push_warning("AUTO_DRIVE"_T.data(), "PLAYER_INFO_NO_VEHICLE"_T.data()); } else if (current_driving_flag != driving_style_flags[g.vehicle.auto_drive_style] || current_speed != g.vehicle.auto_drive_speed) { @@ -77,11 +77,11 @@ namespace big if (to_waypoint && !does_waypoint_exist) { - g_notification_service->push_warning("Warning", "No Waypoint found please set one first."); + g_notification_service->push_warning("AUTO_DRIVE"_T.data(), "TELEPORT_NO_WAYPOINT_SET"_T.data()); } else { - g_notification_service->push_warning("Warning", "Auto Drive Stopped"); + g_notification_service->push_warning("AUTO_DRIVE"_T.data(), "BACKEND_LOOPED_VEHICLE_AUTO_DRIVE_STOPPED"_T.data()); } started = false; diff --git a/src/backend/looped/vehicle/rgb_paint.cpp b/src/backend/looped/vehicle/rgb_paint.cpp index d73a3741..c68013b5 100644 --- a/src/backend/looped/vehicle/rgb_paint.cpp +++ b/src/backend/looped/vehicle/rgb_paint.cpp @@ -68,15 +68,9 @@ namespace big } } - bool_command g_rainbow_paint_primary("rainbowpri", "Rainbow Paint: Apply to Primary", "Applies active rainbow effect to the current vehicle's primary color", - g.vehicle.rainbow_paint.primary); - bool_command g_rainbow_paint_secondary("rainbowsec", "Rainbow Paint: Apply to Secondary", "Applies active rainbow effect to the current vehicle's secondary color", - g.vehicle.rainbow_paint.secondary); - bool_command g_rainbow_paint_neon("rainbowneons", "Rainbow Paint: Apply to Neons", "Applies active rainbow effect to the current vehicle's neon color", - g.vehicle.rainbow_paint.neon); - bool_command g_rainbow_paint_smoke("rainbowsmoke", "Rainbow Paint: Apply to Tire Smoke", "Applies active rainbow effect to the current vehicle's tire smoke color", - g.vehicle.rainbow_paint.smoke); - int_command g_rainbow_paint_speed("rainbowspeed", "Rainbow Paint: Speed", "Speed of the rainbow paint effect", - g.vehicle.rainbow_paint.speed, 1, 10); - + bool_command g_rainbow_paint_primary("rainbowpri", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_PRIMARY", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_PRIMARY_DESC", g.vehicle.rainbow_paint.primary); + bool_command g_rainbow_paint_secondary("rainbowsec", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_SECONDARY", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_SECONDARY_DESC", g.vehicle.rainbow_paint.secondary); + bool_command g_rainbow_paint_neon("rainbowneons", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_NEONS", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_NEONS_DESC", g.vehicle.rainbow_paint.neon); + bool_command g_rainbow_paint_smoke("rainbowsmoke", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_TIRE", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_TIRE_DESC", g.vehicle.rainbow_paint.smoke); + int_command g_rainbow_paint_speed("rainbowspeed", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_SPEED", "BACKEND_LOOPED_VEHICLE_RGB_PAINT_SPEED_DESC", g.vehicle.rainbow_paint.speed, 1, 10); } \ No newline at end of file diff --git a/src/backend/looped/vehicle/speedo_meter.cpp b/src/backend/looped/vehicle/speedo_meter.cpp index dee6a79f..c1aeb04b 100644 --- a/src/backend/looped/vehicle/speedo_meter.cpp +++ b/src/backend/looped/vehicle/speedo_meter.cpp @@ -61,10 +61,7 @@ namespace big } }; - speedo_meter - g_speedo_meter("speedometer", "SPEEDO_METER", "SPEEDO_METER_DESC", g.vehicle.speedo_meter.enabled); - bool_command g_speedo_meter_gears("speedometergears", "Show current gear", "Adds the current gear the vehicle is in to the speedo meter.", - g.vehicle.speedo_meter.show_current_gear); - bool_command g_speedo_meter_left_side("speedometerleftside", "Align to left", "Aligns the speedo meter text to the left instead of to the right.", - g.vehicle.speedo_meter.left_side); + speedo_meter g_speedo_meter("speedometer", "SPEEDO_METER", "SPEEDO_METER_DESC", g.vehicle.speedo_meter.enabled); + bool_command g_speedo_meter_gears("speedometergears", "BACKEND_LOOPED_VEHICLE_SPEEDO_METER_SHOW_CURRENT_GEAR", "BACKEND_LOOPED_VEHICLE_SPEEDO_METER_SHOW_CURRENT_GEAR_DESC", g.vehicle.speedo_meter.show_current_gear); + bool_command g_speedo_meter_left_side("speedometerleftside", "BACKEND_LOOPED_VEHICLE_SPEEDO_METER_ALIGN_TO_LEFT", "BACKEND_LOOPED_VEHICLE_SPEEDO_METER_ALIGN_TO_LEFT_DESC", g.vehicle.speedo_meter.left_side); } \ No newline at end of file diff --git a/src/backend/looped/vehicle/turn_signals.cpp b/src/backend/looped/vehicle/turn_signals.cpp index 0576f99b..2bc9a7e0 100644 --- a/src/backend/looped/vehicle/turn_signals.cpp +++ b/src/backend/looped/vehicle/turn_signals.cpp @@ -111,7 +111,7 @@ namespace big virtual void on_enable() override { - g_notification_service->push("Instructions", "Manual: J = Left, L = Right, K = Toggle Hazzards"); + g_notification_service->push("TURN_SIGNALS"_T.data(), "BACKEND_LOOPED_VEHICLE_TURN_SIGNALS_HELP"_T.data()); } virtual void on_tick() override diff --git a/src/backend/looped/weapons/aimbot.cpp b/src/backend/looped/weapons/aimbot.cpp index 638cbd80..a5b458f4 100644 --- a/src/backend/looped/weapons/aimbot.cpp +++ b/src/backend/looped/weapons/aimbot.cpp @@ -143,11 +143,10 @@ namespace big } }; - aimbot g_aimbot("aimbot", "Aimbot", "Lock on and kill", g.weapons.aimbot.enable); - bool_command g_smoothing("smoothing", "Smoothing", "Controls the snappiness of your lock on", g.weapons.aimbot.smoothing); - bool_command g_aimbot_on_player("aimatplayer", "Player", "If you suck at PVP, this is for you", g.weapons.aimbot.on_player); - bool_command g_aimbot_on_npc("aimatnpc", "NPC", "Generally kills normal NPCs", g.weapons.aimbot.on_npc); - bool_command g_aimbot_on_police("aimatpolice", "Police", "Locks onto cops to kill", g.weapons.aimbot.on_police); - bool_command - g_aimbot_on_enemy("aimatenemy", "Enemy", "Eliminate your enemies, and win your missions", g.weapons.aimbot.on_enemy); + aimbot g_aimbot("aimbot", "VIEW_OVERLAY_AIMBOT", "BACKEND_LOOPED_WEAPONS_AIMBOT_DESC", g.weapons.aimbot.enable); + bool_command g_smoothing("smoothing", "BACKEND_LOOPED_WEAPONS_SMOOTHING", "BACKEND_LOOPED_WEAPONS_SMOOTHING_DESC", g.weapons.aimbot.smoothing); + bool_command g_aimbot_on_player("aimatplayer", "PLAYER", "BACKEND_LOOPED_WEAPONS_AIM_AT_PLAYER_DESC", g.weapons.aimbot.on_player); + bool_command g_aimbot_on_npc("aimatnpc", "NPC", "BACKEND_LOOPED_WEAPONS_AIM_AT_NPC_DESC", g.weapons.aimbot.on_npc); + bool_command g_aimbot_on_police("aimatpolice", "POLICE", "BACKEND_LOOPED_WEAPONS_AIM_AT_POLICE_DESC", g.weapons.aimbot.on_police); + bool_command g_aimbot_on_enemy("aimatenemy", "BACKEND_LOOPED_WEAPONS_AIM_AT_ENEMY", "BACKEND_LOOPED_WEAPONS_AIM_AT_ENEMY_DESC", g.weapons.aimbot.on_enemy); } diff --git a/src/backend/looped/weapons/always_full_ammo.cpp b/src/backend/looped/weapons/always_full_ammo.cpp index 178034b4..2b9cd834 100644 --- a/src/backend/looped/weapons/always_full_ammo.cpp +++ b/src/backend/looped/weapons/always_full_ammo.cpp @@ -17,5 +17,5 @@ namespace big } }; - always_full_ammo g_always_full_ammo("alwaysfullammo", "Always Full Ammo", "Refills your ammo every tick", g.weapons.always_full_ammo); + always_full_ammo g_always_full_ammo("alwaysfullammo", "BACKEND_LOOPED_WEAPONS_ALWAYS_FULL_AMMO", "BACKEND_LOOPED_WEAPONS_ALWAYS_FULL_AMMO_DESC", g.weapons.always_full_ammo); } \ No newline at end of file diff --git a/src/backend/looped/weapons/cage_gun.cpp b/src/backend/looped/weapons/cage_gun.cpp index b4e45133..9c9223c0 100644 --- a/src/backend/looped/weapons/cage_gun.cpp +++ b/src/backend/looped/weapons/cage_gun.cpp @@ -23,7 +23,9 @@ namespace big } } else - g_notification_service->push_error("Weapons", "No entity found."); + { + g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + } } } } diff --git a/src/backend/looped/weapons/delete_gun.cpp b/src/backend/looped/weapons/delete_gun.cpp index 928d7898..5b0ddade 100644 --- a/src/backend/looped/weapons/delete_gun.cpp +++ b/src/backend/looped/weapons/delete_gun.cpp @@ -20,7 +20,7 @@ namespace big { if (ENTITY::IS_ENTITY_A_PED(entity) && PED::IS_PED_A_PLAYER(entity)) { - g_notification_service->push_error("Weapons", "You can't delete player entities!"); + g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_PLAYER"_T.data()); } else { @@ -29,7 +29,7 @@ namespace big if (dist > 500) { - g_notification_service->push_error("Weapons", "Entity is too far."); + g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_TOO_FAR"_T.data()); } else { @@ -38,12 +38,14 @@ namespace big entity::delete_entity(entity); } else - g_notification_service->push_error("Weapons", "Failed to take control of entity."); + g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "TELEPORT_FAILED_TO_TAKE_CONTROL"_T.data()); } } } else - g_notification_service->push_error("Weapons", "No entity found."); + { + g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + } } } } diff --git a/src/backend/looped/weapons/gravity_gun.cpp b/src/backend/looped/weapons/gravity_gun.cpp index 2222056a..4d228c2a 100644 --- a/src/backend/looped/weapons/gravity_gun.cpp +++ b/src/backend/looped/weapons/gravity_gun.cpp @@ -65,7 +65,7 @@ namespace big { if (ENTITY::IS_ENTITY_A_PED(ent_to_add) && PED::IS_PED_A_PLAYER(ent_to_add)) { - g_notification_service->push_warning("Weapons", "You can't move player entities!"); + g_notification_service->push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_PLAYER"_T.data()); } else { @@ -79,7 +79,7 @@ namespace big if (temp_dist > 500) { - g_notification_service->push_warning("Weapons", "Entity is too far."); + g_notification_service->push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_TOO_FAR"_T.data()); } else { @@ -87,7 +87,7 @@ namespace big { TASK::SET_HIGH_FALL_TASK(ent_to_add, 0, 0, 0); - g_notification_service->push_warning("Weapons", "Selected entity at crosshair."); + g_notification_service->push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_SET"_T.data()); } ents.push_back(ent_to_add); @@ -121,7 +121,7 @@ namespace big ents.clear(); - g_notification_service->push_success("Weapons", "Released entity."); + g_notification_service->push_success("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_UNSET"_T.data()); } } } diff --git a/src/backend/looped/weapons/increase_damage.cpp b/src/backend/looped/weapons/increase_damage.cpp index 719d1050..0ec9ff85 100644 --- a/src/backend/looped/weapons/increase_damage.cpp +++ b/src/backend/looped/weapons/increase_damage.cpp @@ -34,5 +34,5 @@ namespace big }; increased_damage - g_increased_damage("incrdamage", "Damage Override", "Sets your damage to whatever you want", g.weapons.increase_damage); + g_increased_damage("incrdamage", "BACKEND_LOOPED_WEAPONS_INCREASE_DAMAGE", "BACKEND_LOOPED_WEAPONS_INCREASE_DAMAGE_DESC", g.weapons.increase_damage); } diff --git a/src/backend/looped/weapons/infinite_ammo.cpp b/src/backend/looped/weapons/infinite_ammo.cpp index e08304aa..1e09527b 100644 --- a/src/backend/looped/weapons/infinite_ammo.cpp +++ b/src/backend/looped/weapons/infinite_ammo.cpp @@ -18,5 +18,5 @@ namespace big } }; - infinite_ammo g_infinite_ammo("infammo", "Infinite Ammo", "Never run out of ammo again", g.weapons.infinite_ammo); + infinite_ammo g_infinite_ammo("infammo", "VIEW_OVERLAY_INFINITE_AMMO", "", g.weapons.infinite_ammo); } \ No newline at end of file diff --git a/src/backend/looped/weapons/infinite_mag.cpp b/src/backend/looped/weapons/infinite_mag.cpp index 4bb2081d..c0db00d2 100644 --- a/src/backend/looped/weapons/infinite_mag.cpp +++ b/src/backend/looped/weapons/infinite_mag.cpp @@ -21,5 +21,5 @@ namespace big } }; - infinite_mag g_infinite_mag("infclip", "Infinite Clip", "Shoot forever without needing to reload", g.weapons.infinite_mag); + infinite_mag g_infinite_mag("infclip", "VIEW_OVERLAY_INFINITE_MAGAZINE", "BACKEND_LOOPED_WEAPONS_INFINITE_MAG_DESC", g.weapons.infinite_mag); } diff --git a/src/backend/looped/weapons/infinite_range.cpp b/src/backend/looped/weapons/infinite_range.cpp index 8e5d362f..28fab441 100644 --- a/src/backend/looped/weapons/infinite_range.cpp +++ b/src/backend/looped/weapons/infinite_range.cpp @@ -46,5 +46,5 @@ namespace big } }; - infinite_range g_infinite_range("infrange", "Infinite Range", "Kill anything at any distance", g.weapons.infinite_range); + infinite_range g_infinite_range("infrange", "BACKEND_LOOPED_WEAPONS_INFINITE_RANGE", "BACKEND_LOOPED_WEAPONS_INFINITE_RANGE_DESC", g.weapons.infinite_range); } \ No newline at end of file diff --git a/src/backend/looped/weapons/no_recoil.cpp b/src/backend/looped/weapons/no_recoil.cpp index 5c004c15..754e4460 100644 --- a/src/backend/looped/weapons/no_recoil.cpp +++ b/src/backend/looped/weapons/no_recoil.cpp @@ -54,5 +54,5 @@ namespace big } }; - no_recoil g_no_recoil("norecoil", "No Recoil", "Removes weapon recoil when shooting", g.weapons.no_recoil); + no_recoil g_no_recoil("norecoil", "BACKEND_LOOPED_WEAPONS_NO_RECOIL", "BACKEND_LOOPED_WEAPONS_NO_RECOIL_DESC", g.weapons.no_recoil); } diff --git a/src/backend/looped/weapons/no_spread.cpp b/src/backend/looped/weapons/no_spread.cpp index b38c7bcd..b017c587 100644 --- a/src/backend/looped/weapons/no_spread.cpp +++ b/src/backend/looped/weapons/no_spread.cpp @@ -47,5 +47,5 @@ namespace big } }; - no_spread g_no_spread("nospread", "No Spread", "Removes weapon spread when shooting", g.weapons.no_spread); + no_spread g_no_spread("nospread", "BACKEND_LOOPED_WEAPONS_NO_SPREAD", "BACKEND_LOOPED_WEAPONS_NO_SPREAD_DESC", g.weapons.no_spread); } diff --git a/src/backend/looped/weapons/rapid_fire.cpp b/src/backend/looped/weapons/rapid_fire.cpp index 1645c749..2c608891 100644 --- a/src/backend/looped/weapons/rapid_fire.cpp +++ b/src/backend/looped/weapons/rapid_fire.cpp @@ -62,5 +62,5 @@ namespace big } }; - rapid_fire g_rapid_fire("rapidfire", "Rapid Fire", "Makes your weapon fire insanely fast", g.weapons.rapid_fire); + rapid_fire g_rapid_fire("rapidfire", "BACKEND_LOOPED_WEAPONS_RAPID_FIRE", "BACKEND_LOOPED_WEAPONS_RAPID_FIRE_DESC", g.weapons.rapid_fire); } diff --git a/src/backend/looped/weapons/repair_gun.cpp b/src/backend/looped/weapons/repair_gun.cpp index 37a130a3..d81068c0 100644 --- a/src/backend/looped/weapons/repair_gun.cpp +++ b/src/backend/looped/weapons/repair_gun.cpp @@ -24,11 +24,13 @@ namespace big } else { - g_notification_service->push_warning("Weapons", "Entity is not a vehicle."); + g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T.data(), "VEHICLE_INVALID"_T.data()); } } else - g_notification_service->push_warning("Weapons", "No entity found."); + { + g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + } } } } diff --git a/src/backend/looped/weapons/steal_vehicle_gun.cpp b/src/backend/looped/weapons/steal_vehicle_gun.cpp index 3bd1d3cf..1493fe2b 100644 --- a/src/backend/looped/weapons/steal_vehicle_gun.cpp +++ b/src/backend/looped/weapons/steal_vehicle_gun.cpp @@ -30,10 +30,14 @@ namespace big PED::SET_PED_INTO_VEHICLE(self::ped, ent, -1); } else - g_notification_service->push_warning("Weapons", "Entity is not a vehicle."); + { + g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T.data(), "VEHICLE_INVALID"_T.data()); + } } else - g_notification_service->push_warning("Weapons", "No entity found."); + { + g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + } } } } diff --git a/src/backend/looped/weapons/triggerbot.cpp b/src/backend/looped/weapons/triggerbot.cpp index ca0d0dda..b31a1017 100644 --- a/src/backend/looped/weapons/triggerbot.cpp +++ b/src/backend/looped/weapons/triggerbot.cpp @@ -18,13 +18,13 @@ namespace big { if (ENTITY::IS_ENTITY_A_PED(crosshair_catch) && !ENTITY::IS_ENTITY_DEAD(crosshair_catch, 0)) { - Vector3 coords = ENTITY::GET_ENTITY_COORDS(crosshair_catch, 1); + Vector3 coords = ENTITY::GET_ENTITY_BONE_POSTION(crosshair_catch, 0x796E); //SKEL_Head (This will fix the edge case of peds in cars) PED::SET_PED_SHOOTS_AT_COORD(self::ped, coords.x, coords.y, coords.z, true); - }// Add check for vehicles, currently only shoots peds not in vehicles + } } } } }; - triggerbot g_triggerbot("triggerbot", "Triggerbot", "Shoots at a ped with fast ease", g.weapons.triggerbot); + triggerbot g_triggerbot("triggerbot", "VIEW_OVERLAY_TRIGGERBOT", "BACKEND_LOOPED_WEAPONS_TRIGGERBOT_DESC", g.weapons.triggerbot); } diff --git a/src/backend/looped/world/blackhole.cpp b/src/backend/looped/world/blackhole.cpp index 5a90c5b6..8d6f4806 100644 --- a/src/backend/looped/world/blackhole.cpp +++ b/src/backend/looped/world/blackhole.cpp @@ -63,10 +63,7 @@ namespace big } }; - blackhole g_blackhole("blackhole", "Blackhole", "Spawns a blackhole that picks up all the peds and vehicles in your area", - g.world.blackhole.enable); - bool_command g_blackhole_peds("blackholeincpeds", "Peds", "Includes all nearby peds in the blackhole's path of destruction", - g.world.blackhole.include_peds); - bool_command g_blackhole_vehicles("blackholeincvehs", "Vehicles", "Includes all nearby vehicles in the blackhole's path of destruction", - g.world.blackhole.include_vehicles); + blackhole g_blackhole("blackhole", "GUI_TAB_BLACKHOLE", "BACKEND_LOOPED_WORLD_BLACKHOLE_DESC", g.world.blackhole.enable); + bool_command g_blackhole_peds("blackholeincpeds", "PEDS", "BACKEND_LOOPED_WORLD_BLACKHOLE_PEDS_DESC", g.world.blackhole.include_peds); + bool_command g_blackhole_vehicles("blackholeincvehs", "VEHICLES", "BACKEND_LOOPED_WORLD_BLACKHOLE_VEHS_DESC", g.world.blackhole.include_vehicles); } \ No newline at end of file diff --git a/src/backend/looped/world/blackout.cpp b/src/backend/looped/world/blackout.cpp index 3439aae6..51c80f96 100644 --- a/src/backend/looped/world/blackout.cpp +++ b/src/backend/looped/world/blackout.cpp @@ -24,6 +24,5 @@ namespace big } }; - blackout g_blackout("blackout", "Blackout", "Enables blackout mode. This is local and cannot be seen by other players", - g.world.blackout); + blackout g_blackout("blackout", "BACKEND_LOOPED_WORLD_BLACKOUT", "BACKEND_LOOPED_WORLD_BLACKOUT_DESC", g.world.blackout); } \ No newline at end of file diff --git a/src/backend/looped/world/nearby/auto_disarm.cpp b/src/backend/looped/world/nearby/auto_disarm.cpp index 4863addd..249e929f 100644 --- a/src/backend/looped/world/nearby/auto_disarm.cpp +++ b/src/backend/looped/world/nearby/auto_disarm.cpp @@ -38,5 +38,5 @@ namespace big } }; - auto_disarm g_auto_disarm("autodisarm", "Auto Disarm", "Disarm nearby pedestrians", g.world.nearby.auto_disarm.enable); + auto_disarm g_auto_disarm("autodisarm", "BACKEND_LOOPED_WORLD_NEARBY_AUTO_DISARM", "BACKEND_LOOPED_WORLD_NEARBY_AUTO_DISARM_DESC", g.world.nearby.auto_disarm.enable); } diff --git a/src/backend/looped/world/nearby/high_alert.cpp b/src/backend/looped/world/nearby/high_alert.cpp index 2536fbec..d3c5070e 100644 --- a/src/backend/looped/world/nearby/high_alert.cpp +++ b/src/backend/looped/world/nearby/high_alert.cpp @@ -21,6 +21,6 @@ namespace big } }; - high_alert g_high_alert("highalert", "High Alert", "Not the CoD perk", g.world.nearby.high_alert); + high_alert g_high_alert("highalert", "BACKEND_LOOPED_WORLD_NEARBY_HIGH_ALERT", "BACKEND_LOOPED_WORLD_NEARBY_HIGH_ALERT_DESC", g.world.nearby.high_alert); } \ No newline at end of file diff --git a/src/backend/looped/world/nearby/ignore.cpp b/src/backend/looped/world/nearby/ignore.cpp index 841f7ab1..bccba78d 100644 --- a/src/backend/looped/world/nearby/ignore.cpp +++ b/src/backend/looped/world/nearby/ignore.cpp @@ -12,8 +12,8 @@ namespace big virtual void on_enable() override //should help for any stragglers that aren't set by the tick (aka current event) { - PLAYER::SET_EVERYONE_IGNORE_PLAYER(self::id, true); - PLAYER::SET_POLICE_IGNORE_PLAYER(self::id, true); + PLAYER::SET_EVERYONE_IGNORE_PLAYER(self::id, TRUE); + PLAYER::SET_POLICE_IGNORE_PLAYER(self::id, TRUE); } virtual void on_tick() override @@ -30,12 +30,10 @@ namespace big virtual void on_disable() override { - PLAYER::SET_EVERYONE_IGNORE_PLAYER(self::id, false); - PLAYER::SET_POLICE_IGNORE_PLAYER(self::id, false); + PLAYER::SET_EVERYONE_IGNORE_PLAYER(self::id, FALSE); + PLAYER::SET_POLICE_IGNORE_PLAYER(self::id, FALSE); } }; - ignore g_ignore("pedsignore", "Ignore", "Nearby peds will ignore you and become oblivious to your actions", - g.world.nearby.ignore); - + ignore g_ignore("pedsignore", "BACKEND_LOOPED_WORLD_IGNORE", "BACKEND_LOOPED_WORLD_IGNORE_DESC", g.world.nearby.ignore); } \ No newline at end of file diff --git a/src/backend/looped/world/nearby/ped_rush.cpp b/src/backend/looped/world/nearby/ped_rush.cpp index 5f354eb4..d2358bb8 100644 --- a/src/backend/looped/world/nearby/ped_rush.cpp +++ b/src/backend/looped/world/nearby/ped_rush.cpp @@ -27,6 +27,5 @@ namespace big } }; - ped_rush g_ped_rush("pedrush", "Ped Rush", "Makes the nearby peds move with a purpose", g.world.nearby.ped_rush); - + ped_rush g_ped_rush("pedrush", "BACKEND_LOOPED_WORLD_PED_RUSH", "BACKEND_LOOPED_WORLD_PED_RUSH_DESC", g.world.nearby.ped_rush); } \ No newline at end of file diff --git a/src/backend/looped/world/nearby/peds_rain.cpp b/src/backend/looped/world/nearby/peds_rain.cpp index c3042744..a278a616 100644 --- a/src/backend/looped/world/nearby/peds_rain.cpp +++ b/src/backend/looped/world/nearby/peds_rain.cpp @@ -26,6 +26,5 @@ namespace big } }; - ped_rain g_ped_rain("pedrain", "Rain Peds", "Will pour down and rain nearby peds", g.world.nearby.ped_rain); - + ped_rain g_ped_rain("pedrain", "BACKEND_LOOPED_WORLD_RAIN_PEDS", "BACKEND_LOOPED_WORLD_RAIN_PEDS_DESC", g.world.nearby.ped_rain); } \ No newline at end of file diff --git a/src/backend/looped/world/nearby/vehicles_rain.cpp b/src/backend/looped/world/nearby/vehicles_rain.cpp index 370fb434..10ce3bcd 100644 --- a/src/backend/looped/world/nearby/vehicles_rain.cpp +++ b/src/backend/looped/world/nearby/vehicles_rain.cpp @@ -30,7 +30,5 @@ namespace big } }; - vehicle_rain g_vehicle_rain("vehiclerain", "Rain Vehicles", "Drops surrounding vehicles, vehicles can hit and kill you!", - g.world.nearby.veh_rain); - + vehicle_rain g_vehicle_rain("vehiclerain", "Rain Vehicles", "BACKEND_LOOPED_WORLD_RAIN_VEHICLES_DESC",g.world.nearby.veh_rain); } \ No newline at end of file diff --git a/src/backend/looped/world/time_override.cpp b/src/backend/looped/world/time_override.cpp index 7a0d5336..6fcd5a07 100644 --- a/src/backend/looped/world/time_override.cpp +++ b/src/backend/looped/world/time_override.cpp @@ -23,6 +23,5 @@ namespace big } }; - time_override g_time_override("timeoverride", "Override Time", "Overrides current time. This is local and cannot be seen by other players", - g.world.custom_time.override_time); + time_override g_time_override("timeoverride", "BACKEND_LOOPED_WORLD_OVERRIDE_TIME", "BACKEND_LOOPED_WORLD_OVERRIDE_TIME_DESC", g.world.custom_time.override_time); } \ No newline at end of file diff --git a/src/backend/looped/world/weather_override.cpp b/src/backend/looped/world/weather_override.cpp index 1b779965..d025646e 100644 --- a/src/backend/looped/world/weather_override.cpp +++ b/src/backend/looped/world/weather_override.cpp @@ -37,6 +37,5 @@ namespace big } }; - weather_override g_weather_override("weatheroverride", "Override Weather", "Overrides current weather. This is local and cannot be seen by other players", - g.world.override_weather); + weather_override g_weather_override("weatheroverride", "BACKEND_LOOPED_WORLD_OVERRIDE_WEATHER", "BACKEND_LOOPED_WORLD_OVERRIDE_WEATHER_DESC", g.world.override_weather); } \ No newline at end of file diff --git a/src/backend/reactions/interloper_reaction.cpp b/src/backend/reactions/interloper_reaction.cpp index f9b38f0f..ecf2cadf 100644 --- a/src/backend/reactions/interloper_reaction.cpp +++ b/src/backend/reactions/interloper_reaction.cpp @@ -43,7 +43,7 @@ namespace big { char notification[500]{};// I don't like using sprintf but there isn't an alternative afaik snprintf(notification, sizeof(notification), m_notify_message, attacker->get_name(), victim->get_name()); - g_notification_service->push_warning("Protections", notification); + g_notification_service->push_warning("PROTECTIONS"_T.data(), notification); } process_common(attacker); diff --git a/src/backend/reactions/reaction.cpp b/src/backend/reactions/reaction.cpp index 13f8992d..0ab3ac0b 100644 --- a/src/backend/reactions/reaction.cpp +++ b/src/backend/reactions/reaction.cpp @@ -80,7 +80,7 @@ namespace big { char notification[500]{}; // I don't like using sprintf but there isn't an alternative afaik snprintf(notification, sizeof(notification), m_notify_message, player->get_name()); - g_notification_service->push_warning("Protections", notification); + g_notification_service->push_warning("PROTECTIONS"_T.data(), notification); } process_common(player); diff --git a/src/core/data/custom_weapons.hpp b/src/core/data/custom_weapons.hpp deleted file mode 100644 index 321e3655..00000000 --- a/src/core/data/custom_weapons.hpp +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once -#include "core/enums.hpp" - -struct custom_weapon -{ - big::CustomWeapon id; - const char name[32]; -}; - -const custom_weapon custom_weapons[] = { - {big::CustomWeapon::NONE, "No weapon"}, - {big::CustomWeapon::CAGE_GUN, "Cage Gun"}, - {big::CustomWeapon::DELETE_GUN, "Delete Gun"}, - {big::CustomWeapon::GRAVITY_GUN, "Gravity Gun"}, - {big::CustomWeapon::STEAL_VEHICLE_GUN, "Steal Vehicle Gun"}, - {big::CustomWeapon::REPAIR_GUN, "Repair Gun"}, - {big::CustomWeapon::VEHICLE_GUN, "Vehicle Gun"}, - {big::CustomWeapon::TP_GUN, "Tp Gun"}, - {big::CustomWeapon::PAINT_GUN, "Paint Gun"}, -}; \ No newline at end of file diff --git a/src/core/data/session_types.hpp b/src/core/data/session_types.hpp index b49a79a8..5ee6fe85 100644 --- a/src/core/data/session_types.hpp +++ b/src/core/data/session_types.hpp @@ -6,20 +6,20 @@ namespace big struct SessionType { eSessionType id; - const char name[22]; + std::string_view name; }; const SessionType sessions[] = { - {eSessionType::JOIN_PUBLIC, "Join Public Session"}, - {eSessionType::NEW_PUBLIC, "New Public Session"}, - {eSessionType::CLOSED_CREW, "Closed Crew Session"}, - {eSessionType::CREW, "Crew Session"}, - {eSessionType::CLOSED_FRIENDS, "Closed Friend Session"}, - {eSessionType::FIND_FRIEND, "Find Friend Session"}, - {eSessionType::SOLO, "Solo Session"}, - {eSessionType::INVITE_ONLY, "Invite Only Session"}, - {eSessionType::JOIN_CREW, "Join Crew Session"}, - {eSessionType::SC_TV, "SC TV"}, - {eSessionType::LEAVE_ONLINE, "Leave GTA Online"}, + {eSessionType::JOIN_PUBLIC, "BACKEND_SESSION_TYPE_JOIN_PUBLIC"_T}, + {eSessionType::NEW_PUBLIC, "BACKEND_SESSION_TYPE_NEW_PUBLIC"_T}, + {eSessionType::CLOSED_CREW, "BACKEND_SESSION_TYPE_CLOSED_CREW"_T}, + {eSessionType::CREW, "BACKEND_SESSION_TYPE_CREW"_T}, + {eSessionType::CLOSED_FRIENDS, "BACKEND_SESSION_TYPE_CLOSED_FRIENDS"_T}, + {eSessionType::FIND_FRIEND, "BACKEND_SESSION_TYPE_FIND_FRIEND"_T}, + {eSessionType::SOLO, "BACKEND_SESSION_TYPE_SOLO"_T}, + {eSessionType::INVITE_ONLY, "BACKEND_SESSION_TYPE_INVITE_ONLY"_T}, + {eSessionType::JOIN_CREW, "BACKEND_SESSION_TYPE_JOIN_CREW"_T}, + {eSessionType::SC_TV, "BACKEND_SESSION_TYPE_SC_TV"_T}, + {eSessionType::LEAVE_ONLINE, "BACKEND_SESSION_TYPE_LEAVE_ONLINE"_T}, }; } \ No newline at end of file diff --git a/src/gui/components/components.hpp b/src/gui/components/components.hpp index 8bb1d604..94918613 100644 --- a/src/gui/components/components.hpp +++ b/src/gui/components/components.hpp @@ -137,7 +137,7 @@ namespace big { ImGui::Text(std::format("{}: ", text).data()); ImGui::SameLine(180); - ImGui::TextColored(value ? green : red, value ? "Enabled" : "Disabled"); + ImGui::TextColored(value ? green : red, value ? "ENABLED"_T.data() : "CORE_GUI_COMPONENTS_DISABLED"_T.data()); } template diff --git a/src/gui/components/options_modal.cpp b/src/gui/components/options_modal.cpp index abc5bfa2..096cd81b 100644 --- a/src/gui/components/options_modal.cpp +++ b/src/gui/components/options_modal.cpp @@ -18,7 +18,7 @@ namespace big { render_elements(); ImGui::Spacing(); - if (ImGui::Button(std::string("Close##" + element_name).data()) || ((!ImGui::IsWindowHovered() && !ImGui::IsAnyItemHovered()) && ImGui::IsMouseClicked(ImGuiMouseButton_Left))) + if (ImGui::Button(std::format("{}##{}", "CLOSE"_T, element_name).c_str()) || ((!ImGui::IsWindowHovered() && !ImGui::IsAnyItemHovered()) && ImGui::IsMouseClicked(ImGuiMouseButton_Left))) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); diff --git a/src/gui/handling/handling_current_profile.cpp b/src/gui/handling/handling_current_profile.cpp index 7abb13b5..176f34da 100644 --- a/src/gui/handling/handling_current_profile.cpp +++ b/src/gui/handling/handling_current_profile.cpp @@ -13,14 +13,14 @@ namespace big } g_handling_service->backup_vehicle(); - if (components::button("HANDLING_SAVE_PROFILE"_T.data())) + if (components::button("HANDLING_SAVE_PROFILE"_T)) { ImGui::OpenPopup("HANDLING_SAVE_HANDLING"_T.data()); } modal_handling::modal_save_handling(); ImGui::SameLine(); - if (components::button("HANDLING_RESTORE_HANDLING"_T.data())) + if (components::button("HANDLING_RESTORE_HANDLING"_T)) g_handling_service->restore_vehicle(); ImGui::Separator(); diff --git a/src/hooks/player_management/assign_physical_index.cpp b/src/hooks/player_management/assign_physical_index.cpp index 1c62df29..2c6dda39 100644 --- a/src/hooks/player_management/assign_physical_index.cpp +++ b/src/hooks/player_management/assign_physical_index.cpp @@ -61,7 +61,7 @@ namespace big if (admin_rids.contains(net_player_data->m_gamer_handle.m_rockstar_id)) { g_notification_service->push_warning("POTENTIAL_ADMIN_FOUND"_T.data(), - std::vformat("PLAYER_DETECTED_AS_ADMIN"_T, std::make_format_args(net_player_data->m_name))); + std::format("{} {}", net_player_data->m_name, "PLAYER_DETECTED_AS_ADMIN"_T)); LOG(WARNING) << net_player_data->m_name << " (" << net_player_data->m_gamer_handle.m_rockstar_id << ") has been detected as an admin"; @@ -106,7 +106,7 @@ namespace big if (strcmp(plyr->get_name(), entry->name.data())) { g_notification_service->push("PLAYERS"_T.data(), - std::vformat("PLAYER_CHANGED_NAME"_T, std::make_format_args(entry->name, plyr->get_name()))); + std::format("{} {}: {}", entry->name, "PLAYER_CHANGED_NAME"_T, plyr->get_name())); entry->name = plyr->get_name(); g_player_database_service->save(); } diff --git a/src/services/custom_teleport/custom_teleport_service.cpp b/src/services/custom_teleport/custom_teleport_service.cpp index 179468c3..476c6ca9 100644 --- a/src/services/custom_teleport/custom_teleport_service.cpp +++ b/src/services/custom_teleport/custom_teleport_service.cpp @@ -70,7 +70,7 @@ namespace big file_out << j.dump(4); file_out.close(); - g_notification_service->push_success("Custom Teleport", std::format("Succesfully saved location {}", t.name)); + g_notification_service->push_success("GUI_TAB_CUSTOM_TELEPORT"_T.data(), std::format("Succesfully saved location {}", t.name)); return true; } diff --git a/src/services/player_database/persistent_player.hpp b/src/services/player_database/persistent_player.hpp index 853d0e02..0132cc83 100644 --- a/src/services/player_database/persistent_player.hpp +++ b/src/services/player_database/persistent_player.hpp @@ -62,7 +62,7 @@ namespace big int64_t transition_session_id = -1; bool is_host_of_transition_session = false; GameMode game_mode = GameMode(-1); - std::string game_mode_name = "Unknown"; + std::string game_mode_name = "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data(); std::string game_mode_id = ""; rage::rlSessionInfo redirect_info{}; diff --git a/src/views/core/view_cmd_executor.cpp b/src/views/core/view_cmd_executor.cpp index f297d9dc..102f2e27 100644 --- a/src/views/core/view_cmd_executor.cpp +++ b/src/views/core/view_cmd_executor.cpp @@ -69,5 +69,5 @@ namespace big } bool_command - g_cmd_executor("cmdexecutor", "Toggle Command Executor", "Toggles the command executor window", g.cmd_executor.enabled, false); + g_cmd_executor("cmdexecutor", "CMD_EXECUTOR", "CMD_EXECUTOR_DESC", g.cmd_executor.enabled, false); } \ No newline at end of file diff --git a/src/views/core/view_overlay.cpp b/src/views/core/view_overlay.cpp index 20b5692c..38f6d663 100644 --- a/src/views/core/view_overlay.cpp +++ b/src/views/core/view_overlay.cpp @@ -28,45 +28,48 @@ namespace big ImGui::Separator(); if (g.window.ingame_overlay.show_fps) - ImGui::Text("%.0f FPS", ImGui::GetIO().Framerate); + { + ImGui::Text(std::format("{:.0f} {}", ImGui::GetIO().Framerate, "VIEW_OVERLAY_FPS"_T).c_str()); + } if (CNetworkPlayerMgr* network_player_mgr = gta_util::get_network_player_mgr(); g.window.ingame_overlay.show_players) - ImGui::Text(std::format("Players: {}/{}", network_player_mgr->m_player_count, network_player_mgr->m_player_limit) - .c_str()); + { + ImGui::Text(std::format("{}: {}/{}", "PLAYERS"_T, network_player_mgr->m_player_count, network_player_mgr->m_player_limit).c_str()); + } if (g.window.ingame_overlay.show_indicators) { ImGui::Separator(); if (g.window.ingame_overlay_indicators.show_player_godmode) - components::overlay_indicator("Player Godmode", g.self.god_mode); + components::overlay_indicator("VIEW_OVERLAY_PLAYER_GODMODE"_T, g.self.god_mode); if (g.window.ingame_overlay_indicators.show_off_radar) - components::overlay_indicator("Off Radar", g.self.off_radar); + components::overlay_indicator("OFF_THE_RADAR"_T, g.self.off_radar); if (g.window.ingame_overlay_indicators.show_vehicle_godmode) - components::overlay_indicator("Vehicle Godmode", g.vehicle.god_mode); + components::overlay_indicator("VIEW_OVERLAY_VEHICLE_GODMODE"_T, g.vehicle.god_mode); if (g.window.ingame_overlay_indicators.show_never_wanted) - components::overlay_indicator("Never Wanted", g.self.never_wanted); + components::overlay_indicator("NEVER_WANTED"_T, g.self.never_wanted); if (g.window.ingame_overlay_indicators.show_infinite_ammo) - components::overlay_indicator("Infinite Ammo", g.weapons.infinite_ammo); + components::overlay_indicator("VIEW_OVERLAY_INFINITE_AMMO"_T, g.weapons.infinite_ammo); if (g.window.ingame_overlay_indicators.show_always_full_ammo) - components::overlay_indicator("Always Full Ammo", g.weapons.always_full_ammo); + components::overlay_indicator("VIEW_OVERLAY_ALWAYS_FULL_AMMO"_T, g.weapons.always_full_ammo); if (g.window.ingame_overlay_indicators.show_infinite_mag) - components::overlay_indicator("Infinite Magazine", g.weapons.infinite_mag); + components::overlay_indicator("VIEW_OVERLAY_INFINITE_MAGAZINE"_T, g.weapons.infinite_mag); if (g.window.ingame_overlay_indicators.show_aimbot) - components::overlay_indicator("Aimbot", g.weapons.aimbot.enable); + components::overlay_indicator("VIEW_OVERLAY_AIMBOT"_T, g.weapons.aimbot.enable); if (g.window.ingame_overlay_indicators.show_triggerbot) - components::overlay_indicator("Triggerbot", g.weapons.triggerbot); + components::overlay_indicator("VIEW_OVERLAY_TRIGGERBOT"_T, g.weapons.triggerbot); if (g.window.ingame_overlay_indicators.show_invisibility) - components::overlay_indicator("Invisibility", g.self.invisibility); + components::overlay_indicator("INVISIBILITY"_T, g.self.invisibility); } if (g.window.ingame_overlay.show_position && g_local_player) @@ -75,7 +78,7 @@ namespace big auto& pos = *g_local_player->get_position(); - ImGui::Text("Pos: %.2f, %.2f, %.2f", pos.x, pos.y, pos.z); + ImGui::Text(std::format("{}: {:.2f}, {:.2f}, {:.2f}", "VIEW_OVERLAY_POSITION"_T, pos.x, pos.y, pos.z).c_str()); } if (g.window.ingame_overlay.show_replay_interface) @@ -85,29 +88,38 @@ namespace big ImGui::Separator(); if (*g_pointers->m_gta.m_ped_pool) - ImGui::Text(std::format("Ped Pool: {}/{}", + { + ImGui::Text(std::format("{}: {}/{}", + "VIEW_OVERLAY_PED_POOL"_T, (*g_pointers->m_gta.m_ped_pool)->get_item_count(), (*g_pointers->m_gta.m_ped_pool)->m_size) .c_str()); + } if (*g_pointers->m_gta.m_vehicle_pool && **g_pointers->m_gta.m_vehicle_pool) - ImGui::Text(std::format("Vehicle Pool: {}/{}", + { + ImGui::Text(std::format("{}: {}/{}", + "VIEW_OVERLAY_VEHICLE_POOL"_T, (**g_pointers->m_gta.m_vehicle_pool)->m_item_count, (**g_pointers->m_gta.m_vehicle_pool)->m_size) .c_str()); + } if (*g_pointers->m_gta.m_prop_pool) - ImGui::Text(std::format("Object Pool: {}/{}", + { + ImGui::Text(std::format("{}: {}/{}", + "VIEW_OVERLAY_OBJECT_POOL"_T, (*g_pointers->m_gta.m_prop_pool)->get_item_count(), (*g_pointers->m_gta.m_prop_pool)->m_size) .c_str()); + } } if (g.window.ingame_overlay.show_game_versions) { ImGui::Separator(); - ImGui::Text(std::format("Game Version: {}", g_pointers->m_gta.m_game_version).c_str()); - ImGui::Text(std::format("Online Version: {}", g_pointers->m_gta.m_online_version).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_OVERLAY_GAME_VERSION"_T, g_pointers->m_gta.m_game_version).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_OVERLAY_ONLINE_VERSION"_T, g_pointers->m_gta.m_online_version).c_str()); } } ImGui::End(); diff --git a/src/views/debug/view_debug.cpp b/src/views/debug/view_debug.cpp index 93058086..2808bf91 100644 --- a/src/views/debug/view_debug.cpp +++ b/src/views/debug/view_debug.cpp @@ -19,7 +19,7 @@ namespace big script_events(); scripts(); threads(); - if (ImGui::BeginTabItem("Animations")) + if (ImGui::BeginTabItem("GUI_TAB_ANIMATIONS"_T.data())) { animations(); ImGui::EndTabItem(); diff --git a/src/views/debug/view_debug_animations.cpp b/src/views/debug/view_debug_animations.cpp index b906f2f6..6f800b72 100644 --- a/src/views/debug/view_debug_animations.cpp +++ b/src/views/debug/view_debug_animations.cpp @@ -25,15 +25,17 @@ namespace big } }; - if(animations::has_anim_list_been_populated()) - ImGui::Text(std::format("There are {} dictionaries with {} animations in memory", animations::anim_dict_count(), animations::total_anim_count()).data()); + if (animations::has_anim_list_been_populated()) + { + ImGui::Text("VIEW_DEBUG_ANIMATIONS_ANIMATIONS_IN_MEMORY"_T.data(), animations::anim_dict_count(), animations::total_anim_count()); + } - components::button("Fetch All Anims", [] { + components::button("VIEW_DEBUG_ANIMATIONS_FETCH_ALL_ANIMS"_T, [] { animations::fetch_all_anims(); }); ImGui::SetNextItemWidth(400); - components::input_text_with_hint("##dictionaryfilter", "Dictionary", current_dict); + components::input_text_with_hint("##dictionaryfilter", "DICT"_T, current_dict); if (animations::has_anim_list_been_populated() && ImGui::BeginListBox("##dictionaries", ImVec2(400, 200))) { @@ -66,12 +68,12 @@ namespace big ImGui::EndListBox(); } - components::button("Play", [] { + components::button("VIEW_DEBUG_ANIMATIONS_PLAY"_T, [] { TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped); ped::ped_play_animation(self::ped, current_dict, current_anim, 4.f, -4.f, -1, 0, 0, false); }); ImGui::SameLine(); - components::button("Stop", [] { + components::button("VIEW_DEBUG_ANIMATIONS_STOP"_T, [] { TASK::CLEAR_PED_TASKS(self::ped); }); } diff --git a/src/views/debug/view_debug_globals.cpp b/src/views/debug/view_debug_globals.cpp index 4855317b..1b3bfa02 100644 --- a/src/views/debug/view_debug_globals.cpp +++ b/src/views/debug/view_debug_globals.cpp @@ -137,62 +137,56 @@ namespace big static global_debug global_test{}; static script_global glo_bal_sunday = script_global(global_test.global_index); ImGui::SetNextItemWidth(200.f); - if (ImGui::InputScalar("Global", ImGuiDataType_U64, &global_test.global_index)) + if (ImGui::InputScalar("VIEW_DEBUG_GLOBAL"_T.data(), ImGuiDataType_U64, &global_test.global_index)) glo_bal_sunday = script_global(global_test.global_index); for (int i = 0; i < global_test.global_appendages.size(); i++) { auto item = global_test.global_appendages[i]; + ImGui::PushID(i + item.type); switch (item.type) { - case GlobalAppendageType_At: - ImGui::SetNextItemWidth(200.f); - ImGui::InputScalar(std::format("At##{}{}", i, (int)item.type).c_str(), - ImGuiDataType_S64, - &global_test.global_appendages[i].index); - ImGui::SameLine(); - ImGui::SetNextItemWidth(200.f); - ImGui::InputScalar(std::format("Size##{}{}", i, (int)item.type).c_str(), - ImGuiDataType_S64, - &global_test.global_appendages[i].size); - break; - case GlobalAppendageType_ReadGlobal: - ImGui::Text(std::format("Read Global {}", item.global_name).c_str()); - ImGui::SameLine(); - ImGui::SetNextItemWidth(200.f); - ImGui::InputScalar(std::format("Size##{}{}", i, (int)item.type).c_str(), - ImGuiDataType_S64, - &global_test.global_appendages[i].size); - break; - case GlobalAppendageType_PlayerId: - ImGui::SetNextItemWidth(200.f); - ImGui::InputScalar(std::format("Read Player ID Size##{}{}", i, (int)item.type).c_str(), - ImGuiDataType_S64, - &global_test.global_appendages[i].size); - break; + case GlobalAppendageType_At: + ImGui::SetNextItemWidth(200.f); + ImGui::InputScalar("VIEW_DEBUG_GLOBAL_AT"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].index); + ImGui::SameLine(); + ImGui::SetNextItemWidth(200.f); + ImGui::InputScalar("VIEW_DEBUG_GLOBAL_SIZE"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].size); + break; + case GlobalAppendageType_ReadGlobal: + ImGui::Text(std::format("{} {}", "VIEW_DEBUG_GLOBAL_READ_GLOBAL"_T, item.global_name).c_str()); + ImGui::SameLine(); + ImGui::SetNextItemWidth(200.f); + ImGui::InputScalar("VIEW_DEBUG_GLOBAL_SIZE"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].size); + break; + case GlobalAppendageType_PlayerId: + ImGui::SetNextItemWidth(200.f); + ImGui::InputScalar("VIEW_DEBUG_GLOBAL_READ_PLAYER_ID_SIZE"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].size); + break; } + ImGui::PopID(); } - if (ImGui::Button("Add Offset")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_ADD_OFFSET"_T.data())) global_test.global_appendages.push_back({GlobalAppendageType_At, 0LL, 0ULL}); ImGui::SameLine(); - if (ImGui::Button("Add Read Player Id")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_ADD_READ_PLAYER_ID"_T.data())) global_test.global_appendages.push_back({GlobalAppendageType_PlayerId, 0LL, 0ULL}); - if (global_test.global_appendages.size() > 0 && ImGui::Button("Remove Offset")) + if (global_test.global_appendages.size() > 0 && ImGui::Button("VIEW_DEBUG_GLOBAL_REMOVE_OFFSET"_T.data())) global_test.global_appendages.pop_back(); if (auto ptr = get_global_ptr(global_test)) { ImGui::SetNextItemWidth(200.f); - ImGui::InputScalar("Value", ImGuiDataType_S32, ptr); + ImGui::InputScalar("VIEW_DEBUG_GLOBAL_VALUE"_T.data(), ImGuiDataType_S32, ptr); } else - ImGui::Text("INVALID_GLOBAL_READ"); + ImGui::Text("VIEW_DEBUG_GLOBAL_INVALID_GLOBAL_READ"_T.data()); auto globals = list_globals(); static std::string selected_global; - ImGui::Text("Saved Globals"); + ImGui::Text("VIEW_DEBUG_GLOBAL_SAVED_GLOBALS"_T.data()); if (ImGui::BeginListBox("##savedglobals", ImVec2(200, 200))) { for (auto pair : globals) @@ -210,7 +204,7 @@ namespace big if (auto ptr = get_global_ptr(pair.second)) ImGui::Selectable(std::format("{}", (std::int32_t)*ptr).c_str(), false, ImGuiSelectableFlags_Disabled); else - ImGui::Selectable("INVALID_GLOBAL_READ", false, ImGuiSelectableFlags_Disabled); + ImGui::Selectable("VIEW_DEBUG_GLOBAL_INVALID_GLOBAL_READ"_T.data(), false, ImGuiSelectableFlags_Disabled); } ImGui::EndListBox(); } @@ -226,12 +220,12 @@ namespace big save_global(global_name, global_test); } ImGui::SameLine(); - if (ImGui::Button("Load Global")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_LOAD_GLOBAL"_T.data())) { load_global_menu(selected_global, global_test); } - if (ImGui::Button("Delete Global")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_DELETE_GLOBAL"_T.data())) { if (!selected_global.empty()) { @@ -240,12 +234,12 @@ namespace big } } ImGui::SameLine(); - if (ImGui::Button("Add Read Global")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_ADD_READ_GLOBAL"_T.data())) { global_test.global_appendages.push_back({GlobalAppendageType_ReadGlobal, 0LL, 0ULL, selected_global}); } ImGui::SameLine(); - if (ImGui::Button("Clear")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_CLEAR"_T.data())) { global_test.global_index = 0; global_test.global_appendages.clear(); diff --git a/src/views/debug/view_debug_locals.cpp b/src/views/debug/view_debug_locals.cpp index 85c5ce02..a1dcedc4 100644 --- a/src/views/debug/view_debug_locals.cpp +++ b/src/views/debug/view_debug_locals.cpp @@ -15,11 +15,11 @@ namespace big static int offsets[10][2] = {}; static int offset_count = 0; static int previous_offset_count = 0; - components::input_text("Name", name, sizeof(name)); - components::input_text("Script Name", script_thread_name, sizeof(script_thread_name)); - ImGui::Text("Base address"); + components::input_text("NAME"_T, name, sizeof(name)); + components::input_text("VIEW_DEBUG_LOCALS_SCRIPT_NAME"_T, script_thread_name, sizeof(script_thread_name)); + ImGui::Text("VIEW_DEBUG_LOCALS_BASE_ADDRESS"_T.data()); ImGui::InputInt("##local_base_address", &base_address); - ImGui::Text("Offsetcount"); + ImGui::Text("VIEW_DEBUG_LOCALS_OFFSET_COUNT"_T.data()); ImGui::InputInt("##modal_offset_count", &offset_count); offset_count = std::clamp(offset_count, 0, 10); @@ -71,7 +71,7 @@ namespace big } else { - g_notification_service->push_error("Locals editor", "Script does not exist"); + g_notification_service->push_error("DEBUG_TAB_LOCALS"_T.data(), "VIEW_DEBUG_LOCALS_SCRIPT_DOES_NOT_EXIST"_T.data()); } }; } @@ -86,7 +86,7 @@ namespace big if (components::button("SAVE"_T)) g_locals_service.save(); - if (components::button("Add Local")) + if (components::button("VIEW_DEBUG_LOCALS_ADD_LOCAL"_T)) { ImGui::OpenPopup("##addlocal"); } @@ -136,7 +136,7 @@ namespace big local_.m_edit_mode = 3; - ImGui::LabelText(local_.get_local_chain_text(), "Value"); + ImGui::LabelText(local_.get_local_chain_text(), "VIEW_DEBUG_GLOBAL_VALUE"_T.data()); ImGui::SetNextItemWidth(200); @@ -198,7 +198,7 @@ namespace big } ImGui::SameLine(); - if (ImGui::Checkbox("Freeze", &local_.m_freeze)) + if (ImGui::Checkbox("VIEW_DEBUG_LOCALS_FREEZE"_T.data(), &local_.m_freeze)) { local_.m_freeze_value_int = *local_.m_internal_address; local_.m_freeze_value_float = *reinterpret_cast(local_.m_internal_address); @@ -207,7 +207,7 @@ namespace big } else { - if (components::button("Fetch")) + if (components::button("VIEW_DEBUG_LOCALS_FETCH"_T)) { local_.fetch_local_pointer(); } @@ -216,10 +216,10 @@ namespace big else { ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.0f, 0.0f, 1.0f)); - ImGui::Text("%s isn't running", local_.m_script_thread_name); + ImGui::Text(std::format("{} {}", local_.m_script_thread_name, "VIEW_DEBUG_LOCALS_SCRIPT_IS_NOT_RUNNING"_T).c_str()); ImGui::PopStyleColor(); } - if (components::button("Delete")) + if (components::button("DELETE"_T)) std::erase_if(g_locals_service.m_locals, [local_](local l) { return l.get_id() == local_.get_id(); }); diff --git a/src/views/debug/view_debug_misc.cpp b/src/views/debug/view_debug_misc.cpp index da00fa33..26d2320a 100644 --- a/src/views/debug/view_debug_misc.cpp +++ b/src/views/debug/view_debug_misc.cpp @@ -18,28 +18,28 @@ namespace big { if (ImGui::BeginTabItem("DEBUG_TAB_MISC"_T.data())) { - components::command_checkbox<"windowhook">("Disable GTA Window Hook"); + components::command_checkbox<"windowhook">("VIEW_DEBUG_MISC_DISABLE_GTA_WINDOW_HOOK"_T); - ImGui::Text("Fiber Pool Usage %d/%d", g_fiber_pool->get_used_fibers(), g_fiber_pool->get_total_fibers()); + ImGui::Text(std::format("{}: {}/{}", "VIEW_DEBUG_MISC_FIBER_POOL_USAGE"_T, g_fiber_pool->get_used_fibers(), g_fiber_pool->get_total_fibers()).c_str()); ImGui::SameLine(); - if (components::button("RESET"_T.data())) + if (components::button("RESET"_T)) { g_fiber_pool->reset(); } - if (components::button("Trigger GTA Error Message Box")) + if (components::button("VIEW_DEBUG_MISC_TRIGGER_GTA_ERROR_BOX"_T)) { hooks::log_error_message_box(0xBAFD530B, 1); } - if (components::button("DUMP_ENTRYPOINTS"_T.data())) + if (components::button("DUMP_ENTRYPOINTS"_T)) { system::dump_entry_points(); } - components::button("NETWORK_BAIL"_T.data(), [] { + components::button("NETWORK_BAIL"_T, [] { NETWORK::NETWORK_BAIL(16, 0, 0); }); @@ -50,53 +50,53 @@ namespace big STATS::STAT_SET_BOOL(RAGE_JOAAT("MPPLY_CHAR_IS_BADSPORT"), false, true); }); - components::button("LOAD_MP_MAP"_T.data(), [] { + components::button("LOAD_MP_MAP"_T, [] { DLC::ON_ENTER_MP(); }); ImGui::SameLine(); - components::button("LOAD_SP_MAP"_T.data(), [] { + components::button("LOAD_SP_MAP"_T, [] { DLC::ON_ENTER_SP(); }); - components::button("SKIP_CUTSCENE"_T.data(), [] { + components::button("SKIP_CUTSCENE"_T, [] { CUTSCENE::STOP_CUTSCENE_IMMEDIATELY(); }); - components::button("REFRESH_INTERIOR"_T.data(), [] { + components::button("REFRESH_INTERIOR"_T, [] { Interior interior = INTERIOR::GET_INTERIOR_AT_COORDS(self::pos.x, self::pos.y, self::pos.z); INTERIOR::REFRESH_INTERIOR(interior); }); - components::button("NET_SHUTDOWN_AND_LOAD_SP"_T.data(), [] { + components::button("NET_SHUTDOWN_AND_LOAD_SP"_T, [] { NETWORK::SHUTDOWN_AND_LAUNCH_SINGLE_PLAYER_GAME(); }); - components::button("NET_SHUTDOWN_AND_LOAD_SAVE"_T.data(), [] { + components::button("NET_SHUTDOWN_AND_LOAD_SAVE"_T, [] { NETWORK::SHUTDOWN_AND_LOAD_MOST_RECENT_SAVE(); }); - components::button("REMOVE_BLACKSCREEN"_T.data(), [] { + components::button("REMOVE_BLACKSCREEN"_T, [] { CAM::DO_SCREEN_FADE_IN(0); }); - components::button("TP_TO_SAFE_POS"_T.data(), [] { + components::button("TP_TO_SAFE_POS"_T, [] { Vector3 safepos{}; float heading; if (pathfind::find_closest_vehicle_node(self::pos, safepos, heading, 0)) ENTITY::SET_ENTITY_COORDS(self::ped, safepos.x, safepos.y, safepos.z, 0, 0, 0, false); else - g_notification_service->push_error("Find safe pos", "Failed to find a safe position"); + g_notification_service->push_error("DEBUG_TAB_MISC"_T.data(), "VIEW_DEBUG_MISC_TP_TO_SAFE_POS_FAILED"_T.data()); }); - ImGui::Checkbox("ImGui Demo", &g.window.demo); + ImGui::Checkbox("VIEW_DEBUG_MISC_IMGUI_DEMO"_T.data(), &g.window.demo); components::command_button<"fastquit">(); - if (ImGui::TreeNode("Fuzzer")) + if (ImGui::TreeNode("VIEW_DEBUG_MISC_FUZZER"_T.data())) { - ImGui::Checkbox("Enabled", &g.debug.fuzzer.enabled); + ImGui::Checkbox("ENABLED"_T.data(), &g.debug.fuzzer.enabled); for (int i = 0; i < net_object_type_strs.size(); i++) { @@ -152,8 +152,8 @@ namespace big static char dict[100], anim[100]; ImGui::PushItemWidth(200); - components::input_text_with_hint("##dictionary", "DICT"_T.data(), dict, IM_ARRAYSIZE(dict)); - components::input_text_with_hint("##animation", "ANIMATION"_T.data(), anim, IM_ARRAYSIZE(anim)); + components::input_text_with_hint("##dictionary", "DICT"_T, dict, IM_ARRAYSIZE(dict)); + components::input_text_with_hint("##animation", "ANIMATION"_T, anim, IM_ARRAYSIZE(anim)); if (ImGui::Button("PLAY_ANIMATION"_T.data())) g_fiber_pool->queue_job([=] { ped::ped_play_animation(self::ped, dict, anim); diff --git a/src/views/debug/view_debug_scripts.cpp b/src/views/debug/view_debug_scripts.cpp index 0a251192..f4f94301 100644 --- a/src/views/debug/view_debug_scripts.cpp +++ b/src/views/debug/view_debug_scripts.cpp @@ -16,7 +16,7 @@ namespace big { if (ImGui::Checkbox(script->name(), script->toggle_ptr())) { - g_notification_service->push(std::string(script->name()).append(" script"), script->is_enabled() ? "Resumed" : "Halted"); + g_notification_service->push(std::string(script->name()).append("VIEW_DEBUG_SCRIPTS_SCRIPT"_T.data()), script->is_enabled() ? "VIEW_DEBUG_SCRIPTS_RESUMED"_T.data() : "VIEW_DEBUG_SCRIPTS_HALTED"_T.data()); } } }); diff --git a/src/views/debug/view_debug_threads.cpp b/src/views/debug/view_debug_threads.cpp index 7071de57..0392f441 100644 --- a/src/views/debug/view_debug_threads.cpp +++ b/src/views/debug/view_debug_threads.cpp @@ -34,7 +34,7 @@ namespace big { void debug::threads() { - if (ImGui::BeginTabItem("Threads")) + if (ImGui::BeginTabItem("VIEW_DEBUG_THREADS"_T.data())) { if (!g_pointers->m_gta.m_script_threads) { @@ -43,9 +43,9 @@ namespace big return; } - components::small_text("Threads"); + components::small_text("VIEW_DEBUG_THREADS"_T); - if (ImGui::BeginCombo("Thread", selected_thread ? selected_thread->m_name : "NONE")) + if (ImGui::BeginCombo("VIEW_DEBUG_THREADS_THREAD"_T.data(), selected_thread ? selected_thread->m_name : "VIEW_DEBUG_THREADS_SELECTED_NONE"_T.data())) { for (auto script : *g_pointers->m_gta.m_script_threads) { @@ -85,11 +85,11 @@ namespace big auto host = net_handler->get_host(); if (host) { - ImGui::Text("Script Host: %s", host->get_name()); + ImGui::Text(std::format("{}: {}", "VIEW_DEBUG_THREADS_SCRIPT_HOST"_T, host->get_name()).c_str()); if (!net_handler->is_local_player_host()) { - components::button("Take Control", [net_handler] { + components::button("VIEW_DEBUG_THREADS_TAKE_CONTROL"_T, [net_handler] { net_handler->send_host_migration_event(g_player_service->get_self()->get_net_game_player()); script::get_current()->yield(10ms); if (selected_thread->m_stack && selected_thread->m_net_component) @@ -101,29 +101,37 @@ namespace big } } - - ImGui::Combo("State", (int*)&selected_thread->m_context.m_state, "RUNNING\0WAITING\0KILLED\0PAUSED\0STATE_4"); + static const std::string thread_states = std::string("VIEW_DEBUG_THREADS_STATE_0"_T.data()) + '\0' + + std::string("VIEW_DEBUG_THREADS_STATE_1"_T.data()) + '\0' + + std::string("VIEW_DEBUG_THREADS_STATE_2"_T.data()) + '\0' + + std::string("VIEW_DEBUG_THREADS_STATE_3"_T.data()) + '\0' + + std::string("VIEW_DEBUG_THREADS_STATE_4"_T.data()); + ImGui::Combo("VIEW_DEBUG_THREADS_STATE"_T.data(), (int*)&selected_thread->m_context.m_state, thread_states.c_str()); //Script Pointer - ImGui::Text("Script Pointer: "); + ImGui::Text(std::format("{}: ", "VIEW_DEBUG_THREADS_SCRIPT_POINTER"_T).c_str()); ImGui::SameLine(); if (ImGui::Button(std::format("0x{:X}", (DWORD64)selected_thread).c_str())) ImGui::SetClipboardText(std::format("0x{:X}", (DWORD64)selected_thread).c_str()); //Stack Pointer - ImGui::Text("Stack Pointer: "); + ImGui::Text(std::format("{}: ", "VIEW_DEBUG_THREADS_STACK_POINTER"_T).c_str()); ImGui::SameLine(); if (ImGui::Button(std::format("0x{:X}", (DWORD64)selected_thread->m_stack).c_str())) ImGui::SetClipboardText(std::format("0x{:X}", (DWORD64)selected_thread->m_stack).c_str()); ImGui::SameLine(); - ImGui::Text("Internal Stack Pointer: %d Stack Size: %d", - selected_thread->m_context.m_stack_pointer, selected_thread->m_context.m_stack_size); + ImGui::Text(std::format("{}: {} {}: {}", + "VIEW_DEBUG_THREADS_INTERNAL_STACK_POINTER"_T, selected_thread->m_context.m_stack_pointer, + "VIEW_DEBUG_THREADS_STACK_SIZE"_T, selected_thread->m_context.m_stack_size) + .c_str()); //Instruction Pointer - ImGui::Text("Instruction Pointer: %X", selected_thread->m_context.m_instruction_pointer); + ImGui::Text(std::format("{}: 0x{:X}","VIEW_DEBUG_THREADS_INSTRUCTION_POINTER"_T, selected_thread->m_context.m_instruction_pointer).c_str()); if (selected_thread->m_context.m_state == rage::eThreadState::killed) - ImGui::Text("Exit Reason: %s", selected_thread->m_exit_message); + { + ImGui::Text(std::format("{}: {}","VIEW_DEBUG_THREADS_EXIT_REASON"_T, selected_thread->m_exit_message).c_str()); + } else { - if (ImGui::Button("Kill")) + if (ImGui::Button("VIEW_DEBUG_THREADS_KILL"_T.data())) { if (selected_thread->m_context.m_stack_size != 0) selected_thread->kill(); @@ -133,9 +141,9 @@ namespace big } } - components::small_text("New"); + components::small_text("VIEW_DEBUG_THREADS_NEW"_T); - if (ImGui::BeginCombo("Script", selected_script)) + if (ImGui::BeginCombo("VIEW_DEBUG_THREADS_SCRIPT"_T.data(), selected_script)) { for (auto script : all_script_names) { @@ -150,7 +158,7 @@ namespace big ImGui::EndCombo(); } - if (ImGui::BeginCombo("Stack Size", selected_stack_size_str)) + if (ImGui::BeginCombo("VIEW_DEBUG_THREADS_STACK_SIZE"_T.data(), selected_stack_size_str)) { for (auto& p : stack_sizes) { @@ -170,9 +178,9 @@ namespace big ImGui::EndCombo(); } - ImGui::Text("Free Stacks: %d", free_stacks); + ImGui::Text(std::format("{}: {}", "VIEW_DEBUG_THREADS_FREE_STACKS"_T, free_stacks).c_str()); - components::button("Start", [] { + components::button("SETTINGS_NOTIFY_GTA_THREADS_START"_T, [] { auto hash = rage::joaat(selected_script); if (!SCRIPT::DOES_SCRIPT_WITH_NAME_HASH_EXIST(hash)) @@ -182,7 +190,7 @@ namespace big if (MISC::GET_NUMBER_OF_FREE_STACKS_OF_THIS_SIZE(selected_stack_size) == 0) { - g_notification_service->push_warning("Script Launcher", "No free stacks for this stack size"); + g_notification_service->push_warning("VIEW_DEBUG_THREADS"_T.data(), "VIEW_DEBUG_THREADS_NO_FREE_STACKS"_T.data()); } while (!SCRIPT::HAS_SCRIPT_WITH_NAME_HASH_LOADED(hash)) @@ -200,13 +208,13 @@ namespace big ImGui::SameLine(); - components::button("Start With Launcher", [] { + components::button("VIEW_DEBUG_THREADS_START_WITH_LAUNCHER"_T, [] { auto hash = rage::joaat(selected_script); auto idx = scripts::launcher_index_from_hash(hash); if (idx == -1) { - g_notification_service->push_warning("Script Launcher", "This script cannot be started using am_launcher"); + g_notification_service->push_warning("VIEW_DEBUG_THREADS"_T.data(), "VIEW_DEBUG_THREADS_FAILED_WITH_LAUNCHER"_T.data()); return; } diff --git a/src/views/debug/views_debug_logs.cpp b/src/views/debug/views_debug_logs.cpp index 06f2ada4..2ebaa66a 100644 --- a/src/views/debug/views_debug_logs.cpp +++ b/src/views/debug/views_debug_logs.cpp @@ -9,7 +9,7 @@ namespace big if (ImGui::BeginTabItem("DEBUG_TABS_LOGS"_T.data())) { ImGui::Checkbox("DEBUG_LOG_METRICS"_T.data(), &g.debug.logs.metric_logs); - ImGui::Checkbox("Log Packets", &g.debug.logs.packet_logs);// TODO: translate + ImGui::Checkbox("VIEW_DEBUG_LOGS_LOG_PACKETS"_T.data(), &g.debug.logs.packet_logs); ImGui::Checkbox("DEBUG_LOG_NATIVE_SCRIPT_HOOKS"_T.data(), &g.debug.logs.script_hook_logs); if (ImGui::TreeNode("DEBUG_LOG_TREE_SCRIPT_EVENT"_T.data())) @@ -32,7 +32,7 @@ namespace big ImGui::EndListBox(); } - ImGui::Checkbox("Block All", &g.debug.logs.script_event.block_all); + ImGui::Checkbox("VIEW_DEBUG_LOGS_BLOCK_ALL"_T.data(), &g.debug.logs.script_event.block_all); ImGui::TreePop(); } diff --git a/src/views/esp/view_esp.cpp b/src/views/esp/view_esp.cpp index c75b3234..c3018428 100644 --- a/src/views/esp/view_esp.cpp +++ b/src/views/esp/view_esp.cpp @@ -107,7 +107,7 @@ namespace big (plyr->get_ped()->m_ped_task_flag & (uint32_t)ePedTask::TASK_DRIVING) && (player_vehicle->m_damage_bits & (uint32_t)eEntityProofs::GOD)) { - mode_str =+ "Vehicle God"; + mode_str =+ "VEHICLE_GOD"_T.data(); } if (!mode_str.empty()) diff --git a/src/views/network/missions/cp_collection.hpp b/src/views/network/missions/cp_collection.hpp index 9d94b01e..b1e0118d 100644 --- a/src/views/network/missions/cp_collection.hpp +++ b/src/views/network/missions/cp_collection.hpp @@ -7,21 +7,22 @@ namespace big { inline void render_cp_collection_ui() { - components::sub_title("Checkpoints"); + components::sub_title("VIEW_NET_MISSIONS_CHECKPOINTS"_T); - components::button("Start Event##cp_collection", [] { + ImGui::PushID(1); + components::button("VIEW_NET_MISSIONS_START_EVENT"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_cp_collection"))) if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_cp_collection"))) *script_local(script->m_stack, scr_locals::am_cp_collection::broadcast_idx).at(667).as() = 0; }); ImGui::SameLine(); - components::button("Finish Event##cp_collection", [] { + components::button("VIEW_NET_MISSIONS_FINISH_EVENT"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_cp_collection"))) if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_cp_collection"))) *script_local(script->m_stack, scr_locals::am_cp_collection::broadcast_idx).at(661).as() = 0; }); - - components::button("Win Event", [] { + ImGui::PopID(); + components::button("VIEW_NET_MISSIONS_WIN_EVENT"_T, [] { if (auto checkpoints = gta_util::find_script_thread(RAGE_JOAAT("am_cp_collection"))) *script_local(checkpoints->m_stack, scr_locals::am_cp_collection::player_broadcast_idx) .at(((CGameScriptHandlerNetComponent*)checkpoints->m_net_component)->m_local_participant_index, 5) @@ -39,7 +40,7 @@ namespace big } }); ImGui::SameLine(); - components::button("Scramble Checkpoints", [] { + components::button("VIEW_NET_MISSIONS_SCRAMBLE_CHECKPOINTS"_T, [] { std::vector active_player_positions; for (auto& plyr : g_player_service->players()) diff --git a/src/views/network/missions/criminal_damage.hpp b/src/views/network/missions/criminal_damage.hpp index 5467b686..d2ca2f89 100644 --- a/src/views/network/missions/criminal_damage.hpp +++ b/src/views/network/missions/criminal_damage.hpp @@ -6,20 +6,22 @@ namespace big { inline void render_criminal_damage_ui() { - components::sub_title("Criminal Damage"); - components::button("Start Event##criminal_damage", [] { + components::sub_title("CRIMINAL_DAMAGE"_T); + ImGui::PushID(2); + components::button("VIEW_NET_MISSIONS_START_EVENT"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_criminal_damage"))) if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_criminal_damage"))) *script_local(script->m_stack, scr_locals::am_criminal_damage::broadcast_idx).at(43).as() = 0; }); ImGui::SameLine(); - components::button("Finish Event##criminal_damage", [] { + components::button("VIEW_NET_MISSIONS_FINISH_EVENT"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_criminal_damage"))) if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_criminal_damage"))) *script_local(script->m_stack, scr_locals::am_criminal_damage::broadcast_idx).at(39).as() = 0; }); + ImGui::PopID(); - components::button("Max Score", [] { + components::button("VIEW_NET_MISSIONS_MAX_SCORE"_T, [] { if (auto criminal_damage = gta_util::find_script_thread(RAGE_JOAAT("am_criminal_damage"))) *script_local(criminal_damage->m_stack, scr_locals::am_criminal_damage::score_idx).as() = 999'999'999; }); diff --git a/src/views/network/missions/hunt_the_beast.hpp b/src/views/network/missions/hunt_the_beast.hpp index da6e4c2b..cb901503 100644 --- a/src/views/network/missions/hunt_the_beast.hpp +++ b/src/views/network/missions/hunt_the_beast.hpp @@ -40,9 +40,9 @@ namespace big *script_local(hunt_the_beast_script_thread, scr_locals::am_hunt_the_beast::broadcast_idx).at(1).at(6).as(); if (auto beast = g_player_service->get_by_id(beast_player_index)) { - ImGui::Text("%s is the beast", g_player_service->get_by_id(beast_player_index).get()->get_name()); + ImGui::Text(std::format("{} {}", g_player_service->get_by_id(beast_player_index).get()->get_name(), "VIEW_NET_MISSIONS_IS_THE_BEAST"_T).c_str()); ImGui::SameLine(); - components::button("Set as selected", [beast] { + components::button("VIEW_NET_MISSIONS_SET_AS_SELECTED"_T, [beast] { g_player_service->set_selected(beast); }); @@ -60,16 +60,13 @@ namespace big for (int i = 0; i < (num_landmarks ? *num_landmarks : 10); i++) { auto script_local_land_mark = *beast_land_mark_list.at(i, 3).as(); - std::string label = std::format("TP To Landmark {} at {} {} {}", - i, - script_local_land_mark.x, - script_local_land_mark.y, - script_local_land_mark.z); - - if (ImGui::Selectable(label.data(), i == get_land_mark_beast_is_closest_to(g_player_service->get_by_id(beast_player_index), beast_land_mark_list, num_landmarks ? *num_landmarks : 10))) + auto label = std::vformat("VIEW_NET_MISSIONS_TP_TO_LANDMARK"_T, std::make_format_args(i, script_local_land_mark.x, script_local_land_mark.y, script_local_land_mark.z)); + if (ImGui::Selectable(label.c_str(), i == get_land_mark_beast_is_closest_to(g_player_service->get_by_id(beast_player_index), beast_land_mark_list, num_landmarks ? *num_landmarks : 10))) + { g_fiber_pool->queue_job([script_local_land_mark, beast] { teleport::teleport_player_to_coords(g.player.spectating ? beast : g_player_service->get_self(), script_local_land_mark); }); + } } ImGui::EndListBox(); } diff --git a/src/views/network/missions/king_of_the_castle.hpp b/src/views/network/missions/king_of_the_castle.hpp index 8e6a693f..1c223a98 100644 --- a/src/views/network/missions/king_of_the_castle.hpp +++ b/src/views/network/missions/king_of_the_castle.hpp @@ -4,56 +4,36 @@ namespace big { inline void render_king_of_the_castle_ui() { - components::sub_title("King Of The Castle"); - components::button("Complete Event##kotc", [] { + components::sub_title("KING_OF_THE_CASTLE"_T); + ImGui::PushID(3); + components::button("VIEW_NET_MISSIONS_START_EVENT"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle"))) if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle"))) *script_local(script->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx).at(1).at(1).as() = 0; }); ImGui::SameLine(); - components::button("Expire Event (if possible)##kotc", [] { + components::button("VIEW_NET_MISSIONS_FINISH_EVENT"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle"))) if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle"))) *script_local(script->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx).at(1).at(3).as() = 0; }); + ImGui::PopID(); - components::button("Become The King##kotc", [] { + components::button("VIEW_NET_MISSIONS_KOTC_BECOME_THE_KING"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle"))) { if (auto kotc = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle"))) { - *script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx) - .at(6) - .at(0, 204) - .at(74) - .at(0, 4) - .as() = 0; - *script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx) - .at(6) - .at(0, 204) - .at(74) - .at(0, 4) - .at(1) - .as() = self::id; - *script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx) - .at(6) - .at(0, 204) - .at(74) - .at(0, 4) - .at(2) - .as() = self::id; - *script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx) - .at(6) - .at(0, 204) - .at(74) - .at(0, 4) - .at(3) - .as() = 999999999.0f; + auto kotc_king = script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx).at(6).at(0, 204).at(74).at(0, 4); + *kotc_king.as() = 0; + *kotc_king.at(1).as() = self::id; + *kotc_king.at(2).as() = self::id; + *kotc_king.at(3).as() = 999999999.0f; } } }); ImGui::SameLine(); - components::button("Dethrone Everyone##kotc", [] { + components::button("VIEW_NET_MISSIONS_KOTC_DETHRONE_EVERYONE"_T, [] { if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle"))) { if (auto kotc = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle"))) diff --git a/src/views/network/view_missions.cpp b/src/views/network/view_missions.cpp index ac5a05e5..95a7df81 100644 --- a/src/views/network/view_missions.cpp +++ b/src/views/network/view_missions.cpp @@ -28,22 +28,22 @@ namespace big { mission_found = false; - components::sub_title("Event Starter"); + components::sub_title("VIEW_NET_MISSIONS_EVENT_STARTER"_T); ImGui::BeginGroup(); - components::button("Hot Target", [] { + components::button("VIEW_NET_MISSIONS_HOT_TARGET"_T, [] { scripts::start_launcher_script(36); }); - components::button("Kill List", [] { + components::button("KILL_LIST"_T, [] { scripts::start_launcher_script(37); }); - components::button("Checkpoints", [] { + components::button("VIEW_NET_MISSIONS_CHECKPOINTS"_T, [] { scripts::start_launcher_script(39); }); - components::button("Challenges", [] { + components::button("CHALLENGES"_T, [] { scripts::start_launcher_script(40); }); - components::button("Penned In", [] { + components::button("PENNED_IN"_T, [] { scripts::start_launcher_script(41); }); ImGui::EndGroup(); @@ -51,19 +51,19 @@ namespace big ImGui::SameLine(); ImGui::BeginGroup(); - components::button("Hot Property", [] { + components::button("HOT_PROPERTY"_T, [] { scripts::start_launcher_script(43); }); - components::button("King Of The Castle", [] { + components::button("KING_OF_THE_CASTLE"_T, [] { scripts::start_launcher_script(45); }); - components::button("Criminal Damage", [] { + components::button("CRIMINAL_DAMAGE"_T, [] { scripts::start_launcher_script(46); }); - components::button("Hunt The Beast", [] { + components::button("HUNT_THE_BEAST"_T, [] { scripts::start_launcher_script(47); }); - components::button("Business Battles", [] { + components::button("BUSINESS_BATTLES"_T, [] { scripts::start_launcher_script(114); }); ImGui::EndGroup(); @@ -71,50 +71,50 @@ namespace big ImGui::SameLine(); ImGui::BeginGroup(); - components::button("One-On-One Deathmatch", [] { + components::button("VIEW_NET_MISSIONS_ONE_ON_ONE_DEATHMATCH"_T, [] { scripts::start_launcher_script(204); }); - components::button("Impromptu Race", [] { + components::button("VIEW_NET_MISSIONS_IMPROMTU_RACE"_T, [] { scripts::start_launcher_script(16); }); - components::button("Flight School", [] { + components::button("FLIGHT_SCHOOL"_T, [] { scripts::start_launcher_script(203); }); - components::button("Golf", [] { + components::button("GOLF"_T, [] { scripts::start_launcher_script(200); }); - components::button("Tutorial", [] { + components::button("TUTORIAL"_T, [] { scripts::start_launcher_script(20); }); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Only works on joining players"); + ImGui::SetTooltip("VIEW_NET_MISSIONS_ONLY_WORK_ON_JOINING"_T.data()); ImGui::EndGroup(); ImGui::SameLine(); ImGui::BeginGroup(); - components::button("Gunslinger", [] { + components::button("VIEW_NET_MISSIONS_GUNSLINGER"_T, [] { scripts::start_launcher_script(218); }); - components::button("Space Monkey", [] { + components::button("VIEW_NET_MISSIONS_SPACE_MONKEY"_T, [] { scripts::start_launcher_script(223); }); - components::button("Wizard", [] { + components::button("VIEW_NET_MISSIONS_WIZARD"_T, [] { scripts::start_launcher_script(219); }); - components::button("QUB3D", [] { + components::button("VIEW_NET_MISSIONS_QUB3D"_T, [] { scripts::start_launcher_script(224); }); - components::button("Camhedz", [] { + components::button("VIEW_NET_MISSIONS_CAMHEDZ"_T, [] { scripts::start_launcher_script(225); }); ImGui::EndGroup(); ImGui::BeginGroup(); - components::button("Ghost Hunt", [] { + components::button("VIEW_NET_MISSIONS_GHOST_HUNT"_T, [] { scripts::start_launcher_script(174); }); - components::button("Possesed Animals", [] { + components::button("VIEW_NET_MISSIONS_POSESSED_ANIMALS"_T, [] { scripts::start_launcher_script(179); }); ImGui::EndGroup(); @@ -135,7 +135,7 @@ namespace big if (!mission_found) { - ImGui::Text("No active mission"); + ImGui::Text("VIEW_NET_MISSIONS_NO_ACTIVE_MISSION"_T.data()); } } } \ No newline at end of file diff --git a/src/views/network/view_network.cpp b/src/views/network/view_network.cpp index 42a0eee9..3800ebc1 100644 --- a/src/views/network/view_network.cpp +++ b/src/views/network/view_network.cpp @@ -21,7 +21,7 @@ namespace big void render_rid_joiner() { ImGui::BeginGroup(); - components::sub_title("RID_JOINER"_T.data()); + components::sub_title("RID_JOINER"_T); if (ImGui::BeginListBox("##ridjoiner", get_listbox_dimensions())) { static uint64_t rid = 0; @@ -50,7 +50,7 @@ namespace big if (g_pointers->m_gta.m_decode_session_info(&info, base64, nullptr)) session::join_session(info); else - g_notification_service->push_error("Join", "Session info is invalid"); + g_notification_service->push_error("RID_JOINER"_T.data(), "VIEW_NET_RIDJOINER_SESSION_INFO_INVALID"_T.data()); }); components::button("COPY_SESSION_INFO"_T, [] { @@ -84,10 +84,10 @@ namespace big ImGui::Spacing(); - for (const auto& session_type : sessions) + for (const auto& [id, name] : sessions) { - components::selectable(session_type.name, false, [&session_type] { - session::join_type(session_type.id); + components::selectable(name, false, [&id] { + session::join_type(id); }); } ImGui::EndListBox(); @@ -100,7 +100,7 @@ namespace big { ImGui::BeginGroup(); - components::sub_title("MISC"_T.data()); + components::sub_title("DEBUG_TAB_MISC"_T); if (ImGui::BeginListBox("##miscsession", get_listbox_dimensions())) { ImGui::Checkbox("JOIN_IN_SCTV"_T.data(), &g.session.join_in_sctv_slots); @@ -137,9 +137,9 @@ namespace big &g.session.unhide_players_from_player_list, "REVEAL_HIDDEN_PLAYERS_DESC"_T.data()); - components::command_button<"sextall">({}, "SEND_SEXT"_T.data()); + components::command_button<"sextall">({}, "SEND_SEXT"_T); ImGui::SameLine(); - components::command_button<"fakebanall">({}, "FAKE_BAN_MESSAGE"_T.data()); + components::command_button<"fakebanall">({}, "FAKE_BAN_MESSAGE"_T); ImGui::EndListBox(); } @@ -158,7 +158,7 @@ namespace big ImGui::Checkbox("AUTO_KICK_CHAT_SPAMMERS"_T.data(), &g.session.kick_chat_spammers); ImGui::Checkbox("LOG_CHAT_MSG"_T.data(), &g.session.log_chat_messages); ImGui::Checkbox("LOG_TXT_MSG"_T.data(), &g.session.log_text_messages); - components::input_text_with_hint("##message", "Chat message", msg, sizeof(msg)); + components::input_text_with_hint("##message", "VIEW_NET_CHAT_MESSAGE"_T, msg, sizeof(msg)); ImGui::Checkbox("IS_TEAM"_T.data(), &g.session.is_team); ImGui::SameLine(); @@ -178,7 +178,7 @@ namespace big ImGui::Checkbox("CHAT_COMMANDS"_T.data(), &g.session.chat_commands); if (g.session.chat_commands) { - components::small_text("DEFAULT_CMD_PERMISSIONS"_T.data()); + components::small_text("DEFAULT_CMD_PERMISSIONS"_T); if (ImGui::BeginCombo("##defualtchatcommands", COMMAND_ACCESS_LEVELS[g.session.chat_command_default_access_level])) { for (const auto& [type, name] : COMMAND_ACCESS_LEVELS) @@ -208,7 +208,7 @@ namespace big { ImGui::BeginGroup(); - components::sub_title("GLOBALS"_T.data()); + components::sub_title("GLOBALS"_T); if (ImGui::BeginListBox("##globals", get_listbox_dimensions())) { static int global_wanted_level = 0; @@ -216,14 +216,14 @@ namespace big ImGui::Checkbox("OFF_THE_RADAR"_T.data(), &g.session.off_radar_all); ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.session.never_wanted_all); ImGui::Checkbox("SEMI_GODMODE"_T.data(), &g.session.semi_godmode_all); - ImGui::Checkbox("Fix Vehicle", &g.session.vehicle_fix_all); + ImGui::Checkbox("VIEW_NET_SESSION_FIX_VEHICLE"_T.data(), &g.session.vehicle_fix_all); ImGui::Checkbox("EXPLOSION_KARMA"_T.data(), &g.session.explosion_karma); ImGui::Checkbox("DAMAGE_KARMA"_T.data(), &g.session.damage_karma); ImGui::Checkbox("DISABLE_PEDS"_T.data(), &g.session.disable_peds); ImGui::Checkbox("DISABLE_TRAFFIC"_T.data(), &g.session.disable_traffic); ImGui::Checkbox("FORCE_THUNDER"_T.data(), &g.session.force_thunder); - components::small_text("WANTED_LVL"_T.data()); + components::small_text("WANTED_LVL"_T); ImGui::SetNextItemWidth(150); if (ImGui::SliderInt("##wantedlevel", &global_wanted_level, 0, 5)) { @@ -240,7 +240,7 @@ namespace big ImGui::EndListBox(); } - components::small_text("WARP_TIME"_T.data()); + components::small_text("WARP_TIME"_T); components::button("PLUS_1_MINUTE"_T, [] { toxic::warp_time_forward_all(60 * 1000); @@ -321,7 +321,7 @@ namespace big ImGui::Spacing(); - components::sub_title("PLAYERS"_T.data()); + components::sub_title("PLAYERS"_T); components::options_modal( "GRIEFING"_T.data(), [] { @@ -357,13 +357,13 @@ namespace big components::command_button<"ceoraidall">({}); ImGui::SameLine(); - components::button("TRIGGER_MC_RAID"_T.data(), [] { + components::button("TRIGGER_MC_RAID"_T, [] { g_player_service->iterate([](auto& plyr) { toxic::start_activity(plyr.second, eActivityType::BikerDefend); }); }); ImGui::SameLine(); - components::button("TRIGGER_BUNKER_RAID"_T.data(), [] { + components::button("TRIGGER_BUNKER_RAID"_T, [] { g_player_service->iterate([](auto& plyr) { toxic::start_activity(plyr.second, eActivityType::GunrunningDefend); }); @@ -498,11 +498,9 @@ namespace big ImGui::Checkbox("RANDOMIZE_CEO_COLORS"_T.data(), &g.session.randomize_ceo_colors); ImGui::SameLine(); - components::script_patch_checkbox("BLOCK_MUGGERS"_T.data(), &g.session.block_muggers, "BLOCK_MUGGERS_DESC"_T.data()); + components::script_patch_checkbox("BLOCK_MUGGERS"_T, &g.session.block_muggers, "BLOCK_MUGGERS_DESC"_T.data()); - components::script_patch_checkbox("BLOCK_CEO_RAIDS"_T.data(), - &g.session.block_ceo_raids, - "BLOCK_CEO_RAIDS_DESC"_T.data()); + components::script_patch_checkbox("BLOCK_CEO_RAIDS"_T, &g.session.block_ceo_raids, "BLOCK_CEO_RAIDS_DESC"_T); ImGui::EndGroup(); } diff --git a/src/views/network/view_player_database.cpp b/src/views/network/view_player_database.cpp index ad7ecfc7..f72d3fc0 100644 --- a/src/views/network/view_player_database.cpp +++ b/src/views/network/view_player_database.cpp @@ -126,7 +126,7 @@ namespace big if (ImGui::InputScalar("RID"_T.data(), ImGuiDataType_S64, ¤t_player->rockstar_id) || ImGui::Checkbox("IS_MODDER"_T.data(), ¤t_player->is_modder) || ImGui::Checkbox("BLOCK_JOIN"_T.data(), ¤t_player->block_join) - || ImGui::Checkbox("Track Player", ¤t_player->notify_online)) + || ImGui::Checkbox("VIEW_NET_PLAYER_DB_TRACK_PLAYER"_T.data(), ¤t_player->notify_online)) { if (current_player->rockstar_id != selected->rockstar_id) g_player_database_service->update_rockstar_id(selected->rockstar_id, current_player->rockstar_id); @@ -186,7 +186,7 @@ namespace big } } - if (ImGui::InputTextMultiline("Notes", note_buffer, sizeof(note_buffer))) + if (ImGui::InputTextMultiline("VIEW_NET_PLAYER_DB_NOTES"_T.data(), note_buffer, sizeof(note_buffer))) { current_player->notes = note_buffer; notes_dirty = true; @@ -194,13 +194,13 @@ namespace big if (ImGui::IsItemActive()) g.self.hud.typing = TYPING_TICKS; - ImGui::Checkbox("Join Redirect", ¤t_player->join_redirect); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_JOIN_REDIRECT"_T.data(), ¤t_player->join_redirect); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Anyone trying to join you will join this player instead if they are active. The preference slider will control redirect priority if multiple players with join redirect are active"); + ImGui::SetTooltip("VIEW_NET_PLAYER_DB_JOIN_REDIRECT_DESC"_T.data()); if (current_player->join_redirect) { - ImGui::SliderInt("Preference", ¤t_player->join_redirect_preference, 1, 10); + ImGui::SliderInt("VIEW_NET_PLAYER_DB_PREFERENCE"_T.data(), ¤t_player->join_redirect_preference, 1, 10); } components::button("JOIN_SESSION"_T, [] { @@ -221,23 +221,23 @@ namespace big }); }; - ImGui::Text("Session Type: %s", player_database_service::get_session_type_str(selected->session_type)); + ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_SESSION_TYPE"_T, player_database_service::get_session_type_str(selected->session_type)).c_str()); if (selected->session_type != GSType::Invalid && selected->session_type != GSType::Unknown) { - ImGui::Text("Is Host Of Session: %s", selected->is_host_of_session ? "Yes" : "No"); - ImGui::Text("Is Spectating: %s", selected->is_spectating ? "Yes" : "No"); - ImGui::Text("In Job Lobby: %s", selected->transition_session_id != -1 ? "Yes" : "No"); - ImGui::Text("Is Host Of Job Lobby: %s", selected->is_host_of_transition_session ? "Yes" : "No"); - ImGui::Text("Current Mission Type: %s", player_database_service::get_game_mode_str(selected->game_mode)); + ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IS_HOST_OF_SESSION"_T, selected->is_host_of_session ? "YES"_T : "NO"_T).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IS_SPECTATING"_T, selected->is_spectating ? "YES"_T : "NO"_T).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IN_JOB_LOBBY"_T, selected->transition_session_id != -1 ? "YES"_T : "NO"_T).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IS_HOST_OF_JOB_LOBBY"_T, selected->is_host_of_transition_session ? "YES"_T : "NO"_T).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_CURRENT_MISSION_TYPE"_T, player_database_service::get_game_mode_str(selected->game_mode)).c_str()); if (selected->game_mode != GameMode::None && player_database_service::can_fetch_name(selected->game_mode)) { - ImGui::Text("Current Mission Name: %s", selected->game_mode_name.c_str()); - if ((selected->game_mode_name == "Unknown" || selected->game_mode_name.empty()) + ImGui::Text("VIEW_NET_PLAYER_DB_CURRENT_MISSION_TYPE"_T.data(), selected->game_mode_name.c_str()); + if ((selected->game_mode_name == "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data() || selected->game_mode_name.empty()) && !selected->game_mode_id.empty()) { ImGui::SameLine(); - components::button("Fetch", [] { + components::button("VIEW_DEBUG_LOCALS_FETCH"_T, [] { current_player->game_mode_name = player_database_service::get_name_by_content_id(current_player->game_mode_id); }); @@ -271,9 +271,9 @@ namespace big if (ImGui::BeginPopupModal("##removeall")) { - ImGui::Text("Are you sure?"); + ImGui::Text("VIEW_NET_PLAYER_DB_ARE_YOU_SURE"_T.data()); - if (ImGui::Button("Yes")) + if (ImGui::Button("YES"_T.data())) { g_player_database_service->set_selected(nullptr); g_player_database_service->get_players().clear(); @@ -282,7 +282,7 @@ namespace big ImGui::CloseCurrentPopup(); } ImGui::SameLine(); - if (ImGui::Button("No")) + if (ImGui::Button("NO"_T.data())) { ImGui::CloseCurrentPopup(); } @@ -296,21 +296,21 @@ namespace big g_player_database_service->update_player_states(); }); - if (ImGui::TreeNode("Player Tracking")) + if (ImGui::TreeNode("VIEW_NET_PLAYER_DB_PLAYER_TRACKING"_T.data())) { - if (components::command_checkbox<"player_db_auto_update_states">("Enable")) + if (components::command_checkbox<"player_db_auto_update_states">("ENABLED"_T)) g_player_database_service->start_update_loop(); - ImGui::Checkbox("Notify When Online", &g.player_db.notify_when_online); - ImGui::Checkbox("Notify When Joinable", &g.player_db.notify_when_joinable); - ImGui::Checkbox("Notify When Unjoinable", &g.player_db.notify_when_unjoinable); - ImGui::Checkbox("Notify When Offline", &g.player_db.notify_when_offline); - ImGui::Checkbox("Notify On Session Type Change", &g.player_db.notify_on_session_type_change); - ImGui::Checkbox("Notify On Session Change", &g.player_db.notify_on_session_change); - ImGui::Checkbox("Notify On Spectator Change", &g.player_db.notify_on_spectator_change); - ImGui::Checkbox("Notify On Become Host", &g.player_db.notify_on_become_host); - ImGui::Checkbox("Notify On Job Lobby Change", &g.player_db.notify_on_transition_change); - ImGui::Checkbox("Notify On Mission Change", &g.player_db.notify_on_mission_change); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_ONLINE"_T.data(), &g.player_db.notify_when_online); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_JOINABLE"_T.data(), &g.player_db.notify_when_joinable); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_UNJOINABLE"_T.data(), &g.player_db.notify_when_unjoinable); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_OFFLINE"_T.data(), &g.player_db.notify_when_offline); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_SESSION_TYPE_CHANGE"_T.data(), &g.player_db.notify_on_session_type_change); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_SESSION_CHANGE"_T.data(), &g.player_db.notify_on_session_change); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_SPECTATOR_CHANGE"_T.data(), &g.player_db.notify_on_spectator_change); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_BECOME_HOST"_T.data(), &g.player_db.notify_on_become_host); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_JOB_LOBBY_CHANGE"_T.data(), &g.player_db.notify_on_transition_change); + ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_MISSION_CHANGE"_T.data(), &g.player_db.notify_on_mission_change); ImGui::TreePop(); } @@ -334,14 +334,14 @@ namespace big g_thread_pool->push([] { if (!g_api_service->get_rid_from_username(new_name, *(uint64_t*)&new_rockstar_id)) { - g_notification_service->push_error("New Player DB Entry", std::format("No user '{}' called could be found.", new_name)); + g_notification_service->push_error("GUI_TAB_PLAYER_DATABASE"_T.data(), std::vformat("VIEW_NET_PLAYER_DB_NO_USER_CAN_BE_FOUND"_T, std::make_format_args(new_name))); new_rockstar_id = 0; } }); } if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Do you know only the name of someone and not their Rockstar ID? Just fill in the username and click \"search\"."); + ImGui::SetTooltip("VIEW_NET_PLAYER_DB_TOOLTIP"_T.data()); } } } diff --git a/src/views/network/view_session_browser.cpp b/src/views/network/view_session_browser.cpp index 77933ee6..187726ba 100644 --- a/src/views/network/view_session_browser.cpp +++ b/src/views/network/view_session_browser.cpp @@ -18,8 +18,7 @@ namespace big static char name_buf[32]; static char search[64]; static char session_info[0x100]{}; - - ImGui::Text(std::format("Total sessions found: {}", g_matchmaking_service->get_num_found_sessions()).data()); + ImGui::Text(std::format("{}: {}", "VIEW_SESSION_TOTAL_SESSIONS_FOUND"_T.data(), g_matchmaking_service->get_num_found_sessions()).c_str()); ImGui::SetNextItemWidth(300.f); @@ -42,12 +41,11 @@ namespace big if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(std::format("Num Players: {}\nRegion: {}\nLanguage: {}\nHost: {}", - session.attributes.player_count, - regions[session.attributes.region].name, - languages[session.attributes.language].name, - session.info.m_net_player_data.m_gamer_handle.m_rockstar_id) - .c_str()); + auto tool_tip = std::format("{}: {}\n{}: {}\n{}: {}\n{}: {}", "SESSION_BROWSER_NUM_PLAYERS"_T, session.attributes.player_count, + "REGION"_T, regions[session.attributes.region].name, + "LANGUAGE"_T, languages[session.attributes.language].name, + "SESSION_BROWSER_HOST_RID"_T, session.info.m_net_player_data.m_gamer_handle.m_rockstar_id); + ImGui::SetTooltip(tool_tip.c_str()); } } } @@ -66,13 +64,13 @@ namespace big { auto& session = g_matchmaking_service->get_found_sessions()[selected_session_idx]; - ImGui::Text("SESSION_BROWSER_NUM_PLAYERS"_T.data(), session.attributes.player_count); - ImGui::Text("SESSION_BROWSER_DISCRIMINATOR"_T.data(), session.attributes.discriminator); - ImGui::Text("SESSION_BROWSER_REGION"_T.data(), regions[session.attributes.region].name); - ImGui::Text("SESSION_BROWSER_LANGUAGE"_T.data(), languages[session.attributes.language].name); + ImGui::Text(std::format("{}: {}", "SESSION_BROWSER_NUM_PLAYERS"_T, session.attributes.player_count).c_str()); + ImGui::Text(std::format("{}: 0x{:X}", "SESSION_BROWSER_DISCRIMINATOR"_T, session.attributes.discriminator).c_str()); + ImGui::Text(std::format("{}: {}", "REGION"_T, regions[session.attributes.region].name).c_str()); + ImGui::Text(std::format("{}: {}", "LANGUAGE"_T, languages[session.attributes.language].name).c_str()); auto& data = session.info.m_net_player_data; - ImGui::Text("SESSION_BROWSER_HOST_RID"_T.data(), data.m_gamer_handle.m_rockstar_id); + ImGui::Text(std::format("{}: {}", "SESSION_BROWSER_HOST_RID"_T, data.m_gamer_handle.m_rockstar_id).c_str()); components::button("COPY_SESSION_INFO"_T, [] { ImGui::SetClipboardText(session_info); @@ -155,7 +153,8 @@ namespace big if (g.session_browser.pool_filter_enabled) { ImGui::SameLine(); - ImGui::Combo("###pooltype", &g.session_browser.pool_filter, "Normal\0Bad Sport"); + static const std::string pool_filter_options = std::string("NORMAL"_T.data()) + '\0' + std::string("BAD_SPORT"_T.data()); + ImGui::Combo("###pooltype", &g.session_browser.pool_filter, pool_filter_options.c_str()); } ImGui::TreePop(); @@ -163,9 +162,11 @@ namespace big if (ImGui::TreeNode("SORTING"_T.data())) { - ImGui::Combo("SORT_BY"_T.data(), &g.session_browser.sort_method, "Off\0Player Count"); + static const std::string sort_by_options = std::string("OFF"_T.data()) + '\0' + std::string("PLAYER_COUNT"_T.data()); + static const std::string sort_direction_options = std::string("ASCENDING"_T.data()) + '\0' + std::string("DESCENDING"_T.data()); + ImGui::Combo("SORT_BY"_T.data(), &g.session_browser.sort_method, sort_by_options.c_str()); if (g.session_browser.sort_method != 0) - ImGui::Combo("DIRECTION"_T.data(), &g.session_browser.sort_direction, "Ascending\0Descending"); + ImGui::Combo("DIRECTION"_T.data(), &g.session_browser.sort_direction, sort_direction_options.c_str()); ImGui::TreePop(); } diff --git a/src/views/network/view_spoofing.cpp b/src/views/network/view_spoofing.cpp index 185f748d..79e2e996 100644 --- a/src/views/network/view_spoofing.cpp +++ b/src/views/network/view_spoofing.cpp @@ -54,7 +54,8 @@ namespace big if (g.spoofing.spoof_bad_sport) { ImGui::SameLine(); - if (ImGui::Combo("###badsport_select", &g.spoofing.badsport_type, "Clean Player\0Dirty Player\0Bad Sport")) + static const std::string badsport_options = std::string("CLEAN_PLAYER"_T.data()) + '\0' + std::string("VIEW_SPOOFING_DIRTY_PLAYER"_T.data()) + '\0' + std::string("BAD_SPORT"_T.data()); + if (ImGui::Combo("###badsport_select", &g.spoofing.badsport_type, badsport_options.c_str())) { *g_pointers->m_gta.m_force_player_card_refresh = true; } @@ -148,11 +149,11 @@ namespace big ImGui::InputInt("###player_count", &g.spoofing.session_player_count); } - ImGui::Checkbox("Spoof Session Bad Sport Status", &g.spoofing.spoof_session_bad_sport_status); + ImGui::Checkbox("VIEW_SPOOFING_SPOOF_SESSION_BAD_SPORT_STATUS"_T.data(), &g.spoofing.spoof_session_bad_sport_status); if (g.spoofing.spoof_session_bad_sport_status) { ImGui::SameLine(); - ImGui::Checkbox("Badsport", &g.spoofing.session_bad_sport); + ImGui::Checkbox("VIEW_SPOOFING_BADSPORT"_T.data(), &g.spoofing.session_bad_sport); } } } diff --git a/src/views/players/player/player_info.cpp b/src/views/players/player/player_info.cpp index 90dda0cb..ce20bf2e 100644 --- a/src/views/players/player/player_info.cpp +++ b/src/views/players/player/player_info.cpp @@ -18,30 +18,30 @@ namespace big { switch (type) { - case 1: return "Open"; - case 2: return "Moderate"; - case 3: return "Strict"; + case 1: return "VIEW_PLAYER_INFO_NAT_TYPE_OPEN"_T.data(); + case 2: return "VIEW_PLAYER_INFO_NAT_TYPE_MODERATE"_T.data(); + case 3: return "VIEW_PLAYER_INFO_NAT_TYPE_STRICT"_T.data(); } - return "Unknown"; + return "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data(); } const char* get_connection_type_str(int type) { switch (type) { - case 1: return "Direct"; - case 2: return "Relay"; - case 3: return "Peer Relay"; + case 1: return "VIEW_PLAYER_INFO_CONNECTION_TYPE_DIRECT"_T.data(); + case 2: return "VIEW_PLAYER_INFO_CONNECTION_TYPE_RELAY"_T.data(); + case 3: return "VIEW_PLAYER_INFO_CONNECTION_TYPE_PEER_RELAY"_T.data(); } - return "Unknown"; + return "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data(); } void view::player_info() { ImGui::BeginGroup(); - components::sub_title("Info"); + components::sub_title("INFO"_T); if (ImGui::BeginListBox("##infobox", get_listbox_dimensions())) { @@ -62,7 +62,7 @@ namespace big } components::options_modal( - "Extra Info", + "VIEW_PLAYER_INFO_EXTRA_INFO"_T.data(), [ped_health, ped_maxhealth] { ImGui::BeginGroup(); @@ -79,22 +79,21 @@ namespace big if (boss_goon.Language >= 0 && boss_goon.Language < 13) ImGui::Text("PLAYER_INFO_LANGUAGE"_T.data(), languages[boss_goon.Language].name); - ImGui::Text("PLAYER_INFO_CEO_NAME"_T.data(), boss_goon.GangName); - ImGui::Text("PLAYER_INFO_MC_NAME"_T.data(), boss_goon.ClubhouseName); - ImGui::Text("PLAYER_INFO_WALLET"_T.data(), wallet); - ImGui::Text("PLAYER_INFO_BANK"_T.data(), money - wallet); - ImGui::Text("PLAYER_INFO_TOTAL_MONEY"_T.data(), money); - ImGui::Text("PLAYER_INFO_RANK"_T.data(), stats.Rank, stats.RP); - ImGui::Text("Health: %d (MaxHealth: %d)", ped_health, ped_maxhealth); // TODO: translate - ImGui::Text("PLAYER_INFO_KD"_T.data(), stats.KdRatio); - ImGui::Text("PLAYER_INFO_KILLS"_T.data(), stats.KillsOnPlayers); - ImGui::Text("PLAYER_INFO_DEATHS"_T.data(), stats.DeathsByPlayers); - ImGui::Text("PLAYER_INFO_PROSTITUTES"_T.data(), stats.ProstitutesFrequented); - ImGui::Text("PLAYER_INFO_LAP_DANCES"_T.data(), stats.LapDancesBought); - ImGui::Text("PLAYER_INFO_MISSIONS_CREATED"_T.data(), stats.MissionsCreated); - ImGui::Text("PLAYER_INFO_METLDOWN_COMPLETE"_T.data(), - scr_globals::gpbd_fm_1.as()->Entries[id].MeltdownComplete ? "YES"_T.data() : - "NO"_T.data()); // curious to see if anyone has actually played singleplayer + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_CEO_NAME"_T, boss_goon.GangName.Data).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_MC_NAME"_T, boss_goon.ClubhouseName.Data).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_WALLET"_T, wallet).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_BANK"_T, money - wallet).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_TOTAL_MONEY"_T, money).c_str()); + ImGui::Text(std::format("{}: {} ({} {})", "PLAYER_INFO_RANK"_T, stats.Rank, "PLAYER_INFO_RANK_RP"_T, stats.RP).c_str()); + ImGui::Text(std::format("{}: {} ({} {})", "VIEW_PLAYER_INFO_HEALTH"_T, ped_health, "VIEW_PLAYER_INFO_MAXHEALTH"_T, ped_maxhealth).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_KD"_T, stats.KdRatio).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_KILLS"_T, stats.KillsOnPlayers).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_DEATHS"_T, stats.DeathsByPlayers).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_PROSTITUTES"_T, stats.ProstitutesFrequented).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_LAP_DANCES"_T, stats.LapDancesBought).c_str()); + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_MISSIONS_CREATED"_T, stats.MissionsCreated).c_str()); + auto meltdown_completed = scr_globals::gpbd_fm_1.as()->Entries[id].MeltdownComplete ? "YES"_T : "NO"_T; + ImGui::Text(std::format("{}: {}", "PLAYER_INFO_METLDOWN_COMPLETE"_T, meltdown_completed).c_str()); } ImGui::EndGroup(); @@ -103,38 +102,38 @@ namespace big ImGui::BeginGroup(); - ImGui::Text("NAT Type: %s", get_nat_type_str(g_player_service->get_selected()->get_net_data()->m_nat_type)); + ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NAT_TYPE"_T, get_nat_type_str(g_player_service->get_selected()->get_net_data()->m_nat_type)).c_str()); if (auto peer = g_player_service->get_selected()->get_connection_peer()) { - ImGui::Text("Connection Type: %s", get_connection_type_str(peer->m_peer_address.m_connection_type)); + ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_CONNECTION_TYPE"_T, get_connection_type_str(peer->m_peer_address.m_connection_type)).c_str()); if (peer->m_peer_address.m_connection_type == 2) { auto ip = peer->m_relay_address.m_relay_address; - ImGui::Text("Relay IP: %d.%d.%d.%d", ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4); + ImGui::Text(std::format("{}: {}.{}.{}.{}", "VIEW_PLAYER_INFO_RELAY_IP"_T, ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4).c_str()); } else if (peer->m_peer_address.m_connection_type == 3) { auto ip = peer->m_peer_address.m_relay_address; - ImGui::Text("Peer Relay IP: %d.%d.%d.%d", ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4); + ImGui::Text(std::format("{}: {}.{}.{}.{}", "VIEW_PLAYER_INFO_PEER_RELAY_IP"_T, ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4).c_str()); } - ImGui::Text("Num Messages Sent: %d", peer->m_num_messages_batched); - ImGui::Text("Num Reliables Sent: %d", peer->m_num_reliable_messages_batched); - ImGui::Text("Num Reliables Resent: %d", peer->m_num_resent_reliable_messages_batched); - ImGui::Text("Num Encryption Attempts: %d", peer->m_num_encryption_attempts); + ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_MESSAGES_SENT"_T, peer->m_num_messages_batched).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_RELIABLES_SENT"_T, peer->m_num_reliable_messages_batched).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_RELIABLES_RESENT"_T, peer->m_num_resent_reliable_messages_batched).c_str()); + ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_ENCRYPTION_ATTEMPTS"_T, peer->m_num_encryption_attempts).c_str()); } ImGui::EndGroup(); ImGui::Separator(); - ImGui::Checkbox("Block Explosions", &g_player_service->get_selected()->block_explosions); - ImGui::Checkbox("Block Clone Creates", &g_player_service->get_selected()->block_clone_create); - ImGui::Checkbox("Block Clone Syncs", &g_player_service->get_selected()->block_clone_sync); - ImGui::Checkbox("Block Network Events", &g_player_service->get_selected()->block_net_events); - ImGui::Checkbox("Log Clones", &g_player_service->get_selected()->log_clones); + ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_EXPLOSIONS"_T.data(), &g_player_service->get_selected()->block_explosions); + ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_CLONE_CREATE"_T.data(), &g_player_service->get_selected()->block_clone_create); + ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_CLONE_SYNC"_T.data(), &g_player_service->get_selected()->block_clone_sync); + ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_NETWORK_EVENTS"_T.data(), &g_player_service->get_selected()->block_net_events); + ImGui::Checkbox("VIEW_PLAYER_INFO_LOG_CLONES"_T.data(), &g_player_service->get_selected()->log_clones); ImGui::Separator(); @@ -162,7 +161,7 @@ namespace big } }, false, - "Extra Info"); + "VIEW_PLAYER_INFO_EXTRA_INFO"_T.data()); ImGui::SameLine(); @@ -173,7 +172,7 @@ namespace big ImGui::SameLine(); - if (ImGui::SmallButton("SC Profile")) + if (ImGui::SmallButton("VIEW_PLAYER_INFO_SC_PROFILE"_T.data())) g_fiber_pool->queue_job([] { uint64_t gamerHandle[13]; NETWORK::NETWORK_HANDLE_FROM_PLAYER(g_player_service->get_selected()->id(), (Any*)&gamerHandle, 13); @@ -182,7 +181,7 @@ namespace big if (CPlayerInfo* player_info = g_player_service->get_selected()->get_player_info(); player_info != nullptr) { - ImGui::Text("PLAYER_INFO_WANTED_LEVEL"_T.data(), player_info->m_wanted_level); + ImGui::Text(std::format("{}: {}", "WANTED_LEVEL"_T, player_info->m_wanted_level).c_str()); } if (ped_damage_bits & (uint32_t)eEntityProofs::GOD) @@ -201,7 +200,7 @@ namespace big } if (ped_health > 328 || ped_maxhealth > 328 && !(uint32_t)eEntityProofs::EXPLOSION && !(uint32_t)eEntityProofs::BULLET) { - mode_str += "Unnatural Health"; + mode_str += "VIEW_PLAYER_INFO_UNNATURAL_HEALTH"_T.data(); } } @@ -294,20 +293,20 @@ namespace big else { if (net_player_data->m_force_relays) - ImGui::Text("IP Address: Hidden"); + ImGui::Text("VIEW_PLAYER_INFO_IP_HIDDEN"_T.data()); else - ImGui::Text("IP Address: Unknown"); + ImGui::Text("VIEW_PLAYER_INFO_IP_UNKNOWN"_T.data()); auto cxn_type = g_player_service->get_selected()->get_connection_peer() ? g_player_service->get_selected()->get_connection_peer()->m_peer_address.m_connection_type : 0; if (g.protections.force_relay_connections && ImGui::IsItemHovered()) - ImGui::SetTooltip("IP addresses cannot be seen when Force Relay Connections is enabled"); + ImGui::SetTooltip("VIEW_PLAYER_INFO_IP_FORCE_RELAY_TOOLTIP"_T.data()); else if (cxn_type == 2 && ImGui::IsItemHovered()) - ImGui::SetTooltip("Cannot retrieve IP address since this player is connected through dedicated servers"); + ImGui::SetTooltip("VIEW_PLAYER_INFO_IP_RELAY_TOOLTIP"_T.data()); else if (cxn_type == 3 && ImGui::IsItemHovered()) - ImGui::SetTooltip("Cannot retrieve IP address since this player is connected through another player"); + ImGui::SetTooltip("VIEW_PLAYER_INFO_IP_PEER_RELAY_TOOLTIP"_T.data()); } } diff --git a/src/views/players/player/player_kick.cpp b/src/views/players/player/player_kick.cpp index e3521e0e..846ad997 100644 --- a/src/views/players/player/player_kick.cpp +++ b/src/views/players/player/player_kick.cpp @@ -7,7 +7,7 @@ namespace big void view::player_kick() { ImGui::BeginGroup(); - components::sub_title("Kick"); + components::sub_title("KICK"_T); if (ImGui::BeginListBox("##kick", get_listbox_dimensions())) { auto const is_session_host = [] { @@ -15,7 +15,7 @@ namespace big }; if (!g_player_service->get_self()->is_host()) - ImGui::Text("Host and breakup kick require session host"); + ImGui::Text("VIEW_PLAYER_KICK_HOST_AND_BREAKUP_KICK_REQUIRE_SESSION_HOST"_T.data()); ImGui::BeginDisabled(!g_player_service->get_self()->is_host()); diff --git a/src/views/players/player/player_misc.cpp b/src/views/players/player/player_misc.cpp index 1b869fa2..2ecec2d0 100644 --- a/src/views/players/player/player_misc.cpp +++ b/src/views/players/player/player_misc.cpp @@ -9,7 +9,7 @@ namespace big void view::player_misc() { ImGui::BeginGroup(); - components::sub_title("Misc"); + components::sub_title("DEBUG_TAB_MISC"_T); if (ImGui::BeginListBox("##misc", get_listbox_dimensions())) { components::player_command_button<"joinceo">(g_player_service->get_selected()); @@ -35,7 +35,7 @@ namespace big ImGui::SameLine(); - ImGui::Checkbox("Fix Vehicle", &g_player_service->get_selected()->fix_vehicle); + ImGui::Checkbox("VIEW_NET_SESSION_FIX_VEHICLE"_T.data(), &g_player_service->get_selected()->fix_vehicle); ImGui::EndListBox(); } diff --git a/src/views/players/player/player_teleport.cpp b/src/views/players/player/player_teleport.cpp index 678cf419..45fa5918 100644 --- a/src/views/players/player/player_teleport.cpp +++ b/src/views/players/player/player_teleport.cpp @@ -11,7 +11,7 @@ namespace big { ImGui::BeginGroup(); - components::sub_title("Teleport"); + components::sub_title("GUI_TAB_TELEPORT"_T); if (ImGui::BeginListBox("##teleport", get_listbox_dimensions())) { @@ -20,14 +20,14 @@ namespace big components::player_command_button<"playervehtp">(g_player_service->get_selected()); ImGui::SameLine(); components::player_command_button<"bring">(g_player_service->get_selected()); - components::button("Waypoint", [] { + components::button("VIEW_PLAYER_TELEPORT_WAYPOINT"_T, [] { Vector3 location; if (blip::get_blip_location(location, (int)BlipIcons::Waypoint)) entity::load_ground_at_3dcoord(location), teleport::teleport_player_to_coords(g_player_service->get_selected(), location); }); components::options_modal( - "Interior Teleport", + "VIEW_PLAYER_TELEPORT_INTERIOR_TELEPORT"_T.data(), [] { components::player_command_button<"intkick">(g_player_service->get_selected(), {}); if (ImGui::BeginCombo("##apartment", apartment_names[g.session.send_to_apartment_idx])) @@ -92,42 +92,42 @@ namespace big toxic::start_activity(g_player_service->get_selected(), eActivityType::Skydive); }); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {81}, "TP To MOC"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {81}, "VIEW_PLAYER_TELEPORT_TP_TO_MOC"_T); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {123}, "TP To Casino"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {123}, "VIEW_PLAYER_TELEPORT_TP_TO_CASINO"_T); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {124}, "TP To Penthouse"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {124}, "VIEW_PLAYER_TELEPORT_TP_TO_PENTHOUSE"_T); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {128}, "TP To Arcade"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {128}, "VIEW_PLAYER_TELEPORT_TP_TO_ARCADE"_T); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {146}, "TP To Music Locker"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {146}, "VIEW_PLAYER_TELEPORT_TP_TO_MUSIC_LOCKER"_T); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {148}, "TP To Record A Studios"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {148}, "VIEW_PLAYER_TELEPORT_TP_TO_RECORD_A_STUDIOS"_T); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {149}, "TP To Custom Auto Shop"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {149}, "VIEW_PLAYER_TELEPORT_TP_TO_CUSTOM_AUTO_SHOP"_T); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {155}, "TP To Agency"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {155}, "VIEW_PLAYER_TELEPORT_TP_TO_AGENCY"_T); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {160}, "TP To Freakshop"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {160}, "VIEW_PLAYER_TELEPORT_TP_TO_FREAKSHOP"_T); ImGui::SameLine(); - components::player_command_button<"interiortp">(g_player_service->get_selected(), {161}, "TP To Multi Floor Garage"); + components::player_command_button<"interiortp">(g_player_service->get_selected(), {161}, "VIEW_PLAYER_TELEPORT_TP_TO_MULTI_FLOOR_GARAGE"_T); }, false, - "Interior"); + "INTERIOR"_T.data()); if (g_player_service->get_selected()->get_ped()) { static float new_location[3]; auto& current_location = *reinterpret_cast(g_player_service->get_selected()->get_ped()->get_position()); - components::small_text("Custom TP"); + components::small_text("VIEW_PLAYER_TELEPORT_CUSTOM_TP"_T); ImGui::SetNextItemWidth(400); ImGui::InputFloat3("##customlocation", new_location); - components::button("TP", [] { + components::button("GUI_TAB_TELEPORT"_T, [] { teleport::teleport_player_to_coords(g_player_service->get_selected(), *reinterpret_cast(&new_location)); }); ImGui::SameLine(); - if (ImGui::Button("Get current")) + if (ImGui::Button("VIEW_PLAYER_TELEPORT_GET_CURRENT"_T.data())) { std::copy(std::begin(current_location), std::end(current_location), std::begin(new_location)); } diff --git a/src/views/players/player/player_toxic.cpp b/src/views/players/player/player_toxic.cpp index 3bf714bf..127c5c3d 100644 --- a/src/views/players/player/player_toxic.cpp +++ b/src/views/players/player/player_toxic.cpp @@ -10,7 +10,7 @@ namespace big void view::player_toxic() { ImGui::BeginGroup(); - components::sub_title("Toxic"); + components::sub_title("TOXIC"_T); if (ImGui::BeginListBox("##toxic", get_listbox_dimensions())) { components::player_command_button<"kill">(g_player_service->get_selected(), {}); @@ -19,7 +19,7 @@ namespace big components::player_command_button<"ceokick">(g_player_service->get_selected(), {}); ImGui::SameLine(); - components::button("Gooch Test", [] { + components::button("VIEW_PLAYER_TOXIC_GOOCH_TEST"_T, [] { *scr_globals::gooch.at(289).at(1).as() = g_player_service->get_selected()->id(); scripts::start_launcher_script(171); }); @@ -34,11 +34,11 @@ namespace big components::player_command_button<"ceoraid">(g_player_service->get_selected(), {}); ImGui::SameLine(); - components::button("Trigger MC Raid", [] { + components::button("TRIGGER_MC_RAID"_T, [] { toxic::start_activity(g_player_service->get_selected(), eActivityType::BikerDefend); }); ImGui::SameLine(); - components::button("Trigger Bunker Raid", [] { + components::button("TRIGGER_BUNKER_RAID"_T, [] { toxic::start_activity(g_player_service->get_selected(), eActivityType::GunrunningDefend); }); diff --git a/src/views/players/player/player_vehicle.cpp b/src/views/players/player/player_vehicle.cpp index 0fde1902..3eb02f3e 100644 --- a/src/views/players/player/player_vehicle.cpp +++ b/src/views/players/player/player_vehicle.cpp @@ -5,7 +5,7 @@ namespace big void view::player_vehicle() { ImGui::BeginGroup(); - components::sub_title("Vehicle"); + components::sub_title("VEHICLE"_T); if (ImGui::BeginListBox("##veh", get_listbox_dimensions())) { components::player_command_button<"vehkick">(g_player_service->get_selected(), {}); diff --git a/src/views/players/view_player.cpp b/src/views/players/view_player.cpp index 218c482e..6c52042e 100644 --- a/src/views/players/view_player.cpp +++ b/src/views/players/view_player.cpp @@ -12,17 +12,20 @@ namespace big player_ptr current_player = g_player_service->get_selected(); navigation_struct& player_tab = g_gui_service->get_navigation().at(tabs::PLAYER); - strcpy(player_tab.name, current_player->get_name()); - strcat(player_tab.name, std::format(" ({})", std::to_string(current_player->id())).data()); - + std::string name_appendage{}; if (current_player->is_host()) - strcat(player_tab.name, " [HOST]"); - + { + name_appendage += std::format(" [{}]", "VIEW_PLAYER_IS_HOST"_T); + } if (current_player->is_friend()) - strcat(player_tab.name, " [FRIEND]"); - + { + name_appendage += std::format(" [{}]", "VIEW_PLAYER_IS_FRIEND"_T); + } if (current_player->is_modder) - strcat(player_tab.name, " [MOD]"); + { + name_appendage += std::format(" [{}]", "MOD"_T); + } + strcpy(player_tab.name, std::format("{} ({}){}", current_player->get_name(), current_player->id(), name_appendage).c_str()); view::player_info(); ImGui::SameLine(); diff --git a/src/views/self/view_animations.cpp b/src/views/self/view_animations.cpp index 0122e42d..4465ca0a 100644 --- a/src/views/self/view_animations.cpp +++ b/src/views/self/view_animations.cpp @@ -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(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::LOOPING)); - ImGui::CheckboxFlags("Hold Last Frame", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::HOLD_LAST_FRAME)); - ImGui::CheckboxFlags("Uninterruptable", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::NOT_INTERRUPTABLE)); - ImGui::CheckboxFlags("Only Upperbody", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::UPPERBODY)); - ImGui::CheckboxFlags("Secondary slot", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::SECONDARY)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_LOOPED"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::LOOPING)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_HOLD_LAST_FRAME"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::HOLD_LAST_FRAME)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_UNINTERRUPTABLE"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::NOT_INTERRUPTABLE)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_ONLY_UPPERBODY"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::UPPERBODY)); + ImGui::CheckboxFlags("SECONDARY"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::HIDE_WEAPON)); ImGui::EndGroup(); ImGui::SameLine(); ImGui::BeginGroup(); //Sync flags - ImGui::CheckboxFlags("Sync In", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::TAG_SYNC_IN)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_IN"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::FORCE_START)); - ImGui::CheckboxFlags("Disable Colission", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::TURN_OFF_COLLISION)); - ImGui::CheckboxFlags("Override Physics", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::OVERRIDE_PHYSICS)); - ImGui::CheckboxFlags("Ignore Gravity", reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(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(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::FORCE_START)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_DISABLE_COLLISION"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::TURN_OFF_COLLISION)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_OVERRIDE_PHYSICS"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(animations::anim_flags::OVERRIDE_PHYSICS)); + ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_IGNORE_GRAVITY"_T.data(), reinterpret_cast(&g_ped_animation_service.current_animation.flags), static_cast(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(*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(*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(); } } diff --git a/src/views/self/view_custom_teleport.cpp b/src/views/self/view_custom_teleport.cpp index 4a658252..9879e211 100644 --- a/src/views/self/view_custom_teleport.cpp +++ b/src/views/self/view_custom_teleport.cpp @@ -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(*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(*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(); } } diff --git a/src/views/self/view_mobile.cpp b/src/views/self/view_mobile.cpp index 5037f518..ce7d621b 100644 --- a/src/views/self/view_mobile.cpp +++ b/src/views/self/view_mobile.cpp @@ -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">(); diff --git a/src/views/self/view_outfit_editor.cpp b/src/views/self/view_outfit_editor.cpp index bdbb70cf..65e3eac2 100644 --- a/src/views/self/view_outfit_editor.cpp +++ b/src/views/self/view_outfit_editor.cpp @@ -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(); } } \ No newline at end of file diff --git a/src/views/self/view_self.cpp b/src/views/self/view_self.cpp index 6025d6cc..6bb7c875 100644 --- a/src/views/self/view_self.cpp +++ b/src/views/self/view_self.cpp @@ -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]; diff --git a/src/views/self/view_teleport.cpp b/src/views/self/view_teleport.cpp index 0b97a2ab..80352719 100644 --- a/src/views/self/view_teleport.cpp +++ b/src/views/self/view_teleport.cpp @@ -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, diff --git a/src/views/self/view_weapons.cpp b/src/views/self/view_weapons.cpp index 62aaca9a..87fb7d4d 100644 --- a/src/views/self/view_weapons.cpp +++ b/src/views/self/view_weapons.cpp @@ -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); } diff --git a/src/views/settings/view_gta_cache.cpp b/src/views/settings/view_gta_cache.cpp index f1cb8667..0e097cee 100644 --- a/src/views/settings/view_gta_cache.cpp +++ b/src/views/settings/view_gta_cache.cpp @@ -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(); diff --git a/src/views/settings/view_gui_settings.cpp b/src/views/settings/view_gui_settings.cpp index 9d3ddf5a..78335ef6 100644 --- a/src/views/settings/view_gui_settings.cpp +++ b/src/views/settings/view_gui_settings.cpp @@ -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(); diff --git a/src/views/settings/view_hotkey_settings.cpp b/src/views/settings/view_hotkey_settings.cpp index ef36c327..3b095763 100644 --- a/src/views/settings/view_hotkey_settings.cpp +++ b/src/views/settings/view_hotkey_settings.cpp @@ -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(); diff --git a/src/views/settings/view_lua_scripts.cpp b/src/views/settings/view_lua_scripts.cpp index c3d18b75..4837ffa3 100644 --- a/src/views/settings/view_lua_scripts.cpp +++ b/src/views/settings/view_lua_scripts.cpp @@ -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(); diff --git a/src/views/settings/view_protection_settings.cpp b/src/views/settings/view_protection_settings.cpp index cb6f7b71..720e607c 100644 --- a/src/views/settings/view_protection_settings.cpp +++ b/src/views/settings/view_protection_settings.cpp @@ -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(); }; diff --git a/src/views/settings/view_settings.cpp b/src/views/settings/view_settings.cpp index 135406b4..e181eeb1 100644 --- a/src/views/settings/view_settings.cpp +++ b/src/views/settings/view_settings.cpp @@ -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(); diff --git a/src/views/settings/view_stat_editor.cpp b/src/views/settings/view_stat_editor.cpp index 011037ba..45e46a60 100644 --- a/src/views/settings/view_stat_editor.cpp +++ b/src/views/settings/view_stat_editor.cpp @@ -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 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 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")) { diff --git a/src/views/vehicle/view_fun_vehicle.cpp b/src/views/vehicle/view_fun_vehicle.cpp index 5c904245..9f7a41ba 100644 --- a/src/views/vehicle/view_fun_vehicle.cpp +++ b/src/views/vehicle/view_fun_vehicle.cpp @@ -64,7 +64,7 @@ namespace big if (idx >= 0) { - name = "FUN_VEHICLE_SEAT"_T.data() + std::to_string(idx + 1); + name = std::format("{} {}", "FUN_VEHICLE_SEAT"_T, (idx + 1)).c_str(); } if ((idx + 1) % 4 != 0) @@ -257,7 +257,7 @@ namespace big eExplosionTag selected_rocket_explosion = g.vehicle.vehicle_ammo_special.rocket_explosion_tag; ImGui::BeginGroup(); - components::sub_title("CUSTOM_VEH_WEAPONS_MG"_T.data()); + components::sub_title("CUSTOM_VEH_WEAPONS_MG"_T); if (ImGui::BeginCombo("SPECIAL_AMMO"_T.data(), SPECIAL_AMMOS[(int)selected_ammo].name)) { for (const auto& special_ammo : SPECIAL_AMMOS) @@ -304,7 +304,7 @@ namespace big ImGui::SameLine(); ImGui::BeginGroup(); - components::sub_title("CUSTOM_VEH_WEAPONS_MISSILE"_T.data()); + components::sub_title("CUSTOM_VEH_WEAPONS_MISSILE"_T); if (ImGui::BeginCombo(std::format("{}##customvehweaps", "EXPLOSION"_T).data(), BULLET_IMPACTS[selected_rocket_explosion])) { for (const auto& [type, name] : BULLET_IMPACTS) diff --git a/src/views/vehicle/view_lsc.cpp b/src/views/vehicle/view_lsc.cpp index 75bffcbc..a4320187 100644 --- a/src/views/vehicle/view_lsc.cpp +++ b/src/views/vehicle/view_lsc.cpp @@ -207,7 +207,7 @@ namespace big } ImGui::SameLine(); - if (components::button("Max Performance")) + if (components::button("MAX_VEHICLE"_T)) { g_fiber_pool->queue_job([] { vehicle::max_vehicle_performance(self::veh); @@ -287,7 +287,7 @@ namespace big } } - ImGui::SeparatorText("Mod Slots"); + ImGui::SeparatorText("VIEW_LSC_MOD_SLOTS"_T.data()); ImGui::BeginGroup(); @@ -364,7 +364,7 @@ namespace big } else { - g_notification_service->push_error("LSC", "Selected mod is invalid"); + g_notification_service->push_error("GUI_TAB_LSC"_T.data(), "VIEW_LSC_SELECTED_MOD_IS_INVALID"_T.data()); } } else if (selected_slot == MOD_WINDOW_TINT) @@ -456,13 +456,13 @@ namespace big { if (item_counter == 0) { - ImGui::SeparatorText("Vehicle Extras"); + ImGui::SeparatorText("VIEW_LSC_VEHICLE_EXTRAS"_T.data()); ImGui::BeginGroup(); } if ((item_counter % 5) != 0) ImGui::SameLine(); int gta_extra_id = (extra - MOD_EXTRA_0) * -1; - auto name = std::format("Extra #{}", gta_extra_id); + auto name = std::format("{}: #{}", "VIEW_LSC_EXTRAS"_T, gta_extra_id); bool is_extra_enabled = owned_mods[extra] == 1; if (ImGui::Checkbox(name.c_str(), &is_extra_enabled)) { diff --git a/src/views/vehicle/view_spawn_vehicle.cpp b/src/views/vehicle/view_spawn_vehicle.cpp index 8975735b..7d239e3a 100644 --- a/src/views/vehicle/view_spawn_vehicle.cpp +++ b/src/views/vehicle/view_spawn_vehicle.cpp @@ -218,13 +218,13 @@ namespace big void view::spawn_vehicle() { - ImGui::RadioButton("New", &g.spawn_vehicle.spawn_type, 0); + ImGui::RadioButton("VIEW_DEBUG_THREADS_NEW"_T.data(), &g.spawn_vehicle.spawn_type, 0); ImGui::SameLine(); - ImGui::RadioButton("Personal", &g.spawn_vehicle.spawn_type, 1); + ImGui::RadioButton("VIEW_SPAWN_VEHICLE_PERSONAL"_T.data(), &g.spawn_vehicle.spawn_type, 1); ImGui::SameLine(); - ImGui::RadioButton("Persistent", &g.spawn_vehicle.spawn_type, 2); + ImGui::RadioButton("VIEW_SPAWN_VEHICLE_PERSISTENT"_T.data(), &g.spawn_vehicle.spawn_type, 2); ImGui::SameLine(); - ImGui::RadioButton("Xml", &g.spawn_vehicle.spawn_type, 3); + ImGui::RadioButton("VIEW_SPAWN_VEHICLE_XML"_T.data(), &g.spawn_vehicle.spawn_type, 3); switch (g.spawn_vehicle.spawn_type) { diff --git a/src/views/vehicle/view_vehicle.cpp b/src/views/vehicle/view_vehicle.cpp index 50de03be..64eb6d18 100644 --- a/src/views/vehicle/view_vehicle.cpp +++ b/src/views/vehicle/view_vehicle.cpp @@ -17,7 +17,7 @@ namespace big }); ImGui::SameLine(); - components::button("Delete Current", [] { + components::button("DELETE"_T, [] { auto handle = self::veh; if (ENTITY::DOES_ENTITY_EXIST(handle)) TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped), entity::delete_entity(handle); diff --git a/src/views/view_vehicle_control.cpp b/src/views/view_vehicle_control.cpp index db264157..da852001 100644 --- a/src/views/view_vehicle_control.cpp +++ b/src/views/view_vehicle_control.cpp @@ -13,26 +13,26 @@ namespace big void render_doors_tab() { const char* const doornames[MAX_VEHICLE_DOORS]{ - "Front left", - "Front right", - "Back left", - "Back right", - "Bonnet", - "Trunk", + "VIEW_VEHICLE_CONTROL_DOOR_NAME_0"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_1"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_2"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_3"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_4"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_5"_T.data(), }; const char* const locknames[MAX_VEHICLE_LOCK_STATES]{ - "None", - "Unlocked", - "Locked", - "Lockout player only", - "Locked player inside", - "Locked initially", - "Force shut doors", - "Locked but damageable", - "Locked but boot unlocked", - "Locked no passengers", - "Cannot enter", + "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_1"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_2"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_3"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_4"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_5"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_6"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_7"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_8"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_9"_T.data(), + "VIEW_VEHICLE_CONTROL_LOCKNAMES_10"_T.data(), }; ImGui::BeginGroup(); @@ -114,20 +114,20 @@ namespace big void render_windows_tab() { const char* const windownames[4]{ - "Front left", - "Front right", - "Back left", - "Back right", + "VIEW_VEHICLE_CONTROL_DOOR_NAME_0"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_1"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_2"_T.data(), + "VIEW_VEHICLE_CONTROL_DOOR_NAME_3"_T.data(), }; ImGui::BeginGroup(); ImGui::Spacing(); ImGui::SetNextItemWidth(200); - components::button("Roll Down All", [] { + components::button("VIEW_VEHICLE_CONTROL_ROLL_DOWN_ALL"_T, [] { g_vehicle_control_service.operate_window(eWindowId::WINDOW_INVALID_ID, true); }); ImGui::SameLine(); - components::button("Roll Up All", [] { + components::button("VIEW_VEHICLE_CONTROL_ROLL_UP_ALL"_T, [] { g_vehicle_control_service.operate_window(eWindowId::WINDOW_INVALID_ID, false); }); ImGui::EndGroup(); @@ -142,11 +142,11 @@ namespace big ImGui::PushID(i); ImGui::Text(windownames[i]); ImGui::SameLine(300); - components::button("Roll Down", [i] { + components::button("VIEW_VEHICLE_CONTROL_ROLL_DOWN"_T, [i] { g_vehicle_control_service.operate_window((eWindowId)i, true); }); ImGui::SameLine(); - components::button("Roll Up", [i] { + components::button("VIEW_VEHICLE_CONTROL_ROLL_UP"_T, [i] { g_vehicle_control_service.operate_window((eWindowId)i, false); }); ImGui::PopID(); @@ -156,10 +156,10 @@ namespace big void render_lights_tab() { const char* const neonnames[4]{ - "Left", - "Right", - "Front", - "Rear", + "LEFT"_T.data(), + "RIGHT"_T.data(), + "FRONT"_T.data(), + "BACK"_T.data(), }; if (components::button("VEHICLE_CONTROLLER_TOGGLE_LIGHTS"_T)) @@ -214,12 +214,12 @@ namespace big * Seats start at index -1, compensate accordingly */ const char* const seatnames[6]{ - "Driver", - "Passenger", - "Left rear", - "Right rear", - "Outside Left", - "Outside Right", + "DRIVER"_T.data(), + "VIEW_VEHICLE_CONTROL_PASSENGER"_T.data(), + "VIEW_VEHICLE_CONTROL_LEFT_REAR"_T.data(), + "VIEW_VEHICLE_CONTROL_RIGHT_REAR"_T.data(), + "VIEW_VEHICLE_CONTROL_OUTSIDE_LEFT"_T.data(), + "VIEW_VEHICLE_CONTROL_OUTSIDE_RIGHT"_T.data(), }; static int movespeed = 1; @@ -250,15 +250,15 @@ namespace big void render_misc_tab() { const char* const convertiblestates[4]{ - "Up", - "Lowering", - "Down", - "Raising", + "VIEW_TELEPORT_UP"_T.data(), + "VIEW_VEHICLE_CONTROL_LOWERING"_T.data(), + "VIEW_TELEPORT_DOWN"_T.data(), + "VIEW_VEHICLE_CONTROL_RAISING"_T.data(), }; if (g_vehicle_control_service.m_controlled_vehicle.isconvertible) { - if (components::button(g_vehicle_control_service.m_controlled_vehicle.convertibelstate ? "Raise" : "Lower")) + if (components::button(g_vehicle_control_service.m_controlled_vehicle.convertibelstate ? "VIEW_VEHICLE_CONTROL_RAISE"_T : "VIEW_VEHICLE_CONTROL_LOWER"_T)) { g_fiber_pool->queue_job([=] { if (g.window.vehicle_control.operation_animation) @@ -272,10 +272,10 @@ namespace big } ImGui::SameLine(); - ImGui::Text("Convertible state: %s", convertiblestates[g_vehicle_control_service.m_controlled_vehicle.convertibelstate]); + ImGui::Text(std::format("{}: {}", "VIEW_VEHICLE_CONTROL_CONVERTIBLE_STATE"_T, convertiblestates[g_vehicle_control_service.m_controlled_vehicle.convertibelstate]).c_str()); } - if (ImGui::Checkbox(g_vehicle_control_service.m_controlled_vehicle.engine ? "Stop" : "Start", + if (ImGui::Checkbox(g_vehicle_control_service.m_controlled_vehicle.engine ? "VIEW_DEBUG_ANIMATIONS_STOP"_T.data() : "SETTINGS_NOTIFY_GTA_THREADS_START"_T.data(), &g_vehicle_control_service.m_controlled_vehicle.engine)) { g_fiber_pool->queue_job([=] { @@ -291,9 +291,9 @@ namespace big } ImGui::SameLine(); - ImGui::Text("Engine: %s", g_vehicle_control_service.m_controlled_vehicle.engine ? "Running" : "Off"); + ImGui::Text(std::format("{}: {}", "VIEW_VEHICLE_CONTROL_ENGINE"_T, g_vehicle_control_service.m_controlled_vehicle.engine ? "VIEW_VEHICLE_CONTROL_ENGINE_RUNNING"_T : "OFF"_T).c_str()); - components::button(g_vehicle_control_service.m_driver_performing_task ? "Cancel" : "Summon", [] { + components::button(g_vehicle_control_service.m_driver_performing_task ? "CANCEL"_T : "VIEW_VEHICLE_CONTROL_SUMMON"_T, [] { if (!g_vehicle_control_service.m_driver_performing_task) { if (g.window.vehicle_control.operation_animation) @@ -308,18 +308,17 @@ namespace big if (g_vehicle_control_service.m_driver_performing_task) { ImGui::SameLine(); - ImGui::Text("Distance: %d", g_vehicle_control_service.m_distance_to_destination); + ImGui::Text(std::format("{}: {}", "VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T, g_vehicle_control_service.m_distance_to_destination).c_str()); - - ImGui::Text("Task: %s", g_vehicle_control_service.m_currentask); + ImGui::Text(std::format("{}: {}", "OUTFIT_TASK"_T, g_vehicle_control_service.m_currentask).c_str()); } } - bool_command use_animations("vehcontroluseanims", "Use animations", "Will use animations for several vehicle operations such as:\ntoggling lights, opening/closing doors and entering seats", + bool_command use_animations("vehcontroluseanims", "VIEW_VEHICLE_CONTROL_USE_ANIMATIONS", "VIEW_VEHICLE_CONTROL_USE_ANIMATIONS_DESC", g.window.vehicle_control.operation_animation); - bool_command render_veh_dist("vehcontrolrendervehdist", "Render distance on vehicle", "Will display the distance on the controlled vehicle", + bool_command render_veh_dist("vehcontrolrendervehdist", "VIEW_VEHICLE_CONTROL_RENDER_DISTANCE_ON_VEHICLE", "VIEW_VEHICLE_CONTROL_RENDER_DISTANCE_ON_VEHICLE_DESC", g.window.vehicle_control.render_distance_on_veh); - float_command max_summon_dist("vehcontrolmaxsummondist", "Max summon distance", "At what range the vehicle will drive towards the summoned location as oposed to being teleported", + float_command max_summon_dist("vehcontrolmaxsummondist", "VIEW_VEHICLE_CONTROL_MAX_SUMMON_DISTANCE", "VIEW_VEHICLE_CONTROL_MAX_SUMMON_DISTANCE_DESC", g.window.vehicle_control.max_summon_range, 10.f, 250.f); void render_settings_tab() @@ -336,7 +335,7 @@ namespace big ImGui::SetNextWindowPos(ImVec2(500.0f, 10.0f), ImGuiCond_FirstUseEver, ImVec2(0.0f, 0.0f)); ImGui::SetNextWindowBgAlpha(0.5f); - if (ImGui::Begin("Vehicle controller", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) + if (ImGui::Begin("VEHICLE_CONTROLLER"_T.data(), nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) { if (g_vehicle_control_service.m_controlled_vehicle_exists) { @@ -345,42 +344,42 @@ namespace big ImGui::Spacing(); if (ImGui::BeginTabBar("##vehiclecontroltabbar")) { - if (ImGui::BeginTabItem("Doors")) + if (ImGui::BeginTabItem("VIEW_VEHICLE_CONTROL_DOORS"_T.data())) { render_doors_tab(); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Windows")) + if (ImGui::BeginTabItem("VIEW_VEHICLE_CONTROL_WINDOWS"_T.data())) { render_windows_tab(); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Lights")) + if (ImGui::BeginTabItem("VEHICLE_CONTROLLER_NEON_LIGHTS"_T.data())) { render_lights_tab(); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Seats")) + if (ImGui::BeginTabItem("FUN_VEHICLE_SEAT"_T.data())) { render_seats_tab(); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Misc")) + if (ImGui::BeginTabItem("SETTINGS_MISC"_T.data())) { render_misc_tab(); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("Settings")) + if (ImGui::BeginTabItem("GUI_TAB_SETTINGS"_T.data())) { render_settings_tab(); @@ -393,7 +392,7 @@ namespace big } else { - ImGui::Text("No vehicle available"); + ImGui::Text("PLAYER_INFO_NO_VEHICLE"_T.data()); } } ImGui::End(); diff --git a/src/views/world/view_blackhole.cpp b/src/views/world/view_blackhole.cpp index d64e9c03..6c694e5c 100644 --- a/src/views/world/view_blackhole.cpp +++ b/src/views/world/view_blackhole.cpp @@ -6,18 +6,18 @@ namespace big { components::command_checkbox<"blackhole">(); - ImGui::SeparatorText("Entities"); + ImGui::SeparatorText("VIEW_BLACKHOLE_ENTITIES"_T.data()); components::command_checkbox<"blackholeincvehs">(); ImGui::SameLine(); components::command_checkbox<"blackholeincpeds">(); - ImGui::SeparatorText("Position"); + ImGui::SeparatorText("VIEW_OVERLAY_POSITION"_T.data()); ImGui::InputFloat("X", &g.world.blackhole.pos.x, 5.f, 200.f); ImGui::InputFloat("Y", &g.world.blackhole.pos.y, 5.f, 200.f); ImGui::InputFloat("Z", &g.world.blackhole.pos.z, 5.f, 200.f); - ImGui::SliderFloat("Scale", &g.world.blackhole.scale, 2.f, 12.f, "%.0f"); + ImGui::SliderFloat("VIEW_BLACKHOLE_SCALE"_T.data(), &g.world.blackhole.scale, 2.f, 12.f, "%.0f"); - components::button("Set to current coords", [] { + components::button("VIEW_BLACKHOLE_SET"_T, [] { const auto player_pos = g_local_player->get_position(); g.world.blackhole.pos.x = player_pos->x; @@ -25,9 +25,9 @@ namespace big g.world.blackhole.pos.z = player_pos->z; }); - ImGui::SeparatorText("Customize Hole"); + ImGui::SeparatorText("VIEW_BLACKHOLE_CUSTOM"_T.data()); ImGui::SetNextItemWidth(214); - ImGui::ColorPicker3("Color", g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex); - ImGui::SliderInt("Alpha", &g.world.blackhole.alpha, 0, 255); + ImGui::ColorPicker3("VIEW_BLACKHOLE_COLOR"_T.data(), g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex); + ImGui::SliderInt("VIEW_BLACKHOLE_ALPHA"_T.data(), &g.world.blackhole.alpha, 0, 255); } } \ No newline at end of file diff --git a/src/views/world/view_model_swapper.cpp b/src/views/world/view_model_swapper.cpp index fef9f635..36345984 100644 --- a/src/views/world/view_model_swapper.cpp +++ b/src/views/world/view_model_swapper.cpp @@ -5,9 +5,9 @@ namespace big { void view::model_swapper() { - ImGui::Text("Models that have already been created will not be affected much"); - ImGui::Text("Prefix 0x for hexadecimal hash"); - ImGui::Text("Use context menu to copy entity hash"); + ImGui::Text("VIEW_MODEL_SWAPPER_LINE1"_T.data()); + ImGui::Text("VIEW_MODEL_SWAPPER_LINE2"_T.data()); + ImGui::Text("VIEW_MODEL_SWAPPER_LINE3"_T.data()); static char dst_text[256]; static char src_text[256]; @@ -15,22 +15,22 @@ namespace big static float width = *g_pointers->m_gta.m_resolution_x / 5.0; ImGui::SetNextItemWidth(width); - ImGui::InputText("Dst", dst_text, IM_ARRAYSIZE(dst_text)); + ImGui::InputText("VIEW_MODEL_SWAPPER_DEST"_T.data(), dst_text, IM_ARRAYSIZE(dst_text)); if (ImGui::IsItemActive()) g.self.hud.typing = TYPING_TICKS; ImGui::SameLine(); ImGui::SetNextItemWidth(width); - ImGui::InputText("Src", src_text, IM_ARRAYSIZE(src_text)); + ImGui::InputText("VIEW_MODEL_SWAPPER_SRC"_T.data(), src_text, IM_ARRAYSIZE(src_text)); if (ImGui::IsItemActive()) g.self.hud.typing = TYPING_TICKS; ImGui::SameLine(); - if (ImGui::Button("Add/Change")) + if (ImGui::Button("ADD"_T.data())) { std::lock_guard lock(g.world.model_swapper.m); if (dst_text[0] == '\0' || src_text[0] == '\0') { - g_notification_service->push_error("Model Swapper", "Wrong input"); + g_notification_service->push_error("GUI_TAB_MODEL_SWAPPER"_T.data(), "VIEW_MODEL_SWAPPER_WRONG_INPUT"_T.data()); return; } std::string str = dst_text; @@ -52,20 +52,20 @@ namespace big g.world.model_swapper.update = true; } ImGui::SameLine(); - if (ImGui::Button("Delete")) + if (ImGui::Button("DELETE"_T.data())) { std::lock_guard lock(g.world.model_swapper.m); if (!g.world.model_swapper.models.size() || selected_index < 0 || selected_index >= g.world.model_swapper.models.size()) { - g_notification_service->push_error("Model Swapper", "Invalid index"); + g_notification_service->push_error("GUI_TAB_MODEL_SWAPPER"_T.data(), "VIEW_MODEL_SWAPPER_INVALID_INDEX"_T.data()); return; } g.world.model_swapper.models.erase(std::begin(g.world.model_swapper.models) + selected_index); g.world.model_swapper.update = true; } ImGui::SameLine(); - if (ImGui::Button("Clear")) + if (ImGui::Button("VIEW_DEBUG_GLOBAL_CLEAR"_T.data())) { std::lock_guard lock(g.world.model_swapper.m); g.world.model_swapper.models.clear(); @@ -73,7 +73,8 @@ namespace big } ImGui::SetNextItemWidth(width); - if (ImGui::BeginListBox("Dst##model_swapper_dst")) + ImGui::PushID(2); + if (ImGui::BeginListBox("VIEW_MODEL_SWAPPER_DEST"_T.data())) { for (size_t i = 0; i < g.world.model_swapper.models.size(); i++) { @@ -91,7 +92,7 @@ namespace big } ImGui::SameLine(); ImGui::SetNextItemWidth(width); - if (ImGui::BeginListBox("Src##model_swapper_src")) + if (ImGui::BeginListBox("VIEW_MODEL_SWAPPER_SRC"_T.data())) { for (size_t i = 0; i < g.world.model_swapper.models.size(); i++) { @@ -107,5 +108,6 @@ namespace big } ImGui::EndListBox(); } + ImGui::PopID(); } } \ No newline at end of file diff --git a/src/views/world/view_spawn_ped.cpp b/src/views/world/view_spawn_ped.cpp index aed30272..4f229e3f 100644 --- a/src/views/world/view_spawn_ped.cpp +++ b/src/views/world/view_spawn_ped.cpp @@ -536,12 +536,12 @@ namespace big { if (ImGui::BeginCombo("##ped_for", (selected_ped_for_player_id == SPAWN_PED_FOR_SELF ? - "Self" : + "GUI_TAB_SELF"_T.data() : (selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE ? - "Everyone" : + "VIEW_SPAWN_PED_EVERYONE"_T.data() : g_player_service->get_by_id(selected_ped_for_player_id)->get_name())))) { - if (ImGui::Selectable("Self", selected_ped_for_player_id == SPAWN_PED_FOR_SELF)) + if (ImGui::Selectable("GUI_TAB_SELF"_T.data(), selected_ped_for_player_id == SPAWN_PED_FOR_SELF)) { selected_ped_for_player_id = SPAWN_PED_FOR_SELF; } @@ -551,7 +551,7 @@ namespace big ImGui::SetItemDefaultFocus(); } - if (ImGui::Selectable("Everyone", selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE)) + if (ImGui::Selectable("VIEW_SPAWN_PED_EVERYONE"_T.data(), selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE)) { selected_ped_for_player_id = SPAWN_PED_FOR_EVERYONE; } @@ -597,9 +597,9 @@ namespace big if (ImGui::IsItemHovered()) ImGui::SetTooltip("PREVIEW_DESC"_T.data()); - ImGui::Checkbox("Invincible", &g.world.spawn_ped.spawn_invincible); - ImGui::Checkbox("Invisible", &g.world.spawn_ped.spawn_invisible); - ImGui::Checkbox("Attacker", &g.world.spawn_ped.spawn_as_attacker); + ImGui::Checkbox("VIEW_SPAWN_PED_INVINCIBLE"_T.data(), &g.world.spawn_ped.spawn_invincible); + ImGui::Checkbox("VIEW_SPAWN_PED_INVISIBLE"_T.data(), &g.world.spawn_ped.spawn_invisible); + ImGui::Checkbox("VIEW_SPAWN_PED_ATTACKER"_T.data(), &g.world.spawn_ped.spawn_as_attacker); components::button("CHANGE_PLAYER_MODEL"_T, [] { if (selected_ped_type == -2) @@ -657,23 +657,23 @@ namespace big } }); - components::button("Spoof As Model", [] { + components::button("VIEW_SPAWN_PED_SPOOF_AS_MODEL"_T, [] { g.spoofing.spoof_player_model = true; g.spoofing.player_model = ped_model_buf; }); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("This WILL break freemode missions and jobs"); + ImGui::SetTooltip("VIEW_SPAWN_PED_SPOOF_AS_MODEL_TOOLTIP"_T.data()); if (g.spoofing.spoof_player_model) { ImGui::SameLine(); - components::button("Unspoof Model", [] { + components::button("VIEW_SPAWN_PED_UNSPOOF_MODEL"_T, [] { g.spoofing.spoof_player_model = false; }); } - components::button("Cleanup Spawned Peds", [] { + components::button("VIEW_SPAWN_PED_CLEANUP_SPAWNED_PEDS"_T, [] { for (auto& ped : spawned_peds) { PED::DELETE_PED(&ped.ped_handle); diff --git a/src/views/world/view_squad_spawner.cpp b/src/views/world/view_squad_spawner.cpp index b0b5b0bd..2f09c558 100644 --- a/src/views/world/view_squad_spawner.cpp +++ b/src/views/world/view_squad_spawner.cpp @@ -10,14 +10,14 @@ namespace big void view::squad_spawner() { - const char* const spawn_distance_modes[5]{"Custom", "On target", "Nearby", "Moderately distanced", "Far away"}; - const char* const combat_ability_levels[3]{"Poor", "Average", "Professional"}; + const char* const spawn_distance_modes[5]{"CUSTOM"_T.data(), "VIEW_SQUAD_SPAWNER_ON_TARGET"_T.data(), "VIEW_SQUAD_SPAWNER_NEARBY"_T.data(), "VIEW_SQUAD_SPAWNER_MODERATELY_DISTANCED"_T.data(), "VIEW_SQUAD_SPAWNER_FAR_AWAY"_T.data()}; + const char* const combat_ability_levels[3]{"VIEW_SQUAD_SPAWNER_POOR"_T.data(), "VIEW_SQUAD_SPAWNER_AVERAGE"_T.data(), "VIEW_SQUAD_SPAWNER_PROFESSIONAL"_T.data()}; static squad new_template{}; static player_ptr victim = g_player_service->get_selected(); - ImGui::SeparatorText("Victim"); + ImGui::SeparatorText("VIEW_SQUAD_SPAWNER_VICTIM"_T.data()); ImGui::SetNextItemWidth(200); if (ImGui::BeginCombo("##victim", victim->get_name())) { @@ -46,7 +46,7 @@ namespace big if (victim->id() != g_player_service->get_selected()->id() && victim->is_valid()) { ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.3f, 1.0f)); - ImGui::Text("Warning: Victim and selected player are not the same"); + ImGui::Text("VIEW_SQUAD_SPAWNER_WARNING"_T.data()); ImGui::PopStyleColor(); } @@ -59,16 +59,16 @@ namespace big if (ImGui::BeginPopupModal("##deletesquad")) { - ImGui::Text("Are you sure you want to delete %s?", deletion_squad.m_name); + ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_squad.m_name); - if (ImGui::Button("Yes")) + if (ImGui::Button("YES"_T.data())) { g_squad_spawner_service.delete_squad(deletion_squad); deletion_squad.m_name = ""; ImGui::CloseCurrentPopup(); } ImGui::SameLine(); - if (ImGui::Button("No")) + if (ImGui::Button("NO"_T.data())) { deletion_squad.m_name = ""; ImGui::CloseCurrentPopup(); @@ -79,9 +79,9 @@ namespace big ImGui::SetNextItemWidth(200); - if (ImGui::BeginCombo("Choose From Templates", "Templates")) + if (ImGui::BeginCombo("VIEW_SQUAD_SPAWNER_CHOOSE_FROM_TEMPLATES"_T.data(), "VIEW_SQUAD_SPAWNER_TEMPLATES"_T.data())) { - components::button("Fetch Custom Squads", [] { + components::button("VIEW_SQUAD_SPAWNER_FETCH_CUSTOM_SQUADS"_T, [] { g_squad_spawner_service.fetch_squads(); }); @@ -104,17 +104,17 @@ namespace big ImGui::EndCombo(); } if(ImGui::IsItemHovered()) - ImGui::SetTooltip("Shift click to delete"); + ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T.data()); - ImGui::SeparatorText("Squad Details"); + ImGui::SeparatorText("VIEW_SQUAD_SPAWNER_SQUAD_DETAILS"_T.data()); ImGui::BeginGroup(); //Main variables ImGui::Spacing(); ImGui::PushItemWidth(250); - components::input_text_with_hint("##name", "Name", new_template.m_name); - components::input_text_with_hint("##pedmodel", "Ped model", new_template.m_ped_model); + components::input_text_with_hint("##name", "NAME"_T, new_template.m_name); + components::input_text_with_hint("##pedmodel", "PED_MODEL"_T, new_template.m_ped_model); auto ped_found = std::find_if(g_gta_data_service->peds().begin(), g_gta_data_service->peds().end(), [=](const auto& pair) { return pair.second.m_name == new_template.m_ped_model; @@ -140,9 +140,9 @@ namespace big } } - components::input_text_with_hint("##vehmodel", "Vehicle model", new_template.m_vehicle_model); + components::input_text_with_hint("##vehmodel", "NAME_VEHICLE_MODEL"_T, new_template.m_vehicle_model); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Leave empty to spawn on foot"); + ImGui::SetTooltip("VIEW_SQUAD_SPAWNER_VEHICLE_TOOLTIP"_T.data()); auto veh_found = std::find_if(g_gta_data_service->vehicles().begin(), g_gta_data_service->vehicles().end(), [=](const auto& pair) { return pair.second.m_name == new_template.m_vehicle_model; @@ -168,9 +168,9 @@ namespace big } } - components::input_text_with_hint("##weapmodel", "Weapon model", new_template.m_weapon_model); + components::input_text_with_hint("##weapmodel", "VIEW_SQUAD_SPAWNER_WEAPON_MODEL"_T.data(), new_template.m_weapon_model); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Leave empty to spawn unarmed, beware that a player can only attain 3 melee attackers at a time"); + ImGui::SetTooltip("VIEW_SQUAD_SPAWNER_WEAPON_MODEL_TOOLTIP"_T.data()); auto weap_found = std::find_if(g_gta_data_service->weapons().begin(), g_gta_data_service->weapons().end(), [=](const auto& pair) { return pair.second.m_name == new_template.m_weapon_model; @@ -197,7 +197,7 @@ namespace big } ImGui::Spacing(); - ImGui::Text("Spawn Distance"); + ImGui::Text("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data()); if (ImGui::BeginCombo("##spawndistance", spawn_distance_modes[(int)new_template.m_spawn_distance_mode])) { for (int i = 0; i < 5; i++) @@ -207,7 +207,7 @@ namespace big } ImGui::EndCombo(); } - ImGui::Text("Squad Size"); + ImGui::Text("VIEW_DEBUG_GLOBAL_SIZE"_T.data()); ImGui::SliderInt("##squadsize", &new_template.m_squad_size, 1, 8); ImGui::PopItemWidth(); @@ -215,13 +215,13 @@ namespace big ImGui::SameLine(); ImGui::BeginGroup(); //General actions - ImGui::Text("Actions"); + ImGui::Text("VIEW_SQUAD_SPAWNER_ACTIONS"_T.data()); ImGui::Spacing(); - components::button(std::string("Terminate " + std::to_string(g_squad_spawner_service.m_active_squads.size()) + " squads"), [] { + components::button(std::format("{} {} {}", "SETTINGS_NOTIFY_GTA_THREADS_TERMINATE"_T, g_squad_spawner_service.m_active_squads.size(), "VIEW_SQUAD_SPAWNER_SQUADS"_T), [] { g_squad_spawner_service.terminate_squads(); }); - components::button("Reset Fields", [] { + components::button("VIEW_SQUAD_RESET_FIELDS"_T, [] { new_template.m_spawn_distance_mode = eSquadSpawnDistance::CLOSEBY; new_template.m_combat_ability_level = eCombatAbilityLevel::AVERAGE; new_template.m_name.clear(); @@ -229,7 +229,7 @@ namespace big new_template.m_ped_model.clear(); new_template.m_vehicle_model.clear(); new_template.m_weapon_model.clear(); - new_template.m_persistent_vehicle = "None"; + new_template.m_persistent_vehicle = "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(); new_template.m_squad_size = 1; new_template.m_ped_invincibility = 0; new_template.m_veh_invincibility = 0; @@ -249,57 +249,57 @@ namespace big ImGui::EndGroup(); ImGui::Spacing(); - if (ImGui::TreeNode("Advanced Options")) + if (ImGui::TreeNode("VIEW_SELF_ANIMATIONS_ADVANCED_OPTIONS"_T.data())) { ImGui::BeginGroup(); //Toggleables - ImGui::Checkbox("Spawn Ahead", &new_template.m_spawn_ahead); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_AHEAD"_T.data(), &new_template.m_spawn_ahead); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Will use the distance specified and apply it in a forward direction to find a position ahead of the target"); - ImGui::Checkbox("Favour Roads", &new_template.m_favour_roads); + ImGui::SetTooltip("VIEW_SQUAD_SPAWN_AHEAD_TOOLTIP"_T.data()); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_FAVOR_ROADS"_T.data(), &new_template.m_favour_roads); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Will try and find a road first"); - ImGui::Checkbox("Disperse", &new_template.m_disperse); + ImGui::SetTooltip("VIEW_SQUAD_SPAWN_FAVOR_ROADS_TOOLTIP"_T.data()); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_DISPERSE"_T.data(), &new_template.m_disperse); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("If the squad is on foot, will scatter units within the spawn distance"); - ImGui::Checkbox("Vehicle Catch Up", &new_template.m_spawn_behind_same_velocity); + ImGui::SetTooltip("VIEW_SQUAD_SPAWN_DISPERSE_TOOLTIP"_T.data()); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_VEHICLE_CATCH_UP"_T.data(), &new_template.m_spawn_behind_same_velocity); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Will spawn the mobile squad behind the target with identical velocity if applicable.\nOnly for squads with a vehicle."); - ImGui::Checkbox("Stay In Vehicle", &new_template.m_stay_in_veh); - ImGui::Checkbox("Vehicle Mods Maxed", &new_template.m_max_vehicle); + ImGui::SetTooltip("VIEW_SQUAD_SPAWN_VEHICLE_CATCH_UP_TOOLTIP"_T.data()); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_STAY_IN_VEHICLE"_T.data(), &new_template.m_stay_in_veh); + ImGui::Checkbox("MAX_VEHICLE"_T.data(), &new_template.m_max_vehicle); ImGui::EndGroup(); ImGui::SameLine(); ImGui::BeginGroup(); - ImGui::Checkbox("Ped God Mode", &new_template.m_ped_invincibility); - ImGui::Checkbox("Vehicle God Mode", &new_template.m_veh_invincibility); - ImGui::Checkbox("Headshot Proof", &new_template.m_ped_proofs[0]); - ImGui::Checkbox("Bullet Proof", &new_template.m_ped_proofs[1]); - ImGui::Checkbox("Flame Proof", &new_template.m_ped_proofs[2]); - ImGui::Checkbox("Melee Proof", &new_template.m_ped_proofs[3]); - ImGui::Checkbox("Explosion Proof", &new_template.m_ped_proofs[4]); + ImGui::Checkbox("GOD_MODE"_T.data(), &new_template.m_ped_invincibility); + ImGui::Checkbox("VEHICLE_GOD"_T.data(), &new_template.m_veh_invincibility); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_HEADSHOT_PROOF"_T.data(), &new_template.m_ped_proofs[0]); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_BULLET_PROOF"_T.data(), &new_template.m_ped_proofs[1]); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_FLAME_PROOF"_T.data(), &new_template.m_ped_proofs[2]); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_MELEE_PROOF"_T.data(), &new_template.m_ped_proofs[3]); + ImGui::Checkbox("VIEW_SQUAD_SPAWN_EXPLOSION_PROOF"_T.data(), &new_template.m_ped_proofs[4]); ImGui::EndGroup(); ImGui::SameLine(); ImGui::BeginGroup(); //Slideables ImGui::PushItemWidth(200); - ImGui::Text("Ped Health"); + ImGui::Text("VIEW_PLAYER_INFO_HEALTH"_T.data()); ImGui::SliderFloat("##pedhealth", &new_template.m_ped_health, 0, 2000); - ImGui::Text("Ped Armor"); + ImGui::Text("VIEW_SQUAD_SPAWN_ARMOR"_T.data()); ImGui::SliderFloat("##pedarmor", &new_template.m_ped_armor, 0, 2000); - ImGui::Text("Ped Accuracy"); + ImGui::Text("VIEW_SQUAD_SPAWN_ACCURACY"_T.data()); ImGui::SliderFloat("##pedaccuracy", &new_template.m_ped_accuracy, 0, 100); - ImGui::Text("Custom Spawn Distance"); + ImGui::Text("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data()); ImGui::SliderFloat("##customspawndistance", &new_template.m_spawn_distance, 0, 500); ImGui::EndGroup(); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Leave these values at 0 to default, except for accuracy."); + ImGui::SetTooltip("VIEW_SQUAD_SPAWN_DEFAULT_TOOLTIP"_T.data()); ImGui::SameLine(); ImGui::BeginGroup(); //Chooseables - ImGui::Text("Combat Ability"); + ImGui::Text("VIEW_SQUAD_SPAWN_COMBAT_ABILITY"_T.data()); if (ImGui::BeginCombo("##combatability", combat_ability_levels[(int)new_template.m_combat_ability_level])) { for (int i = 0; i < 3; i++) @@ -310,11 +310,11 @@ namespace big ImGui::EndCombo(); } - ImGui::Text("Persistent Vehicle"); + ImGui::Text("VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE"_T.data()); if (ImGui::BeginCombo("##persistent_vehicle", new_template.m_persistent_vehicle.data())) { - if (ImGui::Selectable("None", new_template.m_persistent_vehicle == "None")) - new_template.m_persistent_vehicle = "None"; + if (ImGui::Selectable("VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(), new_template.m_persistent_vehicle == "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data())) + new_template.m_persistent_vehicle = "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(); for (auto& p : persist_car_service::list_files()) { if (ImGui::Selectable(p.data(), p == new_template.m_persistent_vehicle)) @@ -325,7 +325,7 @@ namespace big ImGui::PopItemWidth(); ImGui::EndGroup(); - components::input_text_with_hint("##new_template.m_description", "Description", new_template.m_description); + components::input_text_with_hint("##new_template.m_description", "VIEW_SQUAD_SPAWN_DESCRIPTION"_T, new_template.m_description); ImGui::TreePop(); } @@ -333,12 +333,12 @@ namespace big static auto check_validity = [=](bool save) -> bool { if (!victim->is_valid() && !save) { - g_notification_service->push_error("Squad spawner", "Choose a victim first"); + g_notification_service->push_error("GUI_TAB_SQUAD_SPAWNER"_T.data(), "VIEW_SQUAD_SPAWN_CHOOSE_FIRST"_T.data()); return false; } if (std::string(new_template.m_ped_model).empty()) { - g_notification_service->push_error("Squad spawner", "A ped model is required"); + g_notification_service->push_error("GUI_TAB_SQUAD_SPAWNER"_T.data(), "VIEW_SQUAD_SPAWN_MODEL_REQUIRED"_T.data()); return false; } @@ -360,32 +360,32 @@ namespace big return exists; }; - components::button("Spawn Squad", [] { + components::button("VIEW_SQUAD_SPAWN_SPAWN_SQUAD"_T, [] { try { if (check_validity(false)) g_squad_spawner_service.spawn_squad({new_template.m_name, - new_template.m_ped_model, - new_template.m_weapon_model, - new_template.m_vehicle_model, - new_template.m_squad_size, - new_template.m_ped_invincibility, - new_template.m_veh_invincibility, - new_template.m_ped_proofs, - new_template.m_ped_health, - new_template.m_ped_armor, - new_template.m_spawn_distance, - new_template.m_ped_accuracy, - new_template.m_spawn_distance_mode, - new_template.m_combat_ability_level, - new_template.m_stay_in_veh, - new_template.m_spawn_behind_same_velocity, - new_template.m_description, - new_template.m_disperse, - new_template.m_spawn_ahead, - new_template.m_favour_roads, - new_template.m_max_vehicle, - new_template.m_persistent_vehicle}, + new_template.m_ped_model, + new_template.m_weapon_model, + new_template.m_vehicle_model, + new_template.m_squad_size, + new_template.m_ped_invincibility, + new_template.m_veh_invincibility, + new_template.m_ped_proofs, + new_template.m_ped_health, + new_template.m_ped_armor, + new_template.m_spawn_distance, + new_template.m_ped_accuracy, + new_template.m_spawn_distance_mode, + new_template.m_combat_ability_level, + new_template.m_stay_in_veh, + new_template.m_spawn_behind_same_velocity, + new_template.m_description, + new_template.m_disperse, + new_template.m_spawn_ahead, + new_template.m_favour_roads, + new_template.m_max_vehicle, + new_template.m_persistent_vehicle}, victim, new_template.m_spawn_distance_mode == eSquadSpawnDistance::CUSTOM, g_orbital_drone_service.m_ground_pos); @@ -397,7 +397,7 @@ namespace big }); ImGui::SameLine(); - components::button("Save", [] { + components::button("SAVE"_T, [] { if (check_validity(true) && !check_if_exists(new_template.m_name)) g_squad_spawner_service.save_squad(new_template); }); diff --git a/src/views/world/view_time_and_weather.cpp b/src/views/world/view_time_and_weather.cpp index 1fb94df7..ba505d98 100644 --- a/src/views/world/view_time_and_weather.cpp +++ b/src/views/world/view_time_and_weather.cpp @@ -20,7 +20,7 @@ namespace big if (g.world.override_weather) { - if (ImGui::BeginCombo("Weather", weathers[g.world.local_weather])) + if (ImGui::BeginCombo("VIEW_TIME_AND_WEATHER_WEATHER"_T.data(), weathers[g.world.local_weather])) { for (int i = 0; i < weathers.size(); i++) { diff --git a/src/views/world/view_vfx.cpp b/src/views/world/view_vfx.cpp index 3a04c5f9..8d40d62d 100644 --- a/src/views/world/view_vfx.cpp +++ b/src/views/world/view_vfx.cpp @@ -4,7 +4,7 @@ namespace big { void view::vfx() { - ImGui::Checkbox("Enable Custom Sky Color", &g.vfx.enable_custom_sky_color); + ImGui::Checkbox("VIEW_VFX_ENABLE_CUSTOM_SKY_COLOR"_T.data(), &g.vfx.enable_custom_sky_color); ImGui::ColorEdit4("VFX_AZIMUTH_EAST"_T.data(), (float*)&g.vfx.azimuth_east); ImGui::ColorEdit4("VFX_AZIMUTH_WEST"_T.data(), (float*)&g.vfx.azimuth_west); diff --git a/src/views/world/view_world.cpp b/src/views/world/view_world.cpp index 7aa7e6c6..28b6cdd8 100644 --- a/src/views/world/view_world.cpp +++ b/src/views/world/view_world.cpp @@ -14,9 +14,9 @@ namespace big view::time_and_weather(); } - ImGui::SeparatorText("Peds"); + ImGui::SeparatorText("PED"_T.data()); - components::button("Kill", [] { + components::button("VIEW_DEBUG_THREADS_KILL"_T, [] { for (auto peds : entity::get_entities(false, true)) { if (!PED::IS_PED_A_PLAYER(peds)) @@ -25,7 +25,7 @@ namespace big }); ImGui::SameLine(); - components::button("Kill Enemies", [] { + components::button("VIEW_WORLD_KILL_ENEMIES"_T, [] { for (auto ped : entity::get_entities(false, true)) { if (!PED::IS_PED_A_PLAYER(ped)) @@ -48,14 +48,13 @@ namespace big components::command_checkbox<"pedrush">(); ImGui::SameLine(); components::command_checkbox<"autodisarm">(); - components::options_modal("Auto Disarm", [] { - ImGui::Checkbox("Neutralize", &g.world.nearby.auto_disarm.neutralize); + components::options_modal("VIEW_WORLD_AUTO_DISARM"_T.data(), [] { + ImGui::Checkbox("VIEW_WORLD_NEUTRALIZE"_T.data(), &g.world.nearby.auto_disarm.neutralize); }); - ImGui::SeparatorText("Vehicles"); - components::sub_title("Vehicles"); + ImGui::SeparatorText("VEHICLES"_T.data()); - components::button("Max Upgrade", [] { + components::button("MAX_VEHICLE"_T, [] { for (auto vehs : entity::get_entities(true, false)) { if (entity::take_control_of(vehs)) @@ -67,7 +66,7 @@ namespace big }); ImGui::SameLine(); - components::button("Downgrade", [] { + components::button("VIEW_WORLD_DOWNGRADE"_T, [] { for (auto vehs : entity::get_entities(true, false)) { if (entity::take_control_of(vehs)) @@ -80,26 +79,26 @@ namespace big components::command_checkbox<"vehiclerain">(); - ImGui::SeparatorText("Entities"); + ImGui::SeparatorText("VIEW_BLACKHOLE_ENTITIES"_T.data()); static bool included_entity_types[3]; static bool own_vehicle, deleting, force; static int quantity, remaining; - ImGui::Text("Include:"); - ImGui::Checkbox("Vehicles", &included_entity_types[0]); + ImGui::Text("VIEW_WORLD_INCLUDE"_T.data()); + ImGui::Checkbox("VEHICLES"_T.data(), &included_entity_types[0]); ImGui::SameLine(); - ImGui::Checkbox("Peds", &included_entity_types[1]); + ImGui::Checkbox("PED"_T.data(), &included_entity_types[1]); ImGui::SameLine(); - ImGui::Checkbox("Props", &included_entity_types[2]); + ImGui::Checkbox("VIEW_WORLD_PROPS"_T.data(), &included_entity_types[2]); if (included_entity_types[0]) { - ImGui::Checkbox("Self vehicle", &own_vehicle); + ImGui::Checkbox("VIEW_WORLD_SELF_VEHICLE"_T.data(), &own_vehicle); ImGui::SameLine(); } - ImGui::Checkbox("Force", &force); + ImGui::Checkbox("FORCE"_T.data(), &force); if (deleting) { @@ -108,12 +107,12 @@ namespace big } else { - components::button("Delete all", [&] { + components::button("VIEW_WORLD_DELETE_ALL"_T, [&] { auto list = entity::get_entities(included_entity_types[0], included_entity_types[1], included_entity_types[2], own_vehicle); quantity = list.size(); remaining = quantity; - g_notification_service->push("Entity Deletion", std::format("Deleting {} entities", quantity)); + g_notification_service->push("GUI_TAB_TIME_N_WEATHER"_T.data(), std::format("Deleting {} entities", quantity)); deleting = true; int failed = 0; @@ -153,7 +152,7 @@ namespace big } if (failed > 0) - g_notification_service->push_warning("Entity Deletion", std::format("Failed deleting {} entities", failed)); + g_notification_service->push_warning("GUI_TAB_TIME_N_WEATHER"_T.data(), std::format("Failed deleting {} entities", failed)); deleting = false; });