Thread: D3D9 Menu

Results 1 to 9 of 9
  1. #1
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75

    D3D9 Menu

    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
    Code:
    //entry point
    BOOL APIENTRY DllMain( HMODULE hModule,
    					  DWORD dreason_for_call,
    					  LPVOID lpReserved)
    {
    	return 0;
    }
    Some structs for the menu
    Code:
    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 your menu
    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;
    }
    Setting menu hotkeys:
    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;
    }
    Thats all I'm posting for now, Not posting how to render the menu, DrawStrings, Setting maximum highlights. etc.
    I may later. Who knows.
    Just thought It might help.
    Have fun.

    EDIT: Some D3D colors.
    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));
    Some pretty good colors, once again. Have fun.
    Last edited by Calebb; 01-27-2010 at 09:31 PM.

  2. The Following 3 Users Say Thank You to Calebb For This Useful Post:

    ilovecookies (01-28-2010),Mr.Magicman (01-28-2010),why06 (01-28-2010)

  3. #2
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Very Good TUT!

  4. #3
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    How'd you learn this so fast?

  5. #4
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    xD Im a quick learner.

  6. #5
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    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

  7. #6
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    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

  8. #7
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    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!

  9. The Following User Says Thank You to Hell_Demon For This Useful Post:

    why06 (01-28-2010)

  10. #8
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    this is awesome man keep it up!

  11. #9
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    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. :\

Similar Threads

  1. [Help] Topblast D3D9 Menu Base
    By panget34 in forum Soldier Front General
    Replies: 18
    Last Post: 05-22-2011, 05:58 AM
  2. [Request] D3D9 Menu Hack - > Chams
    By taylan in forum WarRock Hack Source Code
    Replies: 8
    Last Post: 01-02-2011, 12:20 PM
  3. [Request] D3D9 Menu Hack
    By taylan in forum WarRock Hack Source Code
    Replies: 3
    Last Post: 12-09-2010, 04:38 AM
  4. [Help] D3D9 Menu Hack - 1 Problem...
    By taylan in forum WarRock Hack Source Code
    Replies: 9
    Last Post: 12-09-2010, 04:31 AM
  5. D3D9 Menu
    By FragInABox in forum Programming Tutorial Requests
    Replies: 2
    Last Post: 09-18-2009, 12:26 PM