ilovecookies (01-28-2010),Mr.Magicman (01-28-2010),why06 (01-28-2010)
Just thought I'd help out, so gonna post some snippets of some menu coding. Maybe It'll get you started..
Entry point: //always need it
Some structs for the menuCode://entry point BOOL APIENTRY DllMain( HMODULE hModule, DWORD dreason_for_call, LPVOID lpReserved) { return 0; }
Setting your menuCode:struct items{ int firstitem; int seconditem; }; items Items; //menu properties struct menu{ char *title; int x; int y; int width; int height; int maxitems; }; menu Menu; // can refer to it by menu or Menu ;)
Setting menu hotkeys:Code:void SetMenu(int x,int y, int width, int height, int maxitems, char* title) { Menu.title = "D3D Menu Test"; Menu.x = 10; Menu.y = 70; Menu.width = width; Menu.height = height; Menu.maxitems = 12; }
Thats all I'm posting for now, Not posting how to render the menu, DrawStrings, Setting maximum highlights. etc.Code:void SetHotkeys(){ if(highlight[1] == 1 && (GetAsyncKeyState(VK_RIGHT)&1)) if(Items.firstitem <= 1){Items.firstitem++;} if(highlight[1] == 1 && (GetAsyncKeyState(VK_LEFT)&1)) if(Items.firstitem != 0){Items.firstitem--;} if(Items.firstitem>1)Items.firstitem=0; }
I may later. Who knows.
Just thought It might help.
Have fun.
EDIT: Some D3D colors.
Some pretty good colors, once again. Have fun.Code:GenerateTexture(Device_Interface, &texGreen , D3DCOLOR_ARGB(255,0,255,0)); GenerateTexture(Device_Interface, &texRed , D3DCOLOR_ARGB(255,255,0,0)); GenerateTexture(Device_Interface, &texBlue , D3DCOLOR_ARGB(255,0,0,255)); GenerateTexture(Device_Interface, &texOrange , D3DCOLOR_ARGB(255,255,165,0)); GenerateTexture(Device_Interface, &texYellow , D3DCOLOR_ARGB(255,255,255,0)); GenerateTexture(Device_Interface, &texPink , D3DCOLOR_ARGB(255,255,192,203)); GenerateTexture(Device_Interface, &texCyan , D3DCOLOR_ARGB(255,0,255,255)); GenerateTexture(Device_Interface, &texPurple , D3DCOLOR_ARGB(255,160,32,240)); GenerateTexture(Device_Interface, &texBlack , D3DCOLOR_ARGB(255,0,0,0)); GenerateTexture(Device_Interface, &texWhite , D3DCOLOR_ARGB(255,255,255,255)); GenerateTexture(Device_Interface, &texSteelBlue , D3DCOLOR_ARGB(255,33,104,140)); GenerateTexture(Device_Interface, &texLightSteelBlue, D3DCOLOR_ARGB(255,201,255,255)); GenerateTexture(Device_Interface, &texLightBlue , D3DCOLOR_ARGB(255,26,140,306)); GenerateTexture(Device_Interface, &texSalmon , D3DCOLOR_ARGB(255,196,112,112)); GenerateTexture(Device_Interface, &texBrown , D3DCOLOR_ARGB(255,168,99,20)); GenerateTexture(Device_Interface, &texTeal , D3DCOLOR_ARGB(255,38,140,140)); GenerateTexture(Device_Interface, &texLime , D3DCOLOR_ARGB(255,50,205,50)); GenerateTexture(Device_Interface, &texElectricLime , D3DCOLOR_ARGB(255,204,255,0)); GenerateTexture(Device_Interface, &texGold , D3DCOLOR_ARGB(255,255, 215, 0)); GenerateTexture(Device_Interface, &texOrangeRed , D3DCOLOR_ARGB(255,255,69,0)); GenerateTexture(Device_Interface, &texGreenYellow , D3DCOLOR_ARGB(255,173,255,47)); GenerateTexture(Device_Interface, &texAquaMarine , D3DCOLOR_ARGB(255,127,255,212)); GenerateTexture(Device_Interface, &texSkyBlue , D3DCOLOR_ARGB(255,0,191,255)); GenerateTexture(Device_Interface, &texSlateBlue , D3DCOLOR_ARGB(255,132, 112, 255)); GenerateTexture(Device_Interface, &texCrimson , D3DCOLOR_ARGB(255,220,20,60)); GenerateTexture(Device_Interface, &texDarkOliveGreen, D3DCOLOR_ARGB(255,188,238,104 )); GenerateTexture(Device_Interface, &texPaleGreen , D3DCOLOR_ARGB(255,154,255, 154)); GenerateTexture(Device_Interface, &texDarkGoldenRod , D3DCOLOR_ARGB(255,255, 185, 15 )); GenerateTexture(Device_Interface, &texFireBrick , D3DCOLOR_ARGB(255,255,48,48)); GenerateTexture(Device_Interface, &texDarkBlue , D3DCOLOR_ARGB(255,0,0,204)); GenerateTexture(Device_Interface, &texDarkerBlue , D3DCOLOR_ARGB(255,0,0,153)); GenerateTexture(Device_Interface, &texDarkYellow , D3DCOLOR_ARGB(255,255,204,0)); GenerateTexture(Device_Interface, &texLightYellow , D3DCOLOR_ARGB(255,255,255,153));
Last edited by Calebb; 01-27-2010 at 09:31 PM.
ilovecookies (01-28-2010),Mr.Magicman (01-28-2010),why06 (01-28-2010)
Very Good TUT!
How'd you learn this so fast?
xD Im a quick learner.
A lot of people use the Drawstring method to make menus, but you can make boxes and such too, it just really left up to your imagination. Since once ur .dll is injected if you have a pointer to the d3ddevice you can do anything you want. And correct me if Im wrong, but you don't exactly need one. I think you can just create ur own device. Im not sure if ur allowed to have two. Anyway. just take a look at shadow's base. He has a menu struct in there.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Yeah you can create boxes. Etc
DrawRect
Use it as bg.
I like D3D Because theres so many options.
But did this help anybody?
EDIT:
Congrats Why06
Should be able to run multiple D3D devices, not sure how well they're able to stack up on top of eachother tho
I one logged in on 12 rose online accounts from my PC, it didnt even lag very badly ;D
Ah we-a blaze the fyah, make it bun dem!
why06 (01-28-2010)
Mhm.
I'm not so good with 'detours', or bypass's. Nor Do I have any addies for a D3D9 Game. (Bypass wise)
So atm, It's pretty useless. :\