~DarkRacer~ Posted March 8, 2013 Posted March 8, 2013 Hi, i want to send a gui Static image behind a specific text this is a picture: what function should i use?
xXMADEXx Posted March 8, 2013 Posted March 8, 2013 Post the code.. The Ultimate Lua Tutorial! | MTA PHP SDK
~DarkRacer~ Posted March 8, 2013 Author Posted March 8, 2013 i just want one function could send images back or front.
50p Posted March 8, 2013 Posted March 8, 2013 If you've got the code then you have to move the guiCreateStaticImage above the code where you draw text or use guiMoveToBack/guiBringToFront. If you're drawing text with DX functions then make sure that parameter postGUI is set to false. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
~DarkRacer~ Posted March 8, 2013 Author Posted March 8, 2013 this is the dxText, where i should put false? timepassed = dxText:create('0:00:00', screenWidth/2+22.5, 27, false, 'default-bold', 1, 'right') the guiMoveToBack and guiBringToFront didn't work
Anderl Posted March 8, 2013 Posted March 8, 2013 this is the dxText, where i should put false? timepassed = dxText:create('0:00:00', screenWidth/2+22.5, 27, false, 'default-bold', 1, 'right') the guiMoveToBack and guiBringToFront didn't work That is a DirectX functions-based lib so GUI functions obviously won't work. You need to edit the "textlib.lua" file in the 'race' resource. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Jaysds1 Posted March 12, 2013 Posted March 12, 2013 create the image using the dxDrawImage and make sure you draw the image before the text! My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
~DarkRacer~ Posted March 13, 2013 Author Posted March 13, 2013 There's a function in "Race_Client.lua" called "hideGUIComponents" or "showGUIComponents" does it work with dxDrawImage?
Jaysds1 Posted March 13, 2013 Posted March 13, 2013 nah, that's only GUI Components, but you could customize it to work... My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
~DarkRacer~ Posted March 13, 2013 Author Posted March 13, 2013 i can't make the image to dxDrawImage if the the hideGUIComponents doesn't work. is there any function make the dx image appear or disappear?? please help
iPrestege Posted March 13, 2013 Posted March 13, 2013 i can't make the image to dxDrawImage if the the hideGUIComponents doesn't work.is there any function make the dx image appear or disappear?? please help What about : removeEventHandler and i think if u will use Dx u should use onClientRender right?
~DarkRacer~ Posted March 13, 2013 Author Posted March 13, 2013 why should i use onClientRender. where the hell should i put the render event anyway?
iPrestege Posted March 13, 2013 Posted March 13, 2013 Draws an image on the screen for a single frame. In order for the image to stay visible continuously, you need to call this function with the same parameters on each frame update (see onClientRender). Image files should ideally have dimensions that are a power of two, to prevent possible blurring.
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