Thehookerkiller01 Posted June 12, 2010 Share Posted June 12, 2010 Hello, I made a button, but I can't click on it, what did I do wrong? Link to comment
50p Posted June 12, 2010 Share Posted June 12, 2010 What do you mean you can't click it? showCursor if you can't see it. PS. Why did you come back? To spam the forum again? Ask stupid questions? Link to comment
loler Posted June 12, 2010 Share Posted June 12, 2010 yep i think so too lol thehookerkiller First step:Make the gui with the gui editor 2.click left outside the gui and click the button "print code" or "output code"(somethink like that) -->print code -- copy that code in notepad or where you want to do it and make a meta.xml -->output code(or somethink like that)--It outputs the code where you find it in [serverfolder]/mods/deatchmatch/resources/guieditor(or how you called it)/GUIeditor_output P.S:for output code you must have the guieditor in a FOLDER not ZIPPED. ok when you have ready these steps you can add a button what to show the gui add this at end function onresourceStart () bindKey ("thekey", "state", showHowIsYourGuiCalled) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function showHowIsYourGuiCalled() getVisible = guiGetVisible (HowIsYourGuiCalled) --etc etc etc Do i have right? AND post your code here Link to comment
Thehookerkiller01 Posted June 12, 2010 Author Share Posted June 12, 2010 PS. Why did you come back? To spam the forum again? Ask stupid questions? My age changed, and my English improved But I added some buttons but I can't click at them. In the picture below, I can't click on the button: Change: [attachment=0]cantclick.PNG[/attachment] Link to comment
The_Ex Posted June 12, 2010 Share Posted June 12, 2010 Looks like guiSetEnabled(button,false) but those are stupid questions and nothing has changed. Link to comment
Thehookerkiller01 Posted June 12, 2010 Author Share Posted June 12, 2010 What do you mean with "but those are stupid questions and nothing has changed" ? Link to comment
Spider Pork Posted June 12, 2010 Share Posted June 12, 2010 You need to add an event handler for the button to work, else it'll just do nothing... function onClickButton(button, state, absoluteX, absoluteY) -- Put what it should do here. Also check which button the client clicked (left, middle, right), else it will work for all buttons in all states (click, release) end addEventHandler("onClientGUIClick", buttonName, onClickButton, false) Link to comment
Thehookerkiller01 Posted June 12, 2010 Author Share Posted June 12, 2010 If it isn't doing anything, it must be clickable, but in my case I can't click at it... Link to comment
Spider Pork Posted June 12, 2010 Share Posted June 12, 2010 If it isn't doing anything, it must be clickable, but in my case I can't click at it... So you can't click on it? As in, the mouse cursor doesn't even appear? In that case, use showCursor. Link to comment
Thehookerkiller01 Posted June 12, 2010 Author Share Posted June 12, 2010 My cursor does appears, I can click the other buttons, but not that button called: "Change"..... Link to comment
Spider Pork Posted June 12, 2010 Share Posted June 12, 2010 My cursor does appears, I can click the other buttons, but not that button called: "Change"..... Then use the code I posted above ... Also, it would help a lot if you post the code you have in your script. Edit: Have you used guiSetEnabled on that button somewhere? Link to comment
dzek (varez) Posted June 12, 2010 Share Posted June 12, 2010 post your code or leave.. dude! we cant do telepathy, let us see what have you messed up 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