Imposter Posted August 25, 2013 Share Posted August 25, 2013 Hey there, is it possible to use an image from the web with guiStaticImageLoadImage? If not, can someone explain a way to do it without DX? Link to comment
bandi94 Posted August 25, 2013 Share Posted August 25, 2013 fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false) function myCallback( responseData ) myTexture = dxCreateTexture(responseData ) end addEventHandler("onClientRender", root, function() if myTexture then local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture ) end end ) Link to comment
Imposter Posted August 25, 2013 Author Share Posted August 25, 2013 I just said I needed not dx, but cegui static image. Link to comment
MIKI785 Posted August 25, 2013 Share Posted August 25, 2013 fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false) function myCallback( responseData ) if fileExists("image.jpg") then fileDelete("image.jpg") end local file = fileCreate("image.jpg") fileWrite(file, responseData) fileClose(file) guiCreateStaticImage(x, y, x, y, "image.jpg", bool) --Provide the XYs end This works for me Link to comment
Imposter Posted August 25, 2013 Author Share Posted August 25, 2013 Hmm... that is a great idea. <3 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