Fix sa image scaling bug, add vc never wanted
This commit is contained in:
parent
97924ed72d
commit
db22f1c9db
10
.vscode/c_cpp_properties.json
vendored
10
.vscode/c_cpp_properties.json
vendored
@ -6,10 +6,10 @@
|
||||
"${workspaceFolder}/**",
|
||||
"${PLUGIN_SDK_DIR}/*",
|
||||
"${DIRECTX9_SDK_DIR}/Include/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_sa/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_vc/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_sa/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/game/*",
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*",
|
||||
@ -20,7 +20,7 @@
|
||||
"IS_PLATFORM_WIN",
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_NON_CONFORMING_SWPRINTFS",
|
||||
"GTASA",
|
||||
"GTAVC",
|
||||
"_DX9_SDK_INSTALLED",
|
||||
"PLUGIN_SGV_10US"
|
||||
],
|
||||
|
@ -2,5 +2,5 @@
|
||||
#define MENU_NAME "Cheat Menu"
|
||||
#define MENU_VERSION_NUMBER "2.9"
|
||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||
#define BUILD_NUMBER "20210821"
|
||||
#define BUILD_NUMBER "20210823"
|
||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
||||
|
@ -333,6 +333,25 @@ void Player::Draw()
|
||||
{
|
||||
CCheat::NotWantedCheat();
|
||||
}
|
||||
#elif GTAVC
|
||||
static bool neverWanted = false;
|
||||
if (Ui::CheckboxWithHint("Never wanted", &neverWanted))
|
||||
{
|
||||
if (neverWanted)
|
||||
{
|
||||
pPlayer->m_pWanted->CheatWantedLevel(0);
|
||||
pPlayer->m_pWanted->Update();
|
||||
patch::SetRaw(0x4D2110, (char*)"\xC3\x90\x90\x90\x90\x90", 6); // CWanted::UpdateWantedLevel()
|
||||
patch::Nop(0x5373D0, 5); // CWanted::Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->m_pWanted->CheatWantedLevel(0);
|
||||
pPlayer->m_pWanted->ClearQdCrimes();
|
||||
patch::SetRaw(0x4D2110, (char*)"\x8B\x15\xDC\x10\x69\x00", 6);
|
||||
patch::SetRaw(0x5373D0, (char*)"\xE8\x8B\xAE\xF9\xFF", 5);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Ui::CheckboxAddress("No arrest fee", (int)&pInfo->m_bGetOutOfJailFree);
|
||||
|
||||
|
13
src/Ui.cpp
13
src/Ui.cpp
@ -490,12 +490,13 @@ void Ui::DrawImages(ResourceStore &store, std::function<void(std::string&)> onLe
|
||||
Trying to scale images based on resolutions
|
||||
Native 1366x768
|
||||
*/
|
||||
store.m_ImageSize.x *= screen::GetScreenWidth() / 1366.0f;
|
||||
store.m_ImageSize.y *= screen::GetScreenHeight() / 768.0f;
|
||||
ImVec2 m_ImageSize = store.m_ImageSize;
|
||||
m_ImageSize.x *= screen::GetScreenWidth() / 1366.0f;
|
||||
m_ImageSize.y *= screen::GetScreenHeight() / 768.0f;
|
||||
|
||||
int imageCount = 1;
|
||||
int imagesInRow = static_cast<int>(ImGui::GetWindowContentRegionWidth() / store.m_ImageSize.x);
|
||||
store.m_ImageSize.x = ImGui::GetWindowContentRegionWidth() / imagesInRow - static_cast<int>(ImGuiStyleVar_ItemSpacing) * 0.65f;
|
||||
int imagesInRow = static_cast<int>(ImGui::GetWindowContentRegionWidth() / m_ImageSize.x);
|
||||
m_ImageSize.x = ImGui::GetWindowContentRegionWidth() / imagesInRow - static_cast<int>(ImGuiStyleVar_ItemSpacing) * 0.65f;
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
@ -544,7 +545,7 @@ void Ui::DrawImages(ResourceStore &store, std::function<void(std::string&)> onLe
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ImGui::ImageButton(store.m_ImagesList[i]->m_pTexture, store.m_ImageSize, ImVec2(0, 0), ImVec2(1, 1), 1, ImVec4(1, 1, 1, 1), ImVec4(1, 1, 1, 1)))
|
||||
if (ImGui::ImageButton(store.m_ImagesList[i]->m_pTexture, m_ImageSize, ImVec2(0, 0), ImVec2(1, 1), 1, ImVec4(1, 1, 1, 1), ImVec4(1, 1, 1, 1)))
|
||||
{
|
||||
onLeftClick(text);
|
||||
}
|
||||
@ -570,7 +571,7 @@ void Ui::DrawImages(ResourceStore &store, std::function<void(std::string&)> onLe
|
||||
|
||||
// Calculating and drawing text over the image
|
||||
ImVec2 textSize = ImGui::CalcTextSize(modelName.c_str());
|
||||
if (textSize.x < store.m_ImageSize.x)
|
||||
if (textSize.x < m_ImageSize.x)
|
||||
{
|
||||
float offsetX = (ImGui::GetItemRectSize().x - textSize.x) / 2;
|
||||
drawlist->AddText(ImVec2(btnMin.x + offsetX, btnMin.y + 10), ImGui::GetColorU32(ImGuiCol_Text),
|
||||
|
@ -281,7 +281,9 @@ void Vehicle::ParseVehiclesIDE()
|
||||
while (getline(file, line))
|
||||
{
|
||||
if (line[0] <= '0' || line[0] >= '9')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user