This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! ImGui::Text can be used for debug?

HaloKokaine

Platinian
Original poster
Jan 17, 2022
27
389
48
25
Brazil - RJ
I'm developing (or trying to) make a menu mod using Imgui. And currently I need to debug certain pointers, the returns of some functions etc... But I confess that using Logger is very unfeasible when it comes to Android. (And without root). So I would like to know if I can use ImGui itself to display the values. An example, I want to know what is the return of the SkinId field in the following :

C++:
public static bool IsForbidSkin(uint skinid) { }
My hook function:
C++:
int *skinId_ = 0; //Default
bool (*oldIsForbidSkin)(void *instance, int *skinId);
bool IsForbidSkin(void *instance, int *skinId) {
    if (instance != NULL) {
        if (unlock_skins) {
            return false;
        }
    }
   
    //Update
    skinId_ = (int)skinId;
           
    return oldIsForbidSkin(instance, skinId);
}
My Imgui text:
C++:
ImGui::Text("Skin ID: %d", skinId_);
Is that works? If not, what would be the alternative? Are there better ways to do this?

Game: Mobile Legends.