Guest User

Untitled

a guest
Jan 21st, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. DWORD color[3], cur;
  2.  
  3.  
  4. menu.DrawBorderedBox( 300, 100, 300, 120 , cyan, yellow, pDevice );
  5. menu.DrawGameTextPixel( 310, 110, D3DCOLOR_ARGB(255, 220, 220, 220), "Color Slider 0.5" );
  6. menu.DrawGameTextPixel( 307, 135, D3DCOLOR_ARGB(255, 255, 0, 0), "R:" );
  7. menu.DrawGameTextPixel( 307, 150, D3DCOLOR_ARGB(255, 0, 255, 0), "G:" );
  8. menu.DrawGameTextPixel( 307, 165, D3DCOLOR_ARGB(255, 0, 0, 255), "B:" );
  9. menu.DrawBorderedBox( 325, 135+3, 255, 8, D3DCOLOR_ARGB(255, 255, 0, 0) /*Background*/, D3DCOLOR_ARGB(255, 200, 200, 200) /*Border*/, pDevice );
  10. menu.DrawBox( 325+color[0], 135+1, 2, 11, D3DCOLOR_ARGB(255,255,255,255), pDevice );
  11. menu.DrawBorderedBox( 325, 150+3, 255, 8, D3DCOLOR_ARGB(255, 0, 255, 0) /*Background*/, D3DCOLOR_ARGB(255, 200, 200, 200) /*Border*/, pDevice );
  12. menu.DrawBox( 325+color[1], 150+1, 2, 11, D3DCOLOR_ARGB(255,255,255,255), pDevice );
  13. menu.DrawBorderedBox( 325, 165+3, 255, 8, D3DCOLOR_ARGB(255, 0, 0, 255) /*Background*/, D3DCOLOR_ARGB(255, 200, 200, 200) /*Border*/, pDevice );
  14. menu.DrawBox( 325+color[2], 165+1, 2, 11, D3DCOLOR_ARGB(255,255,255,255), pDevice );
  15. menu.DrawGameTextPixel( 317, 184, D3DCOLOR_ARGB(255, 255, 255, 255), "Color:" );
  16. menu.DrawBorderedBox( 370, 184+3, 70, 8, D3DCOLOR_ARGB(255, color[0], color[1], color[2]), D3DCOLOR_ARGB(255, 200, 200, 200), pDevice );
  17. menu.DrawGameTextPixel( 310, 200, D3DCOLOR_ARGB(255, 220, 220, 220), "Use +/- to change value, 1/2/3 to choose color" );
  18.  
  19.  
  20. if(GetAsyncKeyState(VK_ADD) && color[cur] < 255)
  21. color[cur]++;
  22. if(GetAsyncKeyState(VK_SUBTRACT) && color[cur] > 0)
  23. color[cur]--;
  24.  
  25. int key[3] = { 0x31, 0x32, 0x33 };
  26. for( int i = 0; i < 3; i++ )
  27. {
  28. if(GetAsyncKeyState(key[i])&1)
  29. cur = i;
  30. }
Add Comment
Please, Sign In to add comment