GUI Menu is click through menu

These ads disappear when you log in.

Results 1 to 4 of 4
  1. #1
    randomedude12's Avatar Member
    Reputation
    1
    Join Date
    Jul 2017
    Posts
    5
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)

    GUI Menu is click through

    I have implemented a simple menu, but the click event is being propagated through the menu to game.

    The solutions I found are not viable for a hack.

    Any ideas?

    EDIT: nevermind, solved
    Last edited by randomedude12; 07-26-2017 at 07:41 AM.

    These ads disappear when you log in.

  2. #2
    Ket's Avatar Administrator
    CoreCoins User Authenticator enabled
    Reputation
    858
    Join Date
    Feb 2008
    Posts
    3,328
    Thanks G/R
    599/310
    Trade Feedback
    29 (93%)
    Can you share the menu?

  3. #3
    GG-Noob's Avatar Member
    Reputation
    1
    Join Date
    Jul 2017
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    A screenshot of the menu will be cool.

  4. #4
    z0yb3r's Avatar Member
    Reputation
    3
    Join Date
    Jan 2011
    Posts
    37
    Thanks G/R
    2/1
    Trade Feedback
    0 (0%)
    simple menu from other site
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using UnityEngine;
    public class Hacks : MonoBehaviour
    {
        bool            hack            = false;
        bool            esp             = true;
        float           scrHeight       = Screen.height;
        int selection = 1;
        int maxSelect = 4;
        float           scrWidth        = Screen.width;
        void Start()
        {
    
        }
        
        void Update()
        {
            //Keycode hack activation
            if (Input.GetKeyDown(KeyCode.Insert))
            {
                hack = !hack;
            }
            if (hack)
            {
                if(Input.GetKeyDown(KeyCode.DownArrow))
                {
                    if (selection != maxSelect)
                    {
                        selection += 1;
                    }
                    else
                    {
                        if (selection == maxSelect)
                        {
                            selection = 1;
                        }
                    }
                }
                
                if (Input.GetKeyDown(KeyCode.UpArrow))
                {
                    if (selection != 1)
                    {
                        selection -= 1;
                    }
                    else
                    {
                        if (selection == 1)
                        {
                            selection = maxSelect;
                        }
                    }
                }
                
                if (Input.GetKeyDown(KeyCode.RightControl))
                {
                    if (selection == 1)
                    {
                        selection1();
                    }
                    else
                    {
                        if (selection == 2)
                        {
                            selection2();
                        }
                        else
                        {
                            if (selection == 3)
                            {
                                selection3();
                            }
                            else
                            {
                                if (selection == 4)
                                {
                                    selection4();
                                }
                                else
                                {
    
                                }
                            }
                        }
                    }
                }
            }
    
        }
        // FUNCTIONS
        void selection1()
        {
            
        }
    
        void selection2()
        {
            
        }
        
        void selection3()
        {
            
        }
    
        void selection4()
        {
            
        }
    
        void OnGUI()
        {
            //Nice GUI
            GUI.color = Color.magenta;
            GUI.Label(new Rect(200, 0, 200, 40), "Hack Name v1.0");
            GUI.color = Color.white;
            if (hack)
            {
                GUI.Box(new Rect(0, 290, 120, 300), "- Functions -");
                if (selection == 1)
                {
                    GUI.color = Color.red;
                }
                else
                {
                    GUI.color = Color.white;
                }
                GUI.Label(new Rect(10, 320, 100, 30), "Selection1");
                if (selection == 2)
                {
                    GUI.color = Color.red;
                }
                else
                {
                    GUI.color = Color.white;
                }
                GUI.Label(new Rect(10, 350, 100, 30), "Selection2");
                if (selection == 3)
                {
                    GUI.color = Color.red;
                }
                else
                {
                    GUI.color = Color.white;
                }
                GUI.Label(new Rect(10, 380, 100, 30), "Selection3");
    
                if (selection == 4)
                {
                    GUI.color = Color.red;
                }
                else
                {
                    GUI.color = Color.white;
                }
                GUI.Label(new Rect(10, 410, 100, 30), "Selection4");
    
            }
        }
    }
    or you can use buttons

    Code:
    if(GUI.Button(new Rect(x1, y1, x2, y2), "text")){some code}
    or toggle
    Code:
    bool toggleBool = GUI.Toggle(new Rect(x1, y1, x2, y2), toggleBool, "toggle");
    text field
    Code:
    string stringText = GUI.TextField (new Rect (x1, y1, x2, y2), stringText , numLength);
    all info in public just google it.(you can find much more)

  5. Thanks corecoins17 (1 members gave Thanks to z0yb3r for this useful post)

Similar Threads

  1. [Tool] Casting spell on actionbar button click when CD is ready
    By intruder22 in forum World of Warcraft Bots and Programs
    Replies: 0
    Last Post: 01-21-2012, 05:02 PM
  2. [How-To] Click NPC through swarms of people (Cata)
    By Syncness in forum World of Warcraft Guides
    Replies: 10
    Last Post: 12-06-2010, 08:07 PM
  3. Level 71 through 80 is being reduced by 20% !
    By Kalle200000 in forum World of Warcraft General
    Replies: 0
    Last Post: 11-19-2010, 07:27 AM
  4. Replies: 1
    Last Post: 03-27-2010, 05:47 PM
  5. is your MWS crashing when u click on an M2? Learn how to fix it here.
    By soulcatcher in forum World of Warcraft Model Editing
    Replies: 17
    Last Post: 01-06-2007, 10:29 AM
All times are GMT -5. The time now is 06:40 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search