Eweest Posted July 7, 2015 Share Posted July 7, 2015 Hi guys! Such question. How to make so that when you press the button opened another window Link to comment
Tekken Posted July 7, 2015 Share Posted July 7, 2015 Hi guys! Such question. How to make so that when you press the button opened another window There is an example: function drawWindowAndButton() window_1 = guiCreateWindow(x, y, w, h, "WINDOW 1", false)--Create window 1(Were button is) window_2 = guiCreateWindow(x, y, w, h, "WINDOW 2", false)--Create window 2(The window to show after click) guiSetVisible(window_2, false)--Make window 2 invisible!So we can make is visible later. button = guiCreateButton(x, y, w, h, "SHOW WINDOW 2", false, window_1)--Create the button! end addEventHandler("onClientResourceStart", resourceRoot, drawWindowAndButton) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), function() if (source == button) then guiSetVisible(window_2, true) --Now make window 2 visible! end end) Link to comment
Eweest Posted July 7, 2015 Author Share Posted July 7, 2015 dx function ? or gui? gui Link to comment
Eweest Posted July 7, 2015 Author Share Posted July 7, 2015 Hi guys! Such question. How to make so that when you press the button opened another window There is an example: function drawWindowAndButton() window_1 = guiCreateWindow(x, y, w, h, "WINDOW 1", false)--Create window 1(Were button is) window_2 = guiCreateWindow(x, y, w, h, "WINDOW 2", false)--Create window 2(The window to show after click) guiSetVisible(window_2, false)--Make window 2 invisible!So we can make is visible later. button = guiCreateButton(x, y, w, h, "SHOW WINDOW 2", false, window_1)--Create the button! end addEventHandler("onClientResourceStart", resourceRoot, drawWindowAndButton) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), function() if (source == button) then guiSetVisible(window_2, true) --Now make window 2 visible! end end) Thank you. I figured out Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now