I felt that I could probably do a little more explaining so that this will be easier to understand.
Zoom if you could, please close my old thread.
caHack - a basic class for storing hack information, can be multiple choices(integer type), on/off (boolean), or other.
<[Variables]>
LPCSTR name; The name of the hack that will appear in the menu
int type; This is the hack's type
int iToggle; If it has multiple choices then it's selected value is found here
int arrayLen; just a variable that must be passed in if the hack has multiple choices like chams
bool bToggle; The other toggle variable that is only used if the hack is an on/off type
LPCSTR * toggleArray; An array of strings that are the choices of an int hack
<[Constructors]>
Note: This hack has an overloaded constructor with three different choices depending on the type of hack needed.
caHack(LPCSTR inName,int toggle, int inArrayLen, LPCSTR inArray[])
This constructor creates an int/multichoice hack. You input the:
[Name of the hack],[The point where the toggle starts],[the length of the array that carries the choices],[the array of strings carrying the choices]
caHack(LPCSTR inName,bool toggle)
This constructor creates a Bool/ onoff hack. you input the:
[name],[starting bool value]
caHack(LPCSTR inName)
This constructor creates an other hack. you input the:
[name]
<[Functions]>
This class does not have any.
caWindow - the parent class to all the other window classes, can be used for custom windows if needed
<[Variables]>
POINT position, titleOff, dragOff, stPos; The position, the offset of the title, the dragging offset, and the starting position
SIZE dims; the dimensions of the window
D3DCOLOR border, selectedBor, fill; Three different colors border is the color of the border when not selected, selectedBor for when it is, and fill is just the filled in color
bool visible, drag; Two bools drag determines if the window is being dragged(don't play with it) and visible if the menu is on or off
LPCSTR title; Just the title of the menu, leave as null for no title
<[Constructor]>
caWindow(int inX, int inY, int inW, int inH, D3DCOLOR inBor, D3DCOLOR inSelBor, D3DCOLOR inFill, bool inputVisible, LPCSTR inTitle, int inxOff, int inyOff)
The basic initialization for a window, will be found in other constructors for the child classes. you input:
[Menu's X],[Menu's Y],[Width],[Height],[unselected border color],[selected border color],[fill color],[if it starts out visible], [the title Leave null for no Title],[title's x offset],[title's y offset]
<[Functions]>
void drawWindow(IDirect3DDevice9*); Draws the window
void hide(){this->visible=false;}; Hides the window (for choobs)
void show(){this->visible=true;}; Shows the window (for choobs)
void select(); Sets the selected window to this one
virtual void drawSubCode(){}; A virtual function (don't worry about it now)
virtual int GetWindowType(){return(0);} Returns the windows type. 0 for a basic window
virtual void eventCode(){}; Another virtual function (don't worry about it now)
hackWindow - eh your basic up and down hack type menu, hint make sure you look at my examples on how to use it.
<[Variables]>
As a child of Cawindow this also has all the variables of caWindow
caHack ** hackList; A pointer to an array where each element points to a caHack object
int hackCount; The number of hacks in the array pointed by hackList
int selector; Variable that gives the element of the currently selected hack
<[Constructor]>
hackWindow(int inX, int inY, int inW, int inH, D3DCOLOR inBor, D3DCOLOR inSelBor, D3DCOLOR inFill, bool inputVisible, LPCSTR inTitle, int inxOff, int inyOff, caHack * hackArray[], int arrayLen)
Creates a hack window. Input:
[From inX to inYOff see caWindow],[the pointer to an array of pointers to caHack objects],[The length of the previously mentioned array]
<[Functions]>
void drawSubCode()
Previously know as DrawHacks this function will draw the list of hacks in a vertical collum.
int GetWindowType(){return(1);} Defined in caWindow just returns 1 reffering to this window as a hack window
virtual void eventCode();
Virtual function once again don't worry about it.
infoWindow - another window type, just simplifies drawing text inside a window, good for credits and instructions to users
<[Variables]>
As a child of caWindow this also has all the variables from caWindow.
LPCSTR * text; An array of strings that will become the text in the window, each new element becomes a new line
int lineCount; The number of elements in the text array
<[Constructor]>
infoWindow(int inX, int inY, int inW, int inH, D3DCOLOR inBor, D3DCOLOR inSelBor, D3DCOLOR inFill, bool inputVisible, LPCSTR inTitle, int inxOff, int inyOff, LPCSTR inText[], int arrayLen)
Basically the same form as used in hackWindow. Input:
[inX to inYOff see caWindow],[the array of strings that are the lines used in the window],[the length of the previous array]
<[Functions]>
void drawSubCode() Previously DrawInfo basically draws the stored text.
int GetWindowType(){return(2);} Once again just returns 2
void eventCode(); Defined later don't worry about it
scrollWindow - basically the same as a hack window but can be made much smaller because this window adds scrolling capabilities.
<[Variables]>
All inhereted variables from hackWindow and caWindow here aswell
int scrollRange; The number of hacks to be displayed in the window at a time.
int scrollTop; Where the scroll range will start
<[Constructors]>
scrollWindow(int inX, int inY, int inW, int inH, D3DCOLOR inBor, D3DCOLOR inSelBor, D3DCOLOR inFill, bool inputVisible, LPCSTR inTitle, int inxOff, int inyOff, caHack * hackArray[], int arrayLen, int inScrollLen)
The same basic form as used in hackWindow. input:
[inX to arrayLen see hackWindow and caWindow],[the number of hacks that should be visible at one time in the scroll window]
<[Functions]>
void drawSubCode(int xOffSet, int yOffSet, int spacing, int settingXOffset)Once again here we have the specific draw function for the scrolling window, see drawSubCode in hack window for inputs.
void eventCode();Please ignore me I am defined later.
tabWindow - For those who want the Vip look and feel. Probably a little harder to work but it should still go fine. Change tabs with page up/down as well as clicking. Tabs will autodetect the length of the text
<[Variables]>
All inhereted variables from caWindow
int tabNum, cTab; The number of tabs inputted, and the element # of the current tab
caWindow * cTabPtr; The pointer to the current tab
caWindow ** tabList; The pointer to the array of tabs
<[Constructors]>
tabWindow(int inX, int inY, int inW, int inH, D3DCOLOR inBor, D3DCOLOR inSelBor, D3DCOLOR inFill, bool inputVisible, LPCSTR inTitle, int inxOff, int inyOff, int inTabNum, caWindow * inTabList[])
The same basic form as used in hackWindow. input:
[inX to arrayLen see hackWindow and caWindow],[The number of tabs you have],[The pointer to the array of tabs]
<[Functions]>
void drawSubCode(IDirect3DDevice9* pDevice)Once again here we have the specific draw function for the tab window, simply input the depive pointer
void eventCode();Please ignore me I am defined later.
windowStore - another neccessity (uhh did I spell that right?), should contain all the windows that you use. only leave them out if you know what you're doing.
<[Variables]>
caWindow ** windowList; A double pointer to an array of all different types of windows.
caWindow * selectedWin; A pointer to the currently selected window
int windowCount; The number of windows contained in windowlist
int selected; Ignore this
<[Constructors]>
windowStore(caWindow * inWinList[], int inWinCount)So simple right? Inuput:
[The array of pointers to windows],[the number of window pointers in the array]
<[Functions]>
No functions.
Sample Code
Let's make our first tab in the tab window.
Code:
LPCSTR intTypeArray[] ={"Type 1","type 2","type 3"};
caHack intType("integer type",0,3,intTypeArray);
caHack boolType("bool type",false);
caHack boolType2("bool type2",false);
caHack * list[] = {&intType,&boolType,&boolType2};
hackWindow hackTab1(0,0,400,400,RED,GREEN,BLACK,true,"Tab 1",0,30,list,3,10,10,11,125);
Then make a second tab.
Code:
caHack boolType3("bool type3",true);
caHack boolType4("bool type4",true);
caHack boolType5("bool type5",false);
caHack boolType6("bool type6",true);
caHack * list2[] = {&boolType3,&boolType4,&boolType5,&boolType6};
hackWindow hackTab2(0,0,400,400,RED,GREEN,BLACK,true,"Boolean hacks",0,30,list2,4,10,10,11,125);
And a third tab. But this one will be info.
Code:
LPCSTR infotxt[] = {"I am testing the","use of info wins","inside of tabs"};
infoWindow infoTab1(0,0,400,400,RED,GREEN,BLACK,true,"Info tab",0,0,infotxt,3,10,10,11);
Finally we put the windows in the order we want and make a tab window.
Code:
caWindow * tabz[] = {&hackTab1,&hackTab2,&infoTab1};
tabWindow tabWin(0,0,350,200,BLUE,ORANGE,BLACK,true,NULL,0,0,3,tabz);
Make another hack window.
Code:
caHack random("Test", false);
caHack test3("FILLER");
caHack * other[] = {&random,&test3};
hackWindow hackWin2(300,400,100,500,BLUE,ORANGE,BLACK,true,"hack window2",0,0,other,2,10,10,11,75);
Then another info window.
Code:
LPCSTR infotext[] = {"Wow","i'm","cool"};
infoWindow infoWin(600,400,100,500,BLUE,ORANGE,BLACK,true,"info window",0,0,infotext,3,10,10,11);
Finally lets put all of our windows into a window store object and we're done.
Code:
caWindow * winList[] = {&tabWin,&hackWin2,&infoWin};
windowStore winStore(winList,3);
This code is found in the my endscene function and actually draws the windows.
Code:
tabWin.drawWindow(pDevice);
tabWin.drawSubCode(pDevice);
infoWin.drawWindow(pDevice);
infoWin.drawSubCode();
hackWin2.drawWindow(pDevice);
hackWin2.drawSubCode();
Now we want to acutally make hacks, find the comment at the end of the main function
Code:
// ADD DEM HACKS HEAR! GO FOR MEGA IF STATEMENTS! Lots of em!
and menu items can be checked, like so. Here i'm using boolType which is a caHack object that we put into our first tab
Code:
if ( boolType.bToggle ){
PushToConsole( turn hack on );
}else{
PushToConsole( turn hack off );
}
VirusTotal 1 false positive/
Jotti