Como Deixar O Menu Transparente

Posts 1–15 of 18 · Page 1 of 2
Como Deixar O Menu Transparente
Oi amiguinhoooooooos
Quero saber como deixar o fundo com menu (Assim como o Alessandro 4.3)
Trans parente, aqui está a parte da Base onde fica as configurações do DrawBoxs, DrawRect, Font e Blah Blah Blah...

Code:
#include "stdafx.h"

LPD3DXFONT Directx_Font = NULL;
LPDIRECT3DDEVICE9 pDevice;
LPDIRECT3DPIXELSHADER9  BlueSh,RedSh,GreenSh;
bool BlueShad = false;
bool RedShad = false;
bool GreenShad = false;

                         //..:Cores::..//

const D3DCOLOR Red = D3DCOLOR_ARGB(255,255,0,0);               // Vermelho

const D3DCOLOR Green = D3DCOLOR_ARGB(255,127,255,0);           // Verde

const D3DCOLOR Orange = D3DCOLOR_ARGB(255,255,140,0);          // Laranjado 

const D3DCOLOR Blue = D3DCOLOR_ARGB(255,0,0,255);              // Azul

const D3DCOLOR Yellow = D3DCOLOR_ARGB(255,255,255,51);         // Amarelo

const D3DCOLOR Black = D3DCOLOR_ARGB(255,0,0,0);               // Preto

const D3DCOLOR Grey   = D3DCOLOR_ARGB(255,112,112,112);        // Cinza

const D3DCOLOR DarkGrey = D3DCOLOR_ARGB(180,70,70,70);         // Cinza Escuro

const D3DCOLOR Gold   = D3DCOLOR_ARGB(255,255,215,0);          // Dourado

const D3DCOLOR Pink   = D3DCOLOR_ARGB(255,255,192,203);        // Rosa

const D3DCOLOR Purple  = D3DCOLOR_ARGB(255,128,0,128);         // Roxo

const D3DCOLOR White  = D3DCOLOR_ARGB(255,255,255,249);        // Branco

const D3DCOLOR Cyan  = D3DCOLOR_ARGB(255,0,255,255);           // Ciano

const D3DCOLOR Magenta  = D3DCOLOR_ARGB(255,255,0,255);        // Magenta

const D3DCOLOR Teal   = D3DCOLOR_ARGB(255,0,255,255);          // Carceta

const D3DCOLOR Lime = D3DCOLOR_ARGB(255,198,255,0);            // Lima

const D3DCOLOR SkyBlue = D3DCOLOR_ARGB(255,0,180,255);         // Azul Celeste

const D3DCOLOR LightGray = D3DCOLOR_ARGB(255,174,174,174);     // Cinza Claro

const D3DCOLOR DarkGray = D3DCOLOR_ARGB(255,71,65,64);         // Cinza Escuro

const D3DCOLOR Brown = D3DCOLOR_ARGB(255,77,46,38);            // Marrom

const D3DCOLOR Shit = D3DCOLOR_ARGB(255,74,38,38);             // Marrom Claro

const D3DCOLOR FireBrick = D3DCOLOR_ARGB(255,48,48,0);         // Tijolo

                         //..::Draw Text::..//

void DrawText(int x,int y,DWORD color,char *text, LPDIRECT3DDEVICE9 pDevice){
RECT rect;
SetRect(&rect, x, y, x, y);
Directx_Font->DrawTextA(NULL,text,-1,&rect, DT_LEFT|DT_NOCLIP, color);
}

                         //..::Draw Rect::..//

void DrawRect(int x,int y,int h,int w,DWORD Color,LPDIRECT3DDEVICE9 pDevice){
D3DRECT rec;
rec.x1 = x;
rec.x2 = x + w;
rec.y1 = y;
rec.y2 = y + h;
pDevice->Clear(1,&rec,D3DCLEAR_TARGET,Color,0,0);
}

                         //..::Draw Box::..//

void DrawBox(int x,int y,int h,int w,D3DCOLOR Border, D3DCOLOR Fill,LPDIRECT3DDEVICE9 pDevice){
DrawRect(x,y,h,w,Fill,pDevice);
DrawRect(x,y,h,1,Border,pDevice);
DrawRect(x+w,y,h,1,Border,pDevice);
DrawRect(x,y,1,w, Border,pDevice);
DrawRect(x,y+h,1,w+1, Border,pDevice);
DrawRect(x+2,y+2,h-4,2,Border,pDevice);
DrawRect(x+2,y+2,2,w-4, Border,pDevice);
DrawRect(x+w-4,y+2,h-4,2,Border,pDevice);
DrawRect(x+2,y+h-4,2,w-4, Border,pDevice);
}

                         //..::Fill Box::..//

