Jump to content

Gui improvement


Drakath

Recommended Posts

  • MTA Team
Posted

For example, instead of

addEventHandler("onClientGUIClick", loginbutton, doLogin) 

you need to do

addEventHandler("onClientGUIClick", loginbutton, doLogin,false) 

Posted

Or,

function closeGUI() 
    if (source == buttonName) then 
    guiSetVisible(myAwesomeWindow, false) 
    end 
end 
addEventHandler("onClientGUIClick", guiRoot, closeGUI) 

  • MTA Team
Posted

That's only if you're using multiple buttons that do small simple things. One medium sized function for lots of small things for different buttons is a better idea than using lots of different functions for each button.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...