Tete omar Posted July 17, 2012 Posted July 17, 2012 Hi all how do i make any GUI element show up from the left of the monitor or right , ? like GTA4 cell phone when you press ..
denny199 Posted July 17, 2012 Posted July 17, 2012 If your'e doing it for an image you can use this: So, moving a gui with guiSetPosition and timers. function do_moveing() local width, height = guiGetScreenSize () local offset = width/480 image = guiCreateStaticImage(-290, -10, 283, 175, "trollface.jpg", false) move_timer = setTimer ( move, 50, 480, offset ) setTimer ( delete, 25000, 1 ) end function move ( offset ) local x, y = guiGetPosition ( image, false ) local newpos = x + offset + 0.85 guiSetPosition ( image, newpos, -10, false ) end function delete () destroyElement (image) killTimer ( move_timer ) end [ This is moving the image above your'e screen ]
Tete omar Posted July 17, 2012 Author Posted July 17, 2012 If your'e doing it for an image you can use this:So, moving a gui with guiSetPosition and timers. function do_moveing() local width, height = guiGetScreenSize () local offset = width/480 image = guiCreateStaticImage(-290, -10, 283, 175, "trollface.jpg", false) move_timer = setTimer ( move, 50, 480, offset ) setTimer ( delete, 25000, 1 ) end function move ( offset ) local x, y = guiGetPosition ( image, false ) local newpos = x + offset + 0.85 guiSetPosition ( image, newpos, -10, false ) end function delete () destroyElement (image) killTimer ( move_timer ) end [ This is moving the image above your'e screen ] will it keep moving or stop on an point ? , like this it show up, .. up and down , if you closed it , it will move down , if you opened it , it will move up and something like that thanks anyway
denny199 Posted July 17, 2012 Posted July 17, 2012 It will moving and then destroy it but mayby you can use: https://wiki.multitheftauto.com/wiki/InterpolateBetween interpolateBetween
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