Code:
DWORD color[3], cur;
pMenu->DrawBorderedBox( 300, 100, 300, 120 , pMenu->col.background, pMenu->col.border, pDevice );
pMenu->DrawTextR( 310, 110, D3DCOLOR_ARGB(255, 220, 220, 220), "Color Slider 0.5" );
pMenu->DrawTextR( 307, 135, D3DCOLOR_ARGB(255, 255, 0, 0), "R:" );
pMenu->DrawTextR( 307, 150, D3DCOLOR_ARGB(255, 0, 255, 0), "G:" );
pMenu->DrawTextR( 307, 165, D3DCOLOR_ARGB(255, 0, 0, 255), "B:" );
pMenu->DrawBorderedBox( 325, 135+3, 255, 8, D3DCOLOR_ARGB(255, 255, 0, 0) /*Background*/, D3DCOLOR_ARGB(255, 200, 200, 200) /*Border*/, pDevice );
pMenu->DrawBox( 325+color[0], 135+1, 2, 11, D3DCOLOR_ARGB(255,255,255,255), pDevice );
pMenu->DrawBorderedBox( 325, 150+3, 255, 8, D3DCOLOR_ARGB(255, 0, 255, 0) /*Background*/, D3DCOLOR_ARGB(255, 200, 200, 200) /*Border*/, pDevice );
pMenu->DrawBox( 325+color[1], 150+1, 2, 11, D3DCOLOR_ARGB(255,255,255,255), pDevice );
pMenu->DrawBorderedBox( 325, 165+3, 255, 8, D3DCOLOR_ARGB(255, 0, 0, 255) /*Background*/, D3DCOLOR_ARGB(255, 200, 200, 200) /*Border*/, pDevice );
pMenu->DrawBox( 325+color[2], 165+1, 2, 11, D3DCOLOR_ARGB(255,255,255,255), pDevice );
pMenu->DrawTextR( 317, 184, D3DCOLOR_ARGB(255, 255, 255, 255), "Color:" );
pMenu->DrawBorderedBox( 370, 184+3, 70, 8, D3DCOLOR_ARGB(255, color[0], color[1], color[2]), D3DCOLOR_ARGB(255, 200, 200, 200), pDevice );
pMenu->DrawTextR( 310, 200, D3DCOLOR_ARGB(255, 220, 220, 220), "Use +/- to change value, 1/2/3 to choose color" );
if(GetAsyncKeyState(VK_ADD) && color[cur] < 255)
color[cur]++;
if(GetAsyncKeyState(VK_SUBTRACT) && color[cur] > 0)
color[cur]--;
int key[3] = { 0x31, 0x32, 0x33 };
for( int i = 0; i < 3; i++ )
{
if(GetAsyncKeyState(key[i])&1)
cur = i;
}