Fixes, add vehicle health menu

This commit is contained in:
Grinch_ 2022-07-13 09:51:21 +06:00
parent 2d59f7eda9
commit f3e0b10b6d
6 changed files with 18 additions and 12 deletions

View File

@ -0,0 +1,3 @@
##############################################################################
# Texture Favoirites
##############################################################################

View File

@ -230,9 +230,9 @@ Left-click selects hotkey.
Left clicking outside deselects. Left clicking outside deselects.
Right click disables hotkey.""" Right click disables hotkey."""
VehEngineKey = "Toggle vehicle engine" VehEngineKey = "Toggle vehicle engine"
VehHealth = "Veh Health: %.f" VehHealth = "Vehicle health"
VehicleSpawned = "Vehicle spawned" VehicleSpawned = "Vehicle spawned"
VehSpeed = "Veh Speed: %d" VehSpeed = "Vehicle speed: %d"
VehStartKey = "Vehicle instant start" VehStartKey = "Vehicle instant start"
VehStopKey = "Vehicle instant start" VehStopKey = "Vehicle instant start"
Version = "Version" Version = "Version"
@ -720,8 +720,8 @@ WhiteScanlines = "White scanlines"
[Weapon] [Weapon]
Ammo = "Ammo" Ammo = "Ammo"
CurrentWeapon = "Current weapon: %s" CurrentWeapon = "Current weapon: %s"
DropAll = "Drop all" DropAll = "Remove all"
DropCurrent = "Drop current" DropCurrent = "Remove current"
DropWeapon = "Drop weapon" DropWeapon = "Drop weapon"
DualWeild = "Dual wield" DualWeild = "Dual wield"
DualWeildText = """ DualWeildText = """

View File

@ -153,7 +153,7 @@ void Menu::DrawOverlay()
{ {
if (Overlay::bVehHealth) if (Overlay::bVehHealth)
{ {
ImGui::Text(TEXT("Menu.VehHealth"), pPlayer->m_pVehicle->m_fHealth); ImGui::Text((TEXT_S("Menu.VehHealth") + ": %.f").c_str(), pPlayer->m_pVehicle->m_fHealth);
} }
if (Overlay::bVehSpeed) if (Overlay::bVehSpeed)

View File

@ -74,7 +74,7 @@ private:
static void NodeWrapperRecursive(RwFrame* frame, CVehicle* pVeh, std::function<void(RwFrame*)> func); static void NodeWrapperRecursive(RwFrame* frame, CVehicle* pVeh, std::function<void(RwFrame*)> func);
public: public:
static inline ResourceStore m_TextureData { "textures", eResourceType::TYPE_IMAGE, ImVec2(100, 80) }; static inline ResourceStore m_TextureData { "textures", eResourceType::TYPE_IMAGE_TEXT, ImVec2(100, 80) };
static void InjectHooks(); static void InjectHooks();
static void GenerateNodeList(CVehicle* pVeh, std::vector<std::string>& names_vec, std::string& selected); static void GenerateNodeList(CVehicle* pVeh, std::vector<std::string>& names_vec, std::string& selected);

View File

@ -980,7 +980,9 @@ void Vehicle::ShowPage()
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
} }
#endif #endif
Widget::EditAddr<float>(TEXT("Menu.VehHealth"), (int)&pVeh->m_fHealth, 0, 0, 1000);
if (ImGui::CollapsingHeader(TEXT("Vehicle.SetSpeed"))) if (ImGui::CollapsingHeader(TEXT("Vehicle.SetSpeed")))
{ {
Widget::Checkbox(TEXT("Vehicle.LockSpeed"), &m_bLockSpeed); Widget::Checkbox(TEXT("Vehicle.LockSpeed"), &m_bLockSpeed);

View File

@ -923,6 +923,12 @@ void Visual::ShowPage()
init_patches = true; init_patches = true;
} }
ImGui::Spacing();
ImGui::SameLine();
ImGui::TextWrapped(TEXT("Visual.IncompatibleMods"));
Widget::Tooltip(TEXT("Visual.IncompatibleModsText"));
ImGui::Spacing();
#endif #endif
if (ImGui::BeginChild("VisualsChild")) if (ImGui::BeginChild("VisualsChild"))
{ {
@ -943,11 +949,6 @@ void Visual::ShowPage()
ImGui::Separator(); ImGui::Separator();
} }
#ifdef GTASA #ifdef GTASA
ImGui::Spacing();
ImGui::SameLine();
ImGui::TextWrapped(TEXT("Visual.IncompatibleMods"));
Widget::Tooltip(TEXT("Visual.IncompatibleModsText"));
ImGui::Spacing();
ColorPickerAddr(TEXT("Visual.ArmourbarColor"), *(int*)0x5890FC, ImVec4(225, 225, 225, 255)); ColorPickerAddr(TEXT("Visual.ArmourbarColor"), *(int*)0x5890FC, ImVec4(225, 225, 225, 255));
Widget::EditAddr<float>(TEXT("Visual.ArmourbarPosX"), 0x866B78, -999, 94, 999); Widget::EditAddr<float>(TEXT("Visual.ArmourbarPosX"), 0x866B78, -999, 94, 999);
Widget::EditAddr<float>(TEXT("Visual.ArmourbarPosY"), 0x862D38, -999, 48, 999); Widget::EditAddr<float>(TEXT("Visual.ArmourbarPosY"), 0x862D38, -999, 48, 999);