Finished the menu translation support
This commit is contained in:
parent
e1c7ec9e6f
commit
3b9f4d0541
35
README.md
35
README.md
@ -53,21 +53,6 @@ Install [Crash info](https://www.mixmods.com.br/2021/06/crashinfo.html) & reprod
|
||||
|
||||
You can either open a issue here or directly contact me on discord (Recommended).
|
||||
|
||||
|
||||
## Required to build
|
||||
1. [Build Tools 2022](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)
|
||||
2. [DirectX9 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=6812)
|
||||
4. [Plugin SDK](https://github.com/DK22Pac/plugin-sdk)
|
||||
5. [Premake5](https://premake.github.io/) - Comes with already.
|
||||
|
||||
## Projects used
|
||||
1. [ImGui](https://github.com/ocornut/imgui)
|
||||
2. [Kiero](https://github.com/Rebzzel/kiero)
|
||||
3. [MinHook](https://github.com/TsudaKageyu/minhook)
|
||||
4. [Plugin SDK](https://github.com/DK22Pac/plugin-sdk)
|
||||
|
||||
All credits are given in Menu/About tab.
|
||||
|
||||
## Images
|
||||
<details>
|
||||
<summary>Show Images</summary>
|
||||
@ -92,6 +77,26 @@ All credits are given in Menu/About tab.
|
||||
<img src="https://raw.githubusercontent.com/user-grinch/Cheat-Menu/rewrite/images/19.png">
|
||||
</details>
|
||||
|
||||
## Submit Translations
|
||||
*How to translate Cheat Menu to another language*
|
||||
|
||||
The translations are loaded from `CheatMenu/locale/*.json` files. Make a copy of the `English.json` file and translate the texts there to your language. Rename the file to `your_language.json` and make a pull request.
|
||||
|
||||
|
||||
## Required to build
|
||||
1. [Build Tools 2022](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)
|
||||
2. [DirectX9 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=6812)
|
||||
4. [Plugin SDK](https://github.com/DK22Pac/plugin-sdk)
|
||||
5. [Premake5](https://premake.github.io/) - Comes with already.
|
||||
|
||||
## Projects used
|
||||
1. [ImGui](https://github.com/ocornut/imgui)
|
||||
2. [Kiero](https://github.com/Rebzzel/kiero)
|
||||
3. [MinHook](https://github.com/TsudaKageyu/minhook)
|
||||
4. [Plugin SDK](https://github.com/DK22Pac/plugin-sdk)
|
||||
|
||||
All credits are given in Menu/About tab.
|
||||
|
||||
## How to add ___ to CheatMenu (SA Only)
|
||||
|
||||
*Be careful about editing 'json' files, especially commas! Check [here](https://en.wikipedia.org/wiki/JSON). Use [Magic TXD](https://gtaforums.com/topic/851436-relopensrc-magictxd/) to open **.txd** files*
|
||||
|
@ -239,7 +239,7 @@
|
||||
"LockControl": "Lock control",
|
||||
"LungCapacity": "Lung capacity",
|
||||
"MaxAppeal": "Max sex appeal",
|
||||
"MaxArmour" : "Max armour",
|
||||
"MaxArmour": "Max armour",
|
||||
"MaxHealth": "Max health",
|
||||
"MeeleProof": "Meele proof",
|
||||
"MegaJump": "Mega jump",
|
||||
@ -287,6 +287,161 @@
|
||||
"TeleportMarker": "Teleport to marker",
|
||||
"TeleportToCoord": "Teleport to coordinates"
|
||||
},
|
||||
"Vehicle": {
|
||||
"Abs": "Abs",
|
||||
"ADM": "Anti dive multiplier",
|
||||
"AggroDriver": "Aggressive driver",
|
||||
"AimDrive": "Aim while driving",
|
||||
"All": "All",
|
||||
"AllNitro": "All cars have nitro",
|
||||
"AllTaxiNitro": "All taxis have nitro",
|
||||
"AnimGroup": "Anim group",
|
||||
"Big": "Big",
|
||||
"BikeFly": "Bikes fly",
|
||||
"Black": "Black",
|
||||
"BlowCar": "Blow up cars",
|
||||
"BoatFly": "Boats fly",
|
||||
"BrakeBias": "Brake bias",
|
||||
"BrakeDecel": "Brake deceleration",
|
||||
"BulletProof": "Bullet proof",
|
||||
"CarFly": "Cars fly",
|
||||
"CarHeavy": "Cars heavy",
|
||||
"CDM": "Collision damage multiplier",
|
||||
"CemterMassX": "Centre of mass X",
|
||||
"CemterMassY": "Centre of mass Y",
|
||||
"CemterMassZ": "Centre of mass Z",
|
||||
"Cheap": "Cheap",
|
||||
"Color": "Color",
|
||||
"ColorPicker": "Color picker",
|
||||
"ColProof": "Collision proof",
|
||||
"Component": "Component",
|
||||
"Country": "Country",
|
||||
"Damage": "Damage",
|
||||
"DampingLvl": "Damping level",
|
||||
"DensityMul": "Density multiplier",
|
||||
"DirtLvl": "Dirt level",
|
||||
"Diseal": "Diseal",
|
||||
"DmgProof": "Damage proof",
|
||||
"DmgProofTip": "Every vehicle entered will be damage proof\nBullet, Collision, Explosion, Fire, Meele etc",
|
||||
"Doors": "Doors",
|
||||
"DragMult": "Drag multiplier",
|
||||
"Driver": "Driver",
|
||||
"DriverTarget": "Driver targetable",
|
||||
"DriveType": "Drive type",
|
||||
"DriveWater": "Drive on water",
|
||||
"Electric": "Electric",
|
||||
"EngineAccel": "Engine acceleration",
|
||||
"EngineInertia": "Engine inertia",
|
||||
"EngineOn": "Engine on",
|
||||
"EngineType": "Engine type",
|
||||
"EnterNearVeh": "Enter nearest vehicle as",
|
||||
"ExplosionProof": "Explosion proof",
|
||||
"Fast": "Fast",
|
||||
"FireProof": "Fire proof",
|
||||
"Fix": "Fix",
|
||||
"FixCar": "Fix vehicle",
|
||||
"FlipCar": "Flip vehicle",
|
||||
"FloatOnHit": "Float away when hit",
|
||||
"ForceLevel": "Force level",
|
||||
"ForCurVeh": "For current vehicle,",
|
||||
"FourWheelDrive": "Four wheel drive",
|
||||
"FrontLights": "Front lights",
|
||||
"FrontWheelDrive": "Front wheel drive",
|
||||
"GreenLights": "Green traffic lights",
|
||||
"HandlingFlags": "Handling flags",
|
||||
"HandlingTab": "Handling",
|
||||
"HighSpeedDamping": "High speed damping",
|
||||
"HSTarget": "HS targetable",
|
||||
"HSTargetTip": "Heat Seaker missile can target this",
|
||||
"InfNitro": "Unlimited nitro",
|
||||
"InfNitroTip": "Nitro will activate when left clicked\n\n\nEnabling this would disable\nAll cars have nitro\nAll taxis have nitro",
|
||||
"InstantStop": "Instant stop",
|
||||
"InvisCar": "Invisible car",
|
||||
"LessDmg": "Take less damage",
|
||||
"LessTraffic": "Decreased traffic",
|
||||
"LightsOn": "Lights on",
|
||||
"LockDoor": "Lock doors",
|
||||
"LockSpeed": "Lock speed",
|
||||
"LockTrainCam": "Lock train camera",
|
||||
"Long": "Long",
|
||||
"LowerLimit": "Lower limit",
|
||||
"Mass": "Mass",
|
||||
"MatFilter": "Material filter",
|
||||
"MaxVelocity": "Max velocity",
|
||||
"MeleeProof": "Melee proof",
|
||||
"ModelFlags": "Model flags",
|
||||
"MonValue": "Monetary value",
|
||||
"NeonsTab": "Neons",
|
||||
"NoColl": "Disable collisions",
|
||||
"NoNearVeh": "No nearby vehicles",
|
||||
"NoParticles": "Disable particles",
|
||||
"NumGears": "Number of gears",
|
||||
"Off": "Off",
|
||||
"On": "On",
|
||||
"OnlyWheels": "Wheels only",
|
||||
"Open": "Open",
|
||||
"Paintjob": "Paintjob",
|
||||
"Passenger": "Passenger ",
|
||||
"PentrolTank": "Petrol tank KO",
|
||||
"PercentSubmerged": "Percent submerged",
|
||||
"PerfectHandling": "Perfect handling",
|
||||
"Petrol": "Petrol",
|
||||
"PetrolTankTip": "Vehicle will blow up if petrol tank is shot",
|
||||
"Pink": "Pink",
|
||||
"PlateText": "License plate text",
|
||||
"Pop": "Pop",
|
||||
"Primary": "Primary",
|
||||
"PulsingNeon": "Pulsing neons",
|
||||
"Quaternary": "Quaternary",
|
||||
"Radius": "Radius",
|
||||
"RainbowNeon": "Rainbow neons",
|
||||
"RainbowNeonMSG": "Rainbow effect to neon lights",
|
||||
"ReadMore": "Read more",
|
||||
"RearLights": "Rear lights",
|
||||
"RearWheelDrive": "Rear wheel drive",
|
||||
"RemoveNeon": "Remove neon",
|
||||
"RemoveNeonMSG": "Neon removed sucessfully",
|
||||
"RemoveVeh": "Remove vehicles",
|
||||
"RemoveVehRadius": "Remove vehicles in radius",
|
||||
"ResetColor": "Reset color",
|
||||
"ResetColorMSG": "Color reset sucessfully",
|
||||
"ResetHandling": "Reset handling",
|
||||
"ResetHandlingMSG": "Handling reset sucessfully",
|
||||
"ResetTexture": "Reset texture",
|
||||
"ResetTextureMSG": "Texture reset sucessfully",
|
||||
"SaveFile": "Save to file",
|
||||
"SaveFileMSG": "Handling saved successfully",
|
||||
"SeatOffset": "Seat offset",
|
||||
"Secondary": "Secondary",
|
||||
"SelectPreset": "Select preset:",
|
||||
"Set": "Set",
|
||||
"SetSpeed": "Set speed",
|
||||
"Siren": "Siren",
|
||||
"SkidMarks": "Always skid marks",
|
||||
"Small": "Small",
|
||||
"SpawnInAir": "Spawn aircraft in air",
|
||||
"SpawnInside": "Spawn inside as driver",
|
||||
"StayOnBike": "Don't fall off bike",
|
||||
"SteeringLock": "Steering lock",
|
||||
"SuspensionBias": "Suspension bias",
|
||||
"Tall": "Tall",
|
||||
"TankMode": "Tank mode",
|
||||
"Tertiary": "Tertiary",
|
||||
"TextureTab": "Textures",
|
||||
"TotalSeats": "Total seats: %d",
|
||||
"TractionBias": "Traction bias",
|
||||
"TractionLoss": "Traction loss",
|
||||
"TractionMul": "Traction multiplier",
|
||||
"TrafficNeon": "Traffic neons",
|
||||
"TrafficNeonMSG": "Adds neon lights to traffic vehicles.\n\nOnly some vehicles will have them.",
|
||||
"TrafficOpt": "Traffic options",
|
||||
"TuneTab": "Tune",
|
||||
"TurnMass": "Turn mass",
|
||||
"Type": "Type",
|
||||
"UpperLimit": "Upper limit",
|
||||
"Watertight": "Watertight car",
|
||||
"WatertightTip": "Peds inside won't drown if the vehicle\nis submerged in water"
|
||||
},
|
||||
"Visual": {
|
||||
"Ambient": "Ambient",
|
||||
"AmbientBl": "Ambient bl",
|
||||
@ -443,108 +598,5 @@
|
||||
"VehiclePage": "Vehicle",
|
||||
"VisualPage": "Visual",
|
||||
"WeaponPage": "Weapon"
|
||||
},
|
||||
"Vehicle" : {
|
||||
"BlowCar" : "Blow up cars",
|
||||
"FixCar" : "Fix vehicle",
|
||||
"FlipCar" : "Flip vehicle",
|
||||
"AimDrive" : "Aim while driving",
|
||||
"AllNitro" : "All cars have nitro",
|
||||
"AggroDriver" : "Aggressive driver",
|
||||
"AllTaxiNitro" : "All taxis have nitro",
|
||||
"BikeFly" : "Bikes fly",
|
||||
"BoatFly" : "Boats fly",
|
||||
"CarFly" : "Cars fly",
|
||||
"CarHeavy" : "Cars heavy",
|
||||
"DmgProof" : "Damage proof",
|
||||
"DmgProofTip" : "Every vehicle entered will be damage proof\nBullet, Collision, Explosion, Fire, Meele etc",
|
||||
"LessTraffic" : "Decreased traffic",
|
||||
"NoColl" : "Disable collisions",
|
||||
"StayOnBike" : "Don't fall off bike",
|
||||
"DriveWater" : "Drive on water",
|
||||
"LockTrainCam" : "Lock train camera",
|
||||
"FloatOnHit" : "Float away when hit",
|
||||
"GreenLights" : "Green traffic lights",
|
||||
"PerfectHandling" : "Perfect handling",
|
||||
"TankMode" : "Tank mode",
|
||||
"InfNitro" : "Unlimited nitro",
|
||||
"InfNitroTip" : "Nitro will activate when left clicked\n\n\nEnabling this would disable\nAll cars have nitro\nAll taxis have nitro",
|
||||
"Watertight" : "Watertight car",
|
||||
"WatertightTip" : "Peds inside won't drown if the vehicle\nis submerged in water",
|
||||
"OnlyWheels" : "Wheels only",
|
||||
"ForCurVeh" : "For current vehicle,",
|
||||
"SkidMarks" : "Always skid marks",
|
||||
"BulletProof" : "Bullet proof",
|
||||
"ColProof" : "Collision proof",
|
||||
"NoParticles" : "Disable particles",
|
||||
"DriverTarget" : "Driver targetable",
|
||||
"EngineOn" : "Engine on",
|
||||
"ExplosionProof" : "Explosion proof",
|
||||
"FireProof" : "Fire proof",
|
||||
"HSTarget" : "HS targetable",
|
||||
"HSTargetTip" : "Heat Seaker missile can target this",
|
||||
"InvisCar" : "Invisible car",
|
||||
"LightsOn" : "Lights on",
|
||||
"LockDoor" : "Lock doors",
|
||||
"MeleeProof" :"Melee proof",
|
||||
"PentrolTank" : "Petrol tank KO",
|
||||
"PetrolTankTip" : "Vehicle will blow up if petrol tank is shot",
|
||||
"Siren" : "Siren",
|
||||
"LessDmg" : "Take less damage",
|
||||
"DensityMul" : "Density multiplier",
|
||||
"EnterNearVeh" : "Enter nearest vehicle as",
|
||||
"TotalSeats" : "Total seats: %d",
|
||||
"Driver" : "Driver",
|
||||
"Passenger" : "Passenger ",
|
||||
"NoNearVeh" : "No nearby vehicles",
|
||||
"RemoveVehRadius" : "Remove vehicles in radius",
|
||||
"Radius" : "Radius",
|
||||
"RemoveVeh" : "Remove vehicles",
|
||||
"TrafficOpt" : "Traffic options",
|
||||
"Black" : "Black",
|
||||
"Pink" : "Pink",
|
||||
"Color" : "Color",
|
||||
"Cheap" : "Cheap",
|
||||
"Country" : "Country",
|
||||
"Fast" : "Fast",
|
||||
"Type" : "Type",
|
||||
"DirtLvl" : "Dirt level",
|
||||
"Doors" : "Doors",
|
||||
"Damage" : "Damage",
|
||||
"Fix" : "Fix",
|
||||
"Open" : "Open",
|
||||
"Pop" : "Pop",
|
||||
"All" : "All",
|
||||
"SetSpeed" : "Set speed",
|
||||
"LockSpeed" : "Lock speed",
|
||||
"InstantStop" : "Instant stop",
|
||||
"Set" : "Set",
|
||||
"SpawnInside" : "Spawn inside as driver",
|
||||
"SpawnInAir" : "Spawn aircraft in air",
|
||||
"PlateText" : "License plate text",
|
||||
"ResetColor" : "Reset color",
|
||||
"ResetColorMSG" : "Color reset sucessfully",
|
||||
"Component" : "Component",
|
||||
"ColorPicker" : "Color picker",
|
||||
"MatFilter" : "Material filter",
|
||||
"Primary" : "Primary",
|
||||
"Secondary" : "Secondary",
|
||||
"Tertiary" : "Tertiary",
|
||||
"Quaternary" : "Quaternary",
|
||||
"SelectPreset" : "Select preset:",
|
||||
"NeonsTab" : "Neons",
|
||||
"RemoveNeon" : "Remove neon",
|
||||
"RemoveNeonMSG" : "Neon removed sucessfully",
|
||||
"PulsingNeon" : "Pulsing neons",
|
||||
"RainbowNeon" : "Rainbow neons",
|
||||
"RainbowNeonMSG" : "Rainbow effect to neon lights",
|
||||
"TrafficNeon" : "Traffic neons",
|
||||
"TrafficNeonMSG" : "Adds neon lights to traffic vehicles.\n\nOnly some vehicles will have them.",
|
||||
"TextureTab" : "Textures",
|
||||
"ResetTexture" : "Reset texture",
|
||||
"ResetTextureMSG" : "Texture reset sucessfully",
|
||||
"Paintjob" : "Paintjob",
|
||||
"TuneTab" : "Tune",
|
||||
"HandlingTab" : "Handling"
|
||||
}
|
||||
}
|
100
src/vehicle.cpp
100
src/vehicle.cpp
@ -1239,23 +1239,23 @@ void Vehicle::ShowPage()
|
||||
int handlingID = patch::Get<WORD>((int)pInfo + 74, false); // CBaseModelInfo + 74 = handlingID
|
||||
tHandlingData *pHandlingData = reinterpret_cast<tHandlingData*>(0xC2B9DC + (handlingID * 224)); // sizeof(tHandlingData) = 224
|
||||
|
||||
if (ImGui::Button("Reset handling", ImVec2(Ui::GetSize(3))))
|
||||
if (ImGui::Button(TEXT("Vehicle.ResetHandling"), ImVec2(Ui::GetSize(3))))
|
||||
{
|
||||
gHandlingDataMgr.LoadHandlingData();
|
||||
SetHelpMessage("Handling reset", false, false, false);
|
||||
SetHelpMessage(TEXT("Vehicle.ResetHandlingMSG"), false, false, false);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Save to file", ImVec2(Ui::GetSize(3))))
|
||||
if (ImGui::Button(TEXT("Vehicle.SaveFile"), ImVec2(Ui::GetSize(3))))
|
||||
{
|
||||
FileHandler::GenerateHandlingFile(pHandlingData, m_VehicleIDE);
|
||||
SetHelpMessage("Handling saved", false, false, false);
|
||||
SetHelpMessage(TEXT("Vehicle.SaveFileMSG"), false, false, false);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Read more", ImVec2(Ui::GetSize(3))))
|
||||
if (ImGui::Button(TEXT("Vehicle.ReadMore"), ImVec2(Ui::GetSize(3))))
|
||||
{
|
||||
ShellExecute(NULL, "open", "https://projectcerbera.com/gta/sa/tutorials/handling", NULL, NULL,
|
||||
SW_SHOWNORMAL);
|
||||
@ -1265,81 +1265,89 @@ void Vehicle::ShowPage()
|
||||
|
||||
ImGui::BeginChild("HandlingChild");
|
||||
|
||||
static std::vector<Ui::NamedValue> abs{ {"On", 1}, {"Off", 0} };
|
||||
Ui::EditRadioButtonAddressEx("Abs", (int)&pHandlingData->m_bABS, abs);
|
||||
std::vector<Ui::NamedValue> abs{ {TEXT("Vehicle.On"), 1}, {TEXT("Vehicle.Off"), 0} };
|
||||
Ui::EditRadioButtonAddressEx(TEXT("Vehicle.Abs"), (int)&pHandlingData->m_bABS, abs);
|
||||
|
||||
Ui::EditFloat("Anti dive multiplier", (int)&pHandlingData->m_fSuspensionAntiDiveMultiplier, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat("Brake bias", (int)&pHandlingData->m_fBrakeBias, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.ADM"), (int)&pHandlingData->m_fSuspensionAntiDiveMultiplier, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditAddress<BYTE>(TEXT("Vehicle.AnimGroup"), (int)&pHandlingData->m_nAnimGroup, 0, 0, 20);
|
||||
Ui::EditFloat(TEXT("Vehicle.BrakeBias"), (int)&pHandlingData->m_fBrakeBias, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
// Brake deceleration calculation
|
||||
float BrakeDeceleration = pHandlingData->m_fBrakeDeceleration * 2500;
|
||||
Ui::EditFloat("Brake deceleration", (int)&pHandlingData->m_fBrakeDeceleration, 0.0f, 0.0f, 20.0f, 2500.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.BrakeDecel"), (int)&pHandlingData->m_fBrakeDeceleration, 0.0f, 0.0f, 20.0f, 2500.0f);
|
||||
pHandlingData->m_fBrakeDeceleration = BrakeDeceleration / 2500;
|
||||
|
||||
Ui::EditFloat("Centre of mass X", (int)&pHandlingData->m_vecCentreOfMass.x, -10.0f, -10.0f, 10.0f);
|
||||
Ui::EditFloat("Centre of mass Y", (int)&pHandlingData->m_vecCentreOfMass.y, -10.0f, -10.0f, 10.0f);
|
||||
Ui::EditFloat("Centre of mass Z", (int)&pHandlingData->m_vecCentreOfMass.z, -10.0f, -10.0f, 10.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.CemterMassX"), (int)&pHandlingData->m_vecCentreOfMass.x, -10.0f, -10.0f, 10.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.CemterMassY"), (int)&pHandlingData->m_vecCentreOfMass.y, -10.0f, -10.0f, 10.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.CemterMassZ"), (int)&pHandlingData->m_vecCentreOfMass.z, -10.0f, -10.0f, 10.0f);
|
||||
|
||||
// CDM calculations
|
||||
float factor = (1.0 / pHandlingData->m_fMass);
|
||||
float fCDM = pHandlingData->m_fCollisionDamageMultiplier / (2000.0f * factor);
|
||||
Ui::EditFloat("Collision damage multiplier", (int)&fCDM, 0.0f, 0.0f, 1.0f, 0.3381f);
|
||||
Ui::EditFloat(TEXT("Vehicle.CDM"), (int)&fCDM, 0.0f, 0.0f, 1.0f, 0.3381f);
|
||||
pHandlingData->m_fCollisionDamageMultiplier = factor * fCDM * 2000.0f;
|
||||
|
||||
Ui::EditFloat("Damping level", (int)&pHandlingData->m_fSuspensionDampingLevel, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat("Drag mult", (int)&pHandlingData->m_fDragMult, 0.0f, 0.0f, 30.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.DampingLvl"), (int)&pHandlingData->m_fSuspensionDampingLevel, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat(TEXT("Vehicle.DragMult"), (int)&pHandlingData->m_fDragMult, 0.0f, 0.0f, 30.0f);
|
||||
|
||||
static std::vector<Ui::NamedValue> drive_type
|
||||
std::vector<Ui::NamedValue> drive_type
|
||||
{
|
||||
{"Front wheel drive", 70}, {"Rear wheel drive", 82}, {"Four wheel drive", 52}
|
||||
{TEXT("Vehicle.FrontWheelDrive"), 70},
|
||||
{TEXT("Vehicle.RearWheelDrive"), 82},
|
||||
{TEXT("Vehicle.FourWheelDrive"), 52}
|
||||
};
|
||||
Ui::EditRadioButtonAddressEx("Drive type", (int)&pHandlingData->m_transmissionData.m_nDriveType, drive_type);
|
||||
Ui::EditRadioButtonAddressEx(TEXT("Vehicle.DriveType"), (int)&pHandlingData->m_transmissionData.m_nDriveType, drive_type);
|
||||
|
||||
// Engine acceleration calculation
|
||||
float fEngineAcceleration = pHandlingData->m_transmissionData.m_fEngineAcceleration * 12500;
|
||||
Ui::EditFloat("Engine acceleration", (int)&fEngineAcceleration, 0.0f, 0.0f, 49.0f, 12500.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.EngineAccel"), (int)&fEngineAcceleration, 0.0f, 0.0f, 49.0f, 12500.0f);
|
||||
pHandlingData->m_transmissionData.m_fEngineAcceleration = fEngineAcceleration / 12500;
|
||||
|
||||
|
||||
Ui::EditFloat("Engine inertia", (int)&pHandlingData->m_transmissionData.m_fEngineInertia, 0.1f, 0.1f, 400.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.EngineInertia"), (int)&pHandlingData->m_transmissionData.m_fEngineInertia, 0.1f, 0.1f, 400.0f);
|
||||
|
||||
static std::vector<Ui::NamedValue> engine_type{ {"Petrol", 80}, {"Diseal", 68}, {"Electric", 69} };
|
||||
Ui::EditRadioButtonAddressEx("Engine type", (int)&pHandlingData->m_transmissionData.m_nEngineType, engine_type);
|
||||
std::vector<Ui::NamedValue> engine_type
|
||||
{
|
||||
{TEXT("Vehicle.Petrol"), 80}, {TEXT("Vehicle.Diseal"), 68}, {TEXT("Vehicle.Electric"), 69}
|
||||
};
|
||||
Ui::EditRadioButtonAddressEx(TEXT("Vehicle.EngineType"), (int)&pHandlingData->m_transmissionData.m_nEngineType, engine_type);
|
||||
|
||||
std::vector<Ui::NamedValue> front_lights{ {"Long", 0}, {"Small", 1}, {"Big", 2}, {"Tall", 3} };
|
||||
Ui::EditRadioButtonAddressEx("Front lights", (int)&pHandlingData->m_nFrontLights, front_lights);
|
||||
std::vector<Ui::NamedValue> lights
|
||||
{
|
||||
{TEXT("Vehicle.Long"), 0}, {TEXT("Vehicle.Small"), 1},
|
||||
{TEXT("Vehicle.Big"), 2}, {TEXT("Vehicle.Tall"), 3}
|
||||
};
|
||||
Ui::EditRadioButtonAddressEx(TEXT("Vehicle.FrontLights"), (int)&pHandlingData->m_nFrontLights, lights);
|
||||
|
||||
Ui::EditFloat("Force level", (int)&pHandlingData->m_fSuspensionForceLevel, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat(TEXT("Vehicle.ForceLevel"), (int)&pHandlingData->m_fSuspensionForceLevel, -10.0f, -10.0f, 10.0f); // test later
|
||||
|
||||
Ui::EditBits("Handling flags", (int)&pHandlingData->m_nHandlingFlags, m_HandlingFlagNames);
|
||||
Ui::EditBits(TEXT("Vehicle.HandlingFlags"), (int)&pHandlingData->m_nHandlingFlags, m_HandlingFlagNames);
|
||||
|
||||
Ui::EditFloat("High speed damping", (int)&pHandlingData->m_fSuspensionDampingLevel, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat("Lower limit", (int)&pHandlingData->m_fSuspensionLowerLimit, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat("Mass", (int)&pHandlingData->m_fMass, 1.0f, 1.0f, 50000.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.HighSpeedDamping"), (int)&pHandlingData->m_fSuspensionDampingLevel, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat(TEXT("Vehicle.LowerKimit"), (int)&pHandlingData->m_fSuspensionLowerLimit, -10.0f, -10.0f, 10.0f); // test later
|
||||
Ui::EditFloat(TEXT("Vehicle.Mass"), (int)&pHandlingData->m_fMass, 1.0f, 1.0f, 50000.0f);
|
||||
|
||||
// Max Velocity calculation
|
||||
int MaxVelocity = pHandlingData->m_transmissionData.m_fMaxGearVelocity / *(float*)0xC2B9BC;
|
||||
Ui::EditFloat("Max velocity", (int)&MaxVelocity, 1.0f, 1.0f, 1000.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.MaxVelocity"), (int)&MaxVelocity, 1.0f, 1.0f, 1000.0f);
|
||||
pHandlingData->m_transmissionData.m_fMaxGearVelocity = MaxVelocity * (*(float*)0xC2B9BC);
|
||||
|
||||
Ui::EditBits("Model flags", (int)&pHandlingData->m_nModelFlags, m_ModelFlagNames);
|
||||
Ui::EditBits(TEXT("Vehicle.ModelFlags"), (int)&pHandlingData->m_nModelFlags, m_ModelFlagNames);
|
||||
|
||||
Ui::EditAddress<int>("Monetary value", (int)&pHandlingData->m_nMonetaryValue, 1, 1, 100000);
|
||||
Ui::EditAddress<BYTE>("Number of gears", (int)&pHandlingData->m_transmissionData.m_nNumberOfGears, 1, 1, 10);
|
||||
Ui::EditAddress<BYTE>("Percent submerged", (int)&pHandlingData->m_nPercentSubmerged, 10, 10, 120);
|
||||
Ui::EditAddress<int>(TEXT("Vehicle.MonValue"), (int)&pHandlingData->m_nMonetaryValue, 1, 1, 100000);
|
||||
Ui::EditAddress<BYTE>(TEXT("Vehicle.NumGears"), (int)&pHandlingData->m_transmissionData.m_nNumberOfGears, 1, 1, 10);
|
||||
Ui::EditAddress<BYTE>(TEXT("Vehicle.PercentSubmerged"), (int)&pHandlingData->m_nPercentSubmerged, 10, 10, 120);
|
||||
|
||||
static std::vector<Ui::NamedValue> rear_lights{ {"Long", 0}, {"Small", 1}, {"Big", 2}, {"Tall", 3} };
|
||||
Ui::EditRadioButtonAddressEx("Rear lights", (int)&pHandlingData->m_nRearLights, rear_lights);
|
||||
Ui::EditRadioButtonAddressEx(TEXT("Vehicle.RearLights"), (int)&pHandlingData->m_nRearLights, lights);
|
||||
|
||||
Ui::EditFloat("Seat offset distance", (int)&pHandlingData->m_fSeatOffsetDistance, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat("Steering lock", (int)&pHandlingData->m_fSteeringLock, 10.0f, 10.0f, 50.0f);
|
||||
Ui::EditFloat("Suspension bias", (int)&pHandlingData->m_fSuspensionBiasBetweenFrontAndRear, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat("Traction bias", (int)&pHandlingData->m_fTractionBias, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat("Traction loss", (int)&pHandlingData->m_fTractionLoss, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat("Traction multiplier", (int)&pHandlingData->m_fTractionMultiplier, 0.5f, 0.5f, 2.0f);
|
||||
Ui::EditFloat("Turn mass", (int)&pHandlingData->m_fTurnMass, 20.0f, 20.0f, 1000.0f); // test later
|
||||
Ui::EditFloat("Upper limit", (int)&pHandlingData->m_fSuspensionUpperLimit, -1.0f, -1.0f, 1.0f);
|
||||
Ui::EditAddress<BYTE>("Vehicle anim group", (int)&pHandlingData->m_nAnimGroup, 0, 0, 20);
|
||||
Ui::EditFloat(TEXT("Vehicle.SeatOffset"), (int)&pHandlingData->m_fSeatOffsetDistance, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.SteeringLock"), (int)&pHandlingData->m_fSteeringLock, 10.0f, 10.0f, 50.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.SuspensionBias"), (int)&pHandlingData->m_fSuspensionBiasBetweenFrontAndRear, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.TractionBias"), (int)&pHandlingData->m_fTractionBias, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.TractionLoss"), (int)&pHandlingData->m_fTractionLoss, 0.0f, 0.0f, 1.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.TractionMul"), (int)&pHandlingData->m_fTractionMultiplier, 0.5f, 0.5f, 2.0f);
|
||||
Ui::EditFloat(TEXT("Vehicle.TurnMass"), (int)&pHandlingData->m_fTurnMass, 20.0f, 20.0f, 1000.0f); // test later
|
||||
Ui::EditFloat(TEXT("Vehicle.UpperLimit"), (int)&pHandlingData->m_fSuspensionUpperLimit, -1.0f, -1.0f, 1.0f);
|
||||
|
||||
ImGui::EndChild();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user