dugasz1 Posted August 28, 2016 Share 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? Link to comment
idarrr Posted August 28, 2016 Share Posted August 28, 2016 Use ":images/myimage.png" if you want to get image in another resources. Link to comment
dugasz1 Posted August 29, 2016 Author Share 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? Link to comment
roaddog Posted August 29, 2016 Share Posted August 29, 2016 No, its gonna be like this ":Test/test.png" Link to comment
dugasz1 Posted August 29, 2016 Author Share Posted August 29, 2016 Oh, i mean ":Test/test.png" not ":GUI/test.png" it was late Thank you for the answeres 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