void FillBox(int x,int y,int h,int w,D3DCOLOR Fill,LPDIRECT3DDEVICE9 pDevice){
DrawRect(x,y,h,w,Fill,pDevice);
}

                         //..::Draw Mouse::..//

void DrawMouse (LPDIRECT3DDEVICE9 pDevice, int PosX, int PosY){
        DrawRect(PosX, PosY, 5, 5, Blue,pDevice);
}

                         //..::Current Option::..//

void CurrentOption(int x,int y,int h,int w,D3DCOLOR Border,LPDIRECT3DDEVICE9 pDevice){
DrawRect(x,y,h,1,Border,pDevice);
DrawRect(x+w,y,h,1,Border,pDevice);
DrawRect(x,y,1,w, Border,pDevice);
DrawRect(x,y+h,1,w+1, Border,pDevice);
}

                         //..::Generate Shader::..//

HRESULT GenerateShader(LPDIRECT3DDEVICE9 pDevice, IDirect3DPixelShader9 **pShader, float r, float g, float b){
char szShader[ 64 ];
ID3DXBuffer *pShaderBuf = NULL;	
sprintf_s(szShader, "ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0", r, g, b);
D3DXAssembleShader(szShader, sizeof(szShader), NULL, NULL, 0, &pShaderBuf, NULL);
if(FAILED(pDevice->CreatePixelShader((const DWORD*)pShaderBuf->GetBufferPointer(), pShader)))return E_FAIL;
return S_OK;
}

                         //..::Cross Hair::..//

void CrossHair(LPDIRECT3DDEVICE9 pDevice, D3DCOLOR Colore){
D3DVIEWPORT9 Viewport;
pDevice->GetViewport(&Viewport);
DWORD ScreenX = Viewport.Width / 2; 
DWORD ScreenY = Viewport.Height / 2; 
D3DRECT rec2 = {ScreenX-9, ScreenY, ScreenX+9, ScreenY+1};
D3DRECT rec3 = {ScreenX, ScreenY-9, ScreenX+1, ScreenY+9};
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET,Colore, 0, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET,Colore, 0, 0);
}
Cara, a cor transparente é sem cor.... ao invez de tentar adiconar a cor transparente, pq vc nao tenta apagar o cor do fundo, assim acho que fica transparente!

( Se falei merda, então desconsidere tudo que escrevi ali em cima! )
Quote Originally Posted by YouCan_nabis... View Post
Cara, a cor transparente é sem cor.... ao invez de tentar adiconar a cor transparente, pq vc nao tenta apagar o cor do fundo, assim acho que fica transparente!

( Se falei merda, então desconsidere tudo que escrevi ali em cima! )
Faz sentido, porém se o código hexadecimal de todas as cores forem 0000, ou o menu será preto ou branco (não lembro qual cor é 000000 ._.)
Quote Originally Posted by Capevaldo View Post


Faz sentido, porém se o código hexadecimal de todas as cores forem 0000, ou o menu será preto ou branco (não lembro qual cor é 000000 ._.)
Acho que O, O, O, O); Seria transparente mas teria que ser um transparente com um tom da cor preta assim como o Alessandro fez no menu dele, ele fez um transparente com a cor "Cyan"
orra , eu posto isos em um lugar o Soad tbm posta ._.
meu deus em
Até a cor se quer pegar --' auhsasa
Quote Originally Posted by Alessandro10 View Post
Até a cor se quer pegar --' auhsasa
O.o Ñ sabia que a Cor valia tanto USHAUSHUAHSUAHSUHASA

Mas falando sério... passa ae...?
Eu passaria -.-
Cor :S
Faz assim... No PS, FireWorks, ou qualquer programa que dê pra ver o Hexadecimal da cor, faça a cor que quiser, dai adcione uma conts pra ela e coloque o valor exadecimal dela.

Ou melhor, no PS tem um recurso que vê o GBR usado na cor .-.
Será que daria pra faze uma imagem trasnaparente no PhotoShop, ver o RGB, e adicionar as cores com os Códigos do RGB ?
@S0aD possivelmente não pois os hexadecimais no visual são diferentes dos editores... ou Depende se você pegar a cor no PS ou Fireworks GBR e não a RGB ...
Eu tentei usar este Código... más como é do CANA, não deu

Code:
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->SetTexture(0, NULL);
	pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
Eu acho que se fizer uma imagem no PS com o fundo de cor que deseja e pegar o RGB e abrir uma nova constante para a cor desejada.
Carai , virei a noite ontem procurando como faz para deixar transparente o menu mais ainda não achei cara , aff --' se eu encontra ai eu passo pra geral *-----*
Quote Originally Posted by Turbulence View Post
Carai , virei a noite ontem procurando como faz para deixar transparente o menu mais ainda não achei cara , aff --' se eu encontra ai eu passo pra geral *-----*
Tente aqui...

Menus transparentes...
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us