toxicsmoke11 Posted November 18, 2014 Share Posted November 18, 2014 hello umm i was wondering whats the simplest way to make custom gui(buttons,background...) dx functions or gui image functions? and is there a way to do it easily? i know how to create custom gui already but my method takes too much time to finish so i was just wondering was there a simple way to either attach or something else custom guis to default guis? Link to comment
toxicsmoke11 Posted November 18, 2014 Author Share Posted November 18, 2014 guys would this be possible to do without any buttons in this way guiCreateStaticImage and onClientGUIClick ? Link to comment
MTA Team botder Posted November 19, 2014 MTA Team Share Posted November 19, 2014 Do you want to add an static image as GUI window background or something else? Link to comment
toxicsmoke11 Posted November 19, 2014 Author Share Posted November 19, 2014 well it could be anything, from background to gridlists buttons edit boxes, check boxes etc Link to comment
Anubhav Posted November 19, 2014 Share Posted November 19, 2014 Window: dxDrawRectangle button: guiCreateButton with 0 alpha, dxDrawRectangle Link to comment
toxicsmoke11 Posted November 19, 2014 Author Share Posted November 19, 2014 yea anubhav thats similiar to the thing which i was doing before except i didnt use any dx rectangles and your and my method would take too much time just to create one simple panel would it be possible though to do this staticImage = guiCreateStaticImage(...) -- bla bla function myFunction() if source == staticImage then -- do something end end addEventHandler("onClientGUIClick",getRootElement(),myFunction) Link to comment
Anubhav Posted November 19, 2014 Share Posted November 19, 2014 staticImage = guiCreateStaticImage(...) -- bla bla function myFunction() if source == staticImage then outputChatBox("test") end end addEventHandler("onClientGUIClick",getRootElement(),myFunction) Link to comment
Mr_Moose Posted November 19, 2014 Share Posted November 19, 2014 Since you have the root element in "onClientGUIClick" event it should work, (haven't tested it thought), another way is to add an invisible button on the same location: guiSetAlpha(element, 0) 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