Maybe fixed the problem with the interface from the card.

This commit is contained in:
RyujinZX
2022-06-14 19:30:53 +03:00
parent 2a90dfa4e7
commit 75c77d7e14
2 changed files with 21 additions and 7 deletions

View File

@ -9214,6 +9214,16 @@ namespace app {
Il2CppClass_1 _1;
};
struct Canvas__Fields {
struct Behaviour__Fields _;
};
struct Canvas {
struct Canvas__Class* klass;
MonitorData* monitor;
struct Canvas__Fields fields;
};
struct __declspec(align(8)) UIManager__Fields {
struct LinkedList_1_MoleMole_BaseContext_* _inputContextList;
struct HashSet_1_MoleMole_BaseContext_* _inputContextSet;
@ -9221,7 +9231,7 @@ namespace app {
struct HashSet_1_MoleMole_BaseContext_* BCPDECEFFMF;
struct UIPlatformConfig* platformConfig;
uint32_t _curProfileHandle;
void* _sceneCanvas;
struct Canvas* _sceneCanvas;
struct Camera* _uiCamera;
};

View File

@ -18,6 +18,7 @@
namespace cheat::feature
{
app::Rect mapRect = {};
InteractiveMap::InteractiveMap() : Feature(),
NFEX(f_Enabled, "Interactive map", "m_InteractiveMap", "InteractiveMap", false, false),
@ -1550,7 +1551,7 @@ namespace cheat::feature
UPDATE_DELAY_VAR(ImCircle, _miniMapCircle, 2000);
auto uiManager = GET_SINGLETON(MoleMole_UIManager);
if (uiManager == nullptr || uiManager->fields._sceneCanvas == nullptr)
if (uiManager == nullptr || uiManager->fields._sceneCanvas == nullptr || uiManager->fields._uiCamera == nullptr)
return {};
auto back = _monoMiniMap->fields._grpMapBack;
@ -1560,13 +1561,16 @@ namespace cheat::feature
auto mapPos = app::Transform_get_position(reinterpret_cast<app::Transform*>(back), nullptr);
auto center = app::Camera_WorldToScreenPoint(uiManager->fields._uiCamera, mapPos, nullptr);
center.y = app::Screen_get_height(nullptr) - center.y;
if (mapRect.m_Width == 0)
mapRect = app::RectTransform_get_rect(back, nullptr);
auto mapRect = app::RectTransform_get_rect(back, nullptr);
float scaleFactor = app::Canvas_get_scaleFactor(uiManager->fields._sceneCanvas, nullptr);
_miniMapCircle = {
ImVec2(center.x, center.y),
(mapRect.m_Width * scaleFactor) / 2
};
if (scaleFactor != 0)
_miniMapCircle = {
ImVec2(center.x, center.y),
(mapRect.m_Width * scaleFactor) / 2
};
return _miniMapCircle;
}