Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    wassup40's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    I dont know help me
    Posts
    2,238
    Reputation
    28
    Thanks
    789
    My Mood
    Lurking

    How to change opacity

    How do i change the opacity of the drawbox?,
    i have this
    and i want the box allmost see through.

  2. #2
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    the normal DrawBox?
    If it is, I dont think you can.

    Use:

    Code:
    void DrawTransBox( int x, int y, int w, int h, D3DCOLOR BackColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
    	struct Vertex 
    	{
    		float x,y,z,ht;
    		DWORD BackColor;
    	}
    
    	V[4] =
    	{
    		{(float)x,(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)x,(float)y, 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)y, 0.0f, 0.0f, BackColor}
    	};
    
    	pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    	pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    	pDevice->SetRenderState( D3DRS_FOGENABLE, false );
    
    	pDevice->SetFVF(D3D_FVF);
    	pDevice->SetTexture(0, NULL);
    	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
    
    	DrawBorder( x, y, w, h, 1,	BorderColor, pDevice );
    }
    Then to set the transparency, Change the A value of ARGB

  3. The Following 4 Users Say Thank You to ac1d_buRn For This Useful Post:

    -Dimensions- (09-28-2010),NOOB (10-03-2010),tahha (09-27-2010),wassup40 (09-27-2010)

  4. #3
    wassup40's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    I dont know help me
    Posts
    2,238
    Reputation
    28
    Thanks
    789
    My Mood
    Lurking
    wtf i can thank you but thank's..

  5. #4
    Spook's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    4,649
    Reputation
    26
    Thanks
    568
    Quote Originally Posted by wassup40 View Post
    wtf i can thank you but thank's..
    Why wouldn't you thank him?

    Sounds a bit ungrateful.
    I'm back.

  6. #5
    wassup40's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    I dont know help me
    Posts
    2,238
    Reputation
    28
    Thanks
    789
    My Mood
    Lurking
    Quote Originally Posted by ToxinJr View Post


    Why wouldn't you thank him?

    Sounds a bit ungrateful.
    No... there wasnt a thank button for some reason..,
    1 other thing how do i make it open as a menu becouse the border is allways there
    Last edited by wassup40; 09-27-2010 at 07:05 AM.

  7. #6
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    Quote Originally Posted by wassup40 View Post


    No... there wasnt a thank button for some reason..,
    1 other thing how do i make it open as a menu becouse the border is allways there
    You put it under MenuShow?
    or Mvisible == true

  8. #7
    wassup40's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    I dont know help me
    Posts
    2,238
    Reputation
    28
    Thanks
    789
    My Mood
    Lurking
    Quote Originally Posted by ac1d_buRn View Post


    You put it under MenuShow?
    or Mvisible == true
    and how do i do that...

  9. #8
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Quote Originally Posted by wassup40 View Post


    and how do i do that...
    LOCATE WHERE YOU DETERMINE WHETHER YOU DRAW YOUR MENU. NOW, REPLACE THE 'A' OF THE ARGB VALUE WITH YOUR ALPHA. THEN, GO TO YOUR DRAWBOX CODE, AND REPLACE THE CODE YOU HAVE WITH THE ONE CRASH POSTED.

    This is clearly not your base, so I'm not saying "your code".

  10. #9
    wassup40's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    I dont know help me
    Posts
    2,238
    Reputation
    28
    Thanks
    789
    My Mood
    Lurking
    I now have no inside's....

  11. #10
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    Who says the dickhead put A to 0?

  12. #11
    Spook's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    4,649
    Reputation
    26
    Thanks
    568
    Looks better that way
    I'm back.

  13. #12
    wassup40's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    I dont know help me
    Posts
    2,238
    Reputation
    28
    Thanks
    789
    My Mood
    Lurking
    There no ARGB in here
    Code:
    void DrawTransBox( int x, int y, int w, int h, D3DCOLOR BackColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
    	struct Vertex 
    	{
    		float x,y,z,ht;
    		DWORD BackColor;
    	}
    
    	V[4] =
    	{
    		{(float)x,(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)x,(float)y, 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)y, 0.0f, 0.0f, BackColor}
    	};
    
    	pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    	pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    	pDevice->SetRenderState( D3DRS_FOGENABLE, false );
    
    	pDevice->SetFVF(D3D_FVF);
    	pDevice->SetTexture(0, NULL);
    	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
    
    	DrawBorder( x, y, w, h, 1,	BorderColor, pDevice );
    }

  14. #13
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    Quote Originally Posted by wassup40 View Post
    There no ARGB in here
    Code:
    void DrawTransBox( int x, int y, int w, int h, D3DCOLOR BackColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
    	struct Vertex 
    	{
    		float x,y,z,ht;
    		DWORD BackColor;
    	}
    
    	V[4] =
    	{
    		{(float)x,(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)x,(float)y, 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)y, 0.0f, 0.0f, BackColor}
    	};
    
    	pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    	pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    	pDevice->SetRenderState( D3DRS_FOGENABLE, false );
    
    	pDevice->SetFVF(D3D_FVF);
    	pDevice->SetTexture(0, NULL);
    	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
    
    	DrawBorder( x, y, w, h, 1,	BorderColor, pDevice );
    }
    You cant code. Nuff proven
    Learn C++ & DirectX.
    My spoon aeroplane just ran out of fuel.

  15. #14
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Quote Originally Posted by wassup40 View Post
    There no ARGB in here
    Code:
    void DrawTransBox( int x, int y, int w, int h, D3DCOLOR BackColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
    	struct Vertex 
    	{
    		float x,y,z,ht;
    		DWORD BackColor;
    	}
    
    	V[4] =
    	{
    		{(float)x,(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)x,(float)y, 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)(y+h), 0.0f, 0.0f, BackColor},
    		{(float)(x+w),(float)y, 0.0f, 0.0f, BackColor}
    	};
    
    	pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    	pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    	pDevice->SetRenderState( D3DRS_FOGENABLE, false );
    
    	pDevice->SetFVF(D3D_FVF);
    	pDevice->SetTexture(0, NULL);
    	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
    
    	DrawBorder( x, y, w, h, 1,	BorderColor, pDevice );
    }
    Look, your signature and avatar are misleading.

    You got us to spoonfeed you yesterday once already, but you didn't know how to eat the spoonfed food.

    And now that you want us to do it again, we have overlooked your previous failures and tried to help you once more. But again, despite watching 40 videos on C++, you don't get this either, another spoonfeeding.

  16. #15
    -ExileD-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    http://mpgh.net Posts: 25,987
    Posts
    552
    Reputation
    32
    Thanks
    794
    My Mood
    Lurking
    Code:
    void FillRGB( int x, int y, int w, int h, D3DCOLOR yourcolor, IDirect3DDevice9* pDevice )
    {
    const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
    struct Vertex
    {
    float x,y,z,ht;
    DWORD yourcolor;
    }
    
    V[4] =
    {
    {(float)x,(float)(y+h), 0.0f, 0.0f, yourcolor},
    {(float)x,(float)y, 0.0f, 0.0f, yourcolor},
    {(float)(x+w),(float)(y+h), 0.0f, 0.0f, yourcolor},
    {(float)(x+w),(float)y, 0.0f, 0.0f, yourcolor}
    };
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    pDevice->SetRenderState( D3DRS_FOGENABLE, false );
    
    pDevice->SetFVF(D3D_FVF);
    pDevice->SetTexture(0, NULL);
    pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
    
    }
    Figure out the rest by yourself, i'm sure your smart enough.
    Maybe -_-;

Page 1 of 2 12 LastLast

Similar Threads

  1. How to Change the Start-Bar in Windows XP
    By Jackal in forum General
    Replies: 31
    Last Post: 05-31-2015, 09:29 PM
  2. how to change mail?
    By dago80 in forum WarRock - International Hacks
    Replies: 4
    Last Post: 06-25-2007, 07:42 PM
  3. how to change a bypass so it is working??
    By 123456789987654321 in forum WarRock - International Hacks
    Replies: 13
    Last Post: 06-04-2007, 03:35 PM
  4. How to change War Rock weapon sounds (I bet Dave already knows how to) Sorry Repost
    By WarRocker19 in forum WarRock - International Hacks
    Replies: 12
    Last Post: 05-21-2007, 09:45 AM
  5. How To Change Your Main Theme Song
    By gino666 in forum WarRock - International Hacks
    Replies: 16
    Last Post: 05-10-2007, 11:58 PM