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

View File

@ -153,7 +153,7 @@ void Menu::DrawOverlay()
{
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)

View File

@ -74,7 +74,7 @@ private:
static void NodeWrapperRecursive(RwFrame* frame, CVehicle* pVeh, std::function<void(RwFrame*)> func);
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 GenerateNodeList(CVehicle* pVeh, std::vector<std::string>& names_vec, std::string& selected);

View File

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

View File

@ -923,6 +923,12 @@ void Visual::ShowPage()
init_patches = true;
}
ImGui::Spacing();
ImGui::SameLine();
ImGui::TextWrapped(TEXT("Visual.IncompatibleMods"));
Widget::Tooltip(TEXT("Visual.IncompatibleModsText"));
ImGui::Spacing();
#endif
if (ImGui::BeginChild("VisualsChild"))
{
@ -943,11 +949,6 @@ void Visual::ShowPage()
ImGui::Separator();
}
#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));
Widget::EditAddr<float>(TEXT("Visual.ArmourbarPosX"), 0x866B78, -999, 94, 999);
Widget::EditAddr<float>(TEXT("Visual.ArmourbarPosY"), 0x862D38, -999, 48, 999);