Help please

Posts 111 of 11 · Page 1 of 1
Help please
Hello guys i was wondering if this was the right code for adding a pic into a GUI

Code:
 this->DrawImageF(pDevice, pSprite, pTexture, 15.0f, 60.0f , 0.0f, "C:\wow\ehfgui.png");
And i was wondering where to put it
Well, one of the parameters seem to be the device, so put it in one of your hooked functions and call it.
well the code it's self all ready has everything says my source master and he gave me that and he said just add that to get the gui
just draw a sprite.

LPDIRECT3DTEXTURE9 pTextureInterface;
LPD3DXSPRITE pSpriteInterface;
D3DXVECTOR2 Position;


HRESULT WINAPI IDirect3DDevice9::BeginScene()
{

Position.x = 150.0f;
Position.y = 200.0f;

D3DXCreateTextureFromFile(pDeviceInterface, "*:\\file.ext", &pTextureInterface);
D3DXCreateSprite(pDeviceInterface, &pSpriteInterface);

return pDeviceInterface->BeginScene();

}


HRESULT WINAPI IDirect3DDevice9::EndScene()
{

pSpriteInterface->Begin();
pSpriteInterface->Draw(pTextureInterface, NULL, NULL, NULL, NULL, &Position, 0xFFFFFFFF);
pSpriteInterface->End();

return pDeviceInterface->EndScene();

}
thanks man
but would this be the file name *:\\file.ext
if do we just put the file name the like so *:\\imagename.jpeg or what ever?
Yes, whit, that is what you would initially do.. and it works. i would use an image in my GUI, but its fail. no use at all.. plus it laggs
yep whit, if you need help i can help you or what not. if you do it right or have a good connection it will NOT lag.
thanks zmansquared..
ima try it myself and if i have problems ill pm you..
Instead of people having to place the files in their C:\ drive just use GetDirectoryFile.
You could do that. just keeping it simpile
Posts 111 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?