Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    [Source]Drawing Mouse


    a1fahrrad
     Share

    Recommended Posts

    First you need a Draw Funktion, i'm using Hans211 DrawBox Funktion xD

    void DrawBox(IDirect3DDevice8 *pDevice, int x, int y, int w, int h, D3DCOLOR col)
    {
    struct QuadVertex {
    	float x,y,z,rhw;
    	DWORD dwColor;
    };
    IDirect3DVertexBuffer8 *pVertexBuffer = NULL;
    QuadVertex qV[4];
    BYTE *pVertexData = NULL;
    
    if (pDevice->CreateVertexBuffer((4*sizeof(QuadVertex)),(D3DUSAGE_WRITEONLY|D3DUSAGE_DYNAMIC),(D3DFVF_XYZRHW|D3DFVF_DIFFUSE),D3DPOOL_DEFAULT,&pVertexBuffer)<0) return;
    
    pDevice->SetRenderState(D3DRS_ZENABLE , FALSE);
    pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
    pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);
    
    pVertexBuffer->Lock(0,0,&pVertexData,D3DLOCK_NOSYSLOCK | D3DLOCK_DISCARD);
    if(pVertexData)
    {
    	qV[0].dwColor = qV[1].dwColor = qV[2].dwColor = qV[3].dwColor = col;
    	qV[0].z   = qV[1].z   = qV[2].z   = qV[3].z   = 0.0f;
    	qV[0].rhw = qV[1].rhw = qV[2].rhw = qV[3].rhw = 0.0f;
    
    	qV[0].x = (float)x;
    	qV[0].y = (float)(y + h);
    	qV[1].x = (float)x;
    	qV[1].y = (float)y;
    	qV[2].x = (float)(x + w);
    	qV[2].y = (float)(y + h);
    	qV[3].x = (float)(x + w);
    	qV[3].y = (float)y;
    
    	memcpy(pVertexData,qV,sizeof(QuadVertex)*4);
    	pVertexBuffer->Unlock();
    	pVertexData = NULL;
    
    	pDevice->SetStreamSource(0,pVertexBuffer, sizeof(QuadVertex));
    	pDevice->SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE );
    	pDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 2 );
    }
    if	(pVertexBuffer) {
    	pVertexBuffer->Release();
    	pVertexBuffer=NULL;
    }
    pDevice->SetRenderState(D3DRS_LIGHTING, true);
    }

     

     

    Here is the Mouse Funktion:

    void DrawCursor1(int x, int y, DWORD Color1, DWORD Color2, LPDIRECT3DDEVICE8 pDevice )
    {
    //Credits to a1fahrrad
    DrawBox(pDevice,	x,	y,   1,  1, Color1 );
    DrawBox(pDevice,	x,	y,   1, 12, Color1 );
    DrawBox(pDevice,  x+1, y+11,   1,  1, Color1 );
    DrawBox(pDevice,  x+2, y+10,   1,  1, Color1 );
    DrawBox(pDevice,  x+3,  y+9,   1,  1, Color1 );
    DrawBox(pDevice,  x+4, y+10,   1,  2, Color1 );
    DrawBox(pDevice,  x+5, y+12,   1,  2, Color1 );
    DrawBox(pDevice,  x+6, y+14,   2,  1, Color1 );
    DrawBox(pDevice,  x+7, y+10,   1,  2, Color1 );
    DrawBox(pDevice,  x+6, y+9 ,   1,  1, Color1 );
    DrawBox(pDevice,  x+8, y+12,   1,  2, Color1 );
    DrawBox(pDevice,  x+1,	y,   1,  1, Color1 );
    DrawBox(pDevice,  x+2,  y+1,   1,  1, Color1 );
    DrawBox(pDevice,  x+3,  y+2,   1,  1, Color1 );
    DrawBox(pDevice,  x+4,  y+3,   1,  1, Color1 );
    DrawBox(pDevice,  x+5,  y+4,   1,  1, Color1 );
    DrawBox(pDevice,  x+6,  y+5,   1,  1, Color1 );
    DrawBox(pDevice,  x+7,  y+6,   1,  1, Color1 );
    DrawBox(pDevice,  x+8,  y+7,   1,  1, Color1 );
    DrawBox(pDevice,  x+8,  y+8,   1,  1, Color1 );
    DrawBox(pDevice,  x+7,  y+8,   1,  1, Color1 );
    DrawBox(pDevice,  x+6,  y+8,   1,  1, Color1 ); 
    DrawBox(pDevice,  x+1,  y+1,   1,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+2,   2,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+3,   3,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+4,   4,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+5,   5,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+6,   6,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+7,   7,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+8,   5,  1, Color2 );
    DrawBox(pDevice,  x+1,  y+9,   2,  1, Color2 );
    DrawBox(pDevice,  x+1, y+10,   1,  1, Color2 );
    DrawBox(pDevice,  x+4,  y+9,   2,  1, Color2 );
    DrawBox(pDevice,  x+5, y+10,   2,  2, Color2 );
    DrawBox(pDevice,  x+6, y+12,   2,  2, Color2 );
    }

     

     

     

    Use GetCursorPos( ); to get the Position of the Cursor!

     

    Screen

    maus.png

    Link to comment
    Share on other sites

    • 2 weeks later...
    wow can u send me your project? ( source ).

    i know how to code d3d so i'm not a Biene Maja, but i realy like that style!!

    ;)

     

    you really think that he going to give you source ? xDO.o

    Link to comment
    Share on other sites

    • 4 weeks later...
    wow can u send me your project? ( source ).

    i know how to code d3d so i'm not a Biene Maja, but i realy like that style!!

    xD

    buy vip and download mine

    Link to comment
    Share on other sites

    • 3 weeks later...
    • 2 weeks later...

    YOur menu is sexy, can you share it to me or gave me the link where you get tutorial ( if you didnt made it )

    Link to comment
    Share on other sites

    i made this...

     

    I don't know if there is a Tutorial...

     

    It's not hard to code...

     

    & i stopped coding and delete my projekts -> i can't share it or something else

    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...