resize box

Posts 19 of 9 · Page 1 of 1
resize box
well i need help i got no idea how to do this easily
for example:
Code:
if(visuals > 1){
          menuheight = menuheight - 20
          }
i cant just use a numer cause i got more folders
but it loops it so it resizes it all the time
sorry if this is a noob question but i dont get it
Well im assuming your talking about the hans/gellin base, where the background height needs to change in order to fit the different folder sizes. I did this in about an hour of x and y adjusting - it only took that little time because I made this method to speed things up:
Code:
void bgsize(LPDIRECT3DDEVICE9 pDevice){
	if(GetAsyncKeyState(VK_NUMPAD2)&1)
		menuh++;
	if(GetAsyncKeyState(VK_NUMPAD8)&1)
		menuh--;
	if(GetAsyncKeyState(VK_NUMPAD4)&1)
		menuw--;
	if(GetAsyncKeyState(VK_NUMPAD6)&1)
		menuw++;

	char bufh[50];
	char bufw[50];
	DrawBox(400, 5, 85, 50, D3DCOLOR_ARGB(255, 0, 0, 0), bordCol, pDevice);
	sprintf(bufh, "Height:  %d", menuh);
	sprintf(bufw, "Width:   %d", menuw);
	Directx.DrawString(405, 10, D3DCOLOR_ARGB(255, 255, 255, 255), Directx.pFont, bufh);
	Directx.DrawString(405, 24, D3DCOLOR_ARGB(255, 255, 255, 255), Directx.pFont, bufw);
}
So what I did was go in game, then for each folder combination (I have 6 folders - which was about 56 different combinations and I haven't got them all yet - I hope you don't have many folders) I would adjust the height so that it was in the right spot. Like for example if I had 3 folders, named; Visuals, Memory, and Other, I would first open Visuals and get the height of the whole menu, then only memory.... then both visuals and other... etc. etc. etc. Then just write those combinations w/ the height for them down on paper or add a log to a text file by pressing a hotkey or something. Then open your hack and make a new method that you always call in your RenderFrame, and do something like this for each of the combinations you recorded:
Code:
if(visual == 0 && memory == 0 && player == 0 && premium == 0 && other == 0 && menu == 0)
		menuh = 104;

...

if(visual == 1 && memory == 1 && player == 0 && premium == 1 && other == 0 && menu == 1)
		menuh = 408;

...
For every single combination. Im sure there are easier ways but hell, it works.
Hope that helps you, it's pretty cool when you finish :P
Quote Originally Posted by DeadLinez View Post
Example:
Code:
if(D3D == 1 && esp == 1 && player == 1 && removals == 1 && misc == 1)
			{
				DrawBox(17,198,168,480,D3DCOLOR_ARGB(255, 0, 0, 0),D3DCOLOR_ARGB(255, 255, 255, 255),pDevice);
			}
Quote Originally Posted by LightzOut View Post
Well im assuming your talking about the hans/gellin base, where the background height needs to change in order to fit the different folder sizes. I did this in about an hour of x and y adjusting - it only took that little time because I made this method to speed things up:
Code:
void bgsize(LPDIRECT3DDEVICE9 pDevice){
	if(GetAsyncKeyState(VK_NUMPAD2)&1)
		menuh++;
	if(GetAsyncKeyState(VK_NUMPAD8)&1)
		menuh--;
	if(GetAsyncKeyState(VK_NUMPAD4)&1)
		menuw--;
	if(GetAsyncKeyState(VK_NUMPAD6)&1)
		menuw++;

	char bufh[50];
	char bufw[50];
	DrawBox(400, 5, 85, 50, D3DCOLOR_ARGB(255, 0, 0, 0), bordCol, pDevice);
	sprintf(bufh, "Height:  %d", menuh);
	sprintf(bufw, "Width:   %d", menuw);
	Directx.DrawString(405, 10, D3DCOLOR_ARGB(255, 255, 255, 255), Directx.pFont, bufh);
	Directx.DrawString(405, 24, D3DCOLOR_ARGB(255, 255, 255, 255), Directx.pFont, bufw);
}
So what I did was go in game, then for each folder combination (I have 6 folders - which was about 56 different combinations and I haven't got them all yet - I hope you don't have many folders) I would adjust the height so that it was in the right spot. Like for example if I had 3 folders, named; Visuals, Memory, and Other, I would first open Visuals and get the height of the whole menu, then only memory.... then both visuals and other... etc. etc. etc. Then just write those combinations w/ the height for them down on paper or add a log to a text file by pressing a hotkey or something. Then open your hack and make a new method that you always call in your RenderFrame, and do something like this for each of the combinations you recorded:
Code:
if(visual == 0 && memory == 0 && player == 0 && premium == 0 && other == 0 && menu == 0)
		menuh = 104;

...

if(visual == 1 && memory == 1 && player == 0 && premium == 1 && other == 0 && menu == 1)
		menuh = 408;

...
For every single combination. Im sure there are easier ways but hell, it works.
Hope that helps you, it's pretty cool when you finish :P
Lmao seriously? you did all that work and thougth of all of those combinations when you could have used some simple math.
If you actually looked through all of the base you would see that you could adjust the size by the menu items showing, so if 4 items are showing, you would multiply that by the height of each item, so approximately 15-20. Then whenever you would add an item to the menu it would multiply that by 15 and increase your menu size.
ah kay thanks ye well i thought of this too but i wanted a easier method but i guess there is no -.- so thank you very much
Example:
Code:
if(D3D == 1 && esp == 1 && player == 1 && removals == 1 && misc == 1)
			{
				DrawBox(17,198,168,480,D3DCOLOR_ARGB(255, 0, 0, 0),D3DCOLOR_ARGB(255, 255, 255, 255),pDevice);
			}
Quote Originally Posted by DeadLinez View Post
Example:
Code:
if(D3D == 1 && esp == 1 && player == 1 && removals == 1 && misc == 1)
			{
				DrawBox(17,198,168,480,D3DCOLOR_ARGB(255, 0, 0, 0),D3DCOLOR_ARGB(255, 255, 255, 255),pDevice);
			}
Creds Too Mee On Showing You That...
Or you could just have your menu adjust its own height....
Quote Originally Posted by mmbob View Post
Or you could just have your menu adjust its own height....
Da hell you talkin bout ?

BTW guys,

CD3DFont::GetTextExtent = helpful
well guys i got it workin thanks anyway to you all
i tried lightz outs method and it worked ill thank you all
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?