Загрузка...

The button in the dublis clicks. (C#, Melon Loader, Unityengine Imgui, Il2CPP Game Modding)

Thread in C# created by opuhol123 Jan 31, 2025. 326 views

  1. opuhol123
    opuhol123 Topic starter Jan 31, 2025 Banned 1 Jan 22, 2025
    CSHARP
            public bool Button(string title)
    {
    RenderUtils.DrawRect(CurrentControlRect, Color.blue, title);

    if (CurrentControlRect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
    {
    if (Input.GetMouseButtonDown(0))
    {
    return true;
    }
    }

    CurrentControlRect.y = CurrentControlRect.y + (DefaultControlHeight + InterControlDistance);

    return false;
    }
    по такому же принципу у меня работают Toggle и InputInt, и они тоже даблкликают
     
  2. opuhol123
    opuhol123 Topic starter Jan 31, 2025 Banned 1 Jan 22, 2025
    если что, не использую юнити имгуи потомучто в самой игре разрабы какой-то хуйни натворили и менюшка от юнити не реагирует на нажатия
     
  3. ялюблюпиво
    ялюблюпиво Feb 1, 2025 Banned 1953 Aug 4, 2023
    попробуй

    Code
    public bool Button(string title)
    {
    RenderUtils.DrawRect(CurrentControlRect, Color.blue, title);

    if (CurrentControlRect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
    {
    if (Event.current.type == EventType.MouseDown && Event.current.button == 0)
    {
    return true;
    }
    }

    CurrentControlRect.y += DefaultControlHeight + InterControlDistance;
    return false;
    }
     
    1. opuhol123 Topic starter
      ялюблюпиво, пробовал. оно вообще не реагирует на нажатия. но я уже перешел на имгуи хук от киеро, и щас ебашу c# + c++
Loading...
Top