dugasz1 Posted August 28, 2016 Posted August 28, 2016 Hello. I have a resource which handle my dx gui. And i need to pass them the image with an exported function if i want to render one. But how can i do it ? If i just pass the path for it for example "images/myimage.png" the resource will try to find it in his own directory. Can i pass some kind of absolute path? Or i have to make a texture from it first with dxCreateTexture then pass it? But then will it loaded twice in the memory? Which is unnecessary. Edit: I noticed something strange. So, If i pass an texture with dxCreateTexture from a resource test to my gui resource it's works fine but if i restart test resource then in gui the variable will be empty and the image disappier. I tried to modify the images variable in test resource but it doesn't change the image in the gui resource so it's not a pointer i guess. Someone now an explanation to this? Sorry for lot of questions and thanks for the answers!
idarrr Posted August 28, 2016 Posted August 28, 2016 Use ":images/myimage.png" if you want to get image in another resources. Open for cooperation. Discord: idarrr#7935
dugasz1 Posted August 29, 2016 Author Posted August 29, 2016 So if i have two resource for example: Test --test.png --lua,meta files etc. GUI --lua,meta files etc. Test have an image test.png in the reosurce root directory. Gui want to use thet image. Then i have to write ":test.png" or ":GUI/test.png" in the gui scripts? Sorry for lot of questions and thanks for the answers!
roaddog Posted August 29, 2016 Posted August 29, 2016 No, its gonna be like this ":Test/test.png" You gone learn today. I work my ass off, but I still can't pay tho.
dugasz1 Posted August 29, 2016 Author Posted August 29, 2016 Oh, i mean ":Test/test.png" not ":GUI/test.png" it was late Thank you for the answeres Sorry for lot of questions and thanks for the answers!
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