GUI Menu is click through menu

User Tag List

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%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

    GUI Menu is click through
  2. #2
    Ket's Avatar Legendary
    CoreCoins Purchaser Authenticator enabled
    Reputation
    861
    Join Date
    Feb 2008
    Posts
    3,337
    Thanks G/R
    600/313
    Trade Feedback
    29 (93%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A screenshot of the menu will be cool.

  4. #4
    z0yb3r's Avatar Member
    Reputation
    3
    Join Date
    Jan 2011
    Posts
    39
    Thanks G/R
    2/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 07:35 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search