Code:
void cGUI::DrawColorPicker(LPDIRECT3DDEVICE9 pDevice,cButton &Button,COLOR &Col)
{
if(Button.Return && GUI.show){
if(SPRCR == true){
D3DXCreateTextureFromFileInMemory(pDevice,&Color,sizeof(Color),&D3D.Settings.MenuTexture);
D3DXCreateSprite(pDevice,&D3D.Settings.Sprite);
SPRCR = false;
}
D3D.Draw.Box(29,438,264,163,1,0x8D04A0A0,0xFF030303,pDevice,true,false);
D3D.Draw.GameTextPixel(33,440,0xFF3DFFFF,"Color:");
D3D.Draw.FillRGB(62,442,135,11,Col.ConvertToDWORD(),pDevice,false);
D3D.Draw.GameTextPixel(60,585,LightAvacado,"Thx ac1d_buRn for the Idea. Its not copied!");
D3DXVECTOR3 POS;
POS.x = 33;
POS.y = 457;
POS.z = 0;
D3D.Settings.Sprite->Begin(D3DXSPRITE_ALPHABLEND);
D3D.Settings.Sprite->Draw(D3D.Settings.MenuTexture,NULL,NULL,&POS,0xFFFFFFFF);
D3D.Settings.Sprite->End();
if(Hack.Readys.MouseIsIn(33,457,288,584))
{
if(GetAsyncKeyState(1)<0)
{
HDC TheHDC = GetDC (NULL);
DWORD Colors = GetPixel (TheHDC, Hack.Values.MousePos.x, Hack.Values.MousePos.y);
ReleaseDC (NULL, TheHDC);
Col.Alpha = 255;
Col.Red = GetRValue (Colors);
Col.Green = GetGValue (Colors);
Col.Blue = GetBValue (Colors);
}
}
RandomC.Draw(pDevice);
if(RandomC.Return)
{
Col.Alpha = 255;
Col.Red = Hack.Misc.GetRandomNumber(0,255);
Col.Green = Hack.Misc.GetRandomNumber(0,255);
Col.Blue = Hack.Misc.GetRandomNumber(0,255);
RandomC.Return = false;
}
CloseC.Draw(pDevice);
if(CloseC.Return){
Button.Return = false;
CloseC.Return = false;
}
}
else
SPRCR = true;
}
for the original thread: