The beginning of a menu! [What does what]

Posts 115 of 20 · Page 1 of 2
The beginning of a menu! [What does what]
Menu Tutorial / The basics


READ^^


Introduction:
I found that many people in this section are leeching menus like crazy. I was talking to this kid once saying he made this menu and all, and surprisingly enough the kid asked help for how to change the color for his hack. I was like -.-. Anyways there are some people out there that need this kind of info so don't flame me thinking you're all bad ass. This is simply for those who are uneducated in the art of D3D.









CODE LATER



Thanks @OBrozz This is a Great Tut for me since i am starting off.
Write another tutorial explaining the logic behind the navigation system.
Quote Originally Posted by Saltine View Post
Write another tutorial explaining the logic behind the navigation system.
Okay. Since many people asked for me to stay on mpgh. Ill have more to do. Ill make a series!
Nice job bro.
I thought X and Y was self explanatory.

Im sorry to say but if you needed a picture to realize that X and Y are coordinates, you need an algebra lesson, badly.

+1 for the picture though.

Code:
Put this:
Code:
void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
	D3DRECT rec = { x, y, x + w, y + h };
	pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
	FillRGB( x, (y + h - px), w, px,	BorderColor, pDevice );
	FillRGB( x, y, px, h,				BorderColor, pDevice );
	FillRGB( x, y, w, px,				BorderColor, pDevice );
	FillRGB( (x + w - px), y, px, h,	BorderColor, pDevice );
}
void DrawBox( int x, int y, int w, int h,int px, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
	FillRGB( x, y, w, h,		BoxColor, pDevice );
	DrawBorder( x, y, w, h, px,	BorderColor, pDevice );
}
VOID DrawText(LPDIRECT3DDEVICE9 pDevice, INT x, INT y, DWORD color, CHAR *text)
{
	RECT rect;
	SetRect(&rect, x, y, x, y);
	Directx_Font->DrawText(NULL, text, -1, &rect, DT_LEFT | DT_NOCLIP, color);
}
Then This:
Code:
int MenuX = 200;
int MenuY = 200;
int MenuH = 200;
int MenuW = 200;
#define White D3DCOLOR_ARGB (255,255,255,255)
#define Black D3DCOLOR_ARGB (255,0,0,0)
#define Red D3DCOLOR_ARGB (255,255,0,0)

if(menu){//Might have to change this.
DrawBox(MenuX, MenuY, MenuH, MenuW, White, Black, pDevice)//White is the box fill, Black is the Border Color
DrawText(pDevice, MenuX + 10, MenuY + 10, Red, "OBrozz Hack")
}
Quote Originally Posted by SpadeCA View Post
...

Code:
VOID DrawText(LPDIRECT3DDEVICE9 pDevice, INT x, INT y, DWORD color, CHAR *text)
{
	RECT rect;
	SetRect(&rect, x, y, x, y);
	Directx_Font->DrawText(NULL, text, -1, &rect, DT_LEFT | DT_NOCLIP, color);
}
...
For whatever reason functions like these that people have been C+Ping from wherever annoy the hell out of me.
They put the device as a parameter when it isn't even used and sometimes doesn't even make sense to put it there like :
Code:
DoTelekill(LPDIRECT3DDEVICE9 pDevice){
...
}
What?
Quote Originally Posted by SpadeCA View Post
Im sorry to say but if you needed a picture to realize that X and Y are coordinates, you need an algebra lesson, badly.
What has algebra got to do with coordinates??
Quote Originally Posted by Departure View Post
What has algebra got to do with coordinates??
Because in most school systems they bring up coordinates and all that stuff in algebra class as part of the curriculum!

@SpadeCA
Thanks but to some people even that code means nothing to them. It's like reading a book with words you don't know. I might make anotehr picture describing everything! Most people are to lazy to pick up a C++ text book.
@OBrozz
Great tutorial.
Looking forward to reading one of these
oh and yeah, learning algebra will help alot since like OBrozz said they make it part of their curriculum.
Quote Originally Posted by CookieMonster3 View Post
@OBrozz
Great tutorial.
Looking forward to reading one of these
oh and yeah, learning algebra will help alot since like OBrozz said they make it part of their curriculum.
This kid know's what's up! ^^
lol Algebra has nothing to do with X,Y positions, the only common thing is when calculating algebra they can use x and y as a definition, but you can also use any other letter of the alphabet as a definition, X, Y is a just a position on screen aka a coordinates
Quote Originally Posted by Departure View Post
lol Algebra has nothing to do with X,Y positions, the only common thing is when calculating algebra they can use x and y as a definition, but you can also use any other letter of the alphabet as a definition, X, Y is a just a position on screen aka a coordinates
He was referring to in graphing. In general, the horizontal axis is referred to as the X axis, and the vertical as the Y axis. You already know this obviously, but most people learn this in Algebra graphing units.
i want to learn how to code, any suggestion how i begin? thx
Posts 115 of 20 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?