Giriş yap
En iyi yollayıcılar
Hello EMO | ||||
EMO | ||||
eMoStyLe | ||||
BesimBICER | ||||
GameKinG | ||||
Crysis | ||||
~>!.DεvιLρяιεsт.!<~ | ||||
MeTaL | ||||
TrueCrime | ||||
djhayal3t |
Istatistikler
Toplam 203 kayıtlı kullanıcımız varSon kaydolan kullanıcımız: crayzboy76
Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Arama
Sosyal yer imi
Sosyal bookmarking sitesinde Emo, Emo nedir, Emo resimleri, Emo Kıyafetleri, Emo Sözleri, Emo Oyunları, EmoTurkey, Emo Nickler, Emo Avatarları, Punk, Punk Resimleri, Punk Avatarları, Rock, Rock Resimleri, Rock Avatarları, Msn Nickleri, Msn Avatarları, Müzik adresi saklayın ve paylaşın
Sosyal bookmarking sitesinde EMO Style ForumPro - Hos Geldiniz adresi saklayın ve paylaşın
Kimler hatta?
Toplam 9 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 9 Misafir Yok
Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
Reklam
[Coding] - Another D3D menu example
1 sayfadaki 1 sayfası
[Coding] - Another D3D menu example
The basic "method" for this menu came from my second attempt at making a menu, I was pokin around and seen this source and thought I would clean it up a bit and post it.
Intro/Info and global vars:
Read here
Now on with the menu class:
Continuing with the functions:
I wouldn't forget to show you how its used
//Example usage
cMenu CMenu;
RESULT:
(the gray background is from a test app)
If you use it I would appreciate thanking me
Intro/Info and global vars:
Read here
- Kod:
////////////////////////////////////////////////
/*
PAY ATTENTION
Drawing functions:
void FillRectD3D(int x, int y, int iWidth, int iHeight, DWORD dwColor);
void DrawBox(int StartX, int StartY, int Width, int Height, DWORD dwColor);
void DrawTextD3D(int x, int y, DWORD dwColor, char* szText, DWORD format, bool bEspFont = false);
For your coding pleasure you will have to find your own way to draw d3d, however drawbox is just 4 fillrect's in a box shape.
Comments have been added accordingly, and dont hate on the codes :)
*/
///////////////////////////////////////////////
//Global variables
bool showMenu = false;
int iEntries = 0;
int MenuRectH = 0;
int MenuRectW = 120;
/*
You could do something like
#define iNameTags MenuVal[1]
*/
int MenuVal[100];
int MenuColor[100];
int MenuMin[100];
int MenuMax[100];
int MenuInc[100];
Now on with the menu class:
- Kod:
class cMenu
{
public:
void DrawBack(int x, int y, int width, int height, bool bordered, DWORD dwBackCol, DWORD dwBorderCol);
void Drawtitle(char * Title, DWORD dwtitleCol);
void AddMember(int x, int y, char * Name, int MinVal, int MaxVal, int Increment);
void CheckKeys();
int MenuXPos;
int MenuYPos;
private:
int MenuX, MenuY;
int MenuW, MenuH;
int MenuSelected;
void AssignColors();
void End();
};
Continuing with the functions:
- Kod:
void cMenu::DrawBack(int x, int y, int width, int height, bool bordered, DWORD dwBackCol, DWORD dwBorderCol)
{
MenuX = x;
MenuY = y;
MenuW = width;
MenuH = height;
Renderer.FillRectD3D(x, y, width, height, dwBackCol);
if(bordered == true)
Renderer.DrawBox(x, y, width, height, dwBorderCol);
}
//This will draw a title in the correct place without much hassle :>
void cMenu::Drawtitle(char * Title, DWORD dwtitleCol)
{
Renderer.DrawTextD3D(MenuX + (MenuW / 2), MenuY + 2, dwtitleCol, Title, DT_CENTER, 0);
}
//There's a lot going on past this point, i know
void cMenu::AddMember(int x, int y, char * Name, int MinVal, int MaxVal, int Increment)
{
iEntries++;
//X and Y are offsets from the menu origin
x = MenuX + x;
y = MenuY + y;
//Store this entry's parameters in an array
MenuMin[iEntries] = MinVal;
MenuMax[iEntries] = MaxVal;
MenuInc[iEntries] = Increment;
//MenuVal[iEntries] stores, well, this entry's value
char cVal[5];
sprintf(cVal, "%i", MenuVal[iEntries]);
//Box that goes around the menu val
Renderer.DrawBox(x - 4, y - 1, 16, 14, MenuColor[iEntries]);
//Draw the menu value
Renderer.DrawTextD3D(x + 4, y, MenuColor[iEntries], cVal, DT_CENTER, 0);
//Draw the entry name
Renderer.DrawTextD3D(x + 20, y - 1, MenuColor[iEntries], Name, 0, 0);
}
//As you can see here, move the menu selection and variables with the arrow keys
void cMenu::CheckKeys()
{
if(GetAsyncKeyState(VK_UP)&1)
if(MenuSelected > 1)
MenuSelected--;
if(GetAsyncKeyState(VK_DOWN)&1)
if(MenuSelected < iEntries)
MenuSelected++;
if(GetAsyncKeyState(VK_RIGHT)&1)
{
if(MenuVal[MenuSelected] < MenuMax[MenuSelected])
MenuVal[MenuSelected] += MenuInc[MenuSelected];
if(MenuVal[MenuSelected] > MenuMax[MenuSelected])
MenuVal[MenuSelected] = MenuMax[MenuSelected];
}
if(GetAsyncKeyState(VK_LEFT)&1)
{
if(MenuVal[MenuSelected] > 0)
MenuVal[MenuSelected] -= MenuInc[MenuSelected];
if(MenuVal[MenuSelected] < 0)
MenuVal[MenuSelected] = 0;
}
if(MenuSelected < 1)
MenuSelected = 1;
//Keep the code sort-of organized
cMenu::AssignColors();
cMenu::End();
}
//Loop through all the menu entries and color them accordingly
void cMenu::AssignColors()
{
for(int mc = 0; mc < (iEntries + 1); mc++)
{
if(MenuSelected == mc)
MenuColor[mc] = 0xFF00FF00;
else
MenuColor[mc] = 0xFFFF0000;
}
}
//Set the height for the menu background and reset the entry number for the next frame
void cMenu::End()
{
MenuRectH = iEntries * 25;
iEntries = 0;
}
I wouldn't forget to show you how its used
//Example usage
cMenu CMenu;
- Kod:
void DoMenu()
{
if(GetAsyncKeyState(VK_DELETE)&1) showMenu = !showMenu;
if(showMenu == true)
{
CMenu.DrawBack(50, 200, 160, MenuRectH, true, D3DCOLOR_ARGB(220, 50, 50, 50), 0xFFFF0000);
CMenu.AddMember(25, 20, "ESP Name", 0, 1, 1);
CMenu.AddMember(25, 35, "ESP Health", 0, 1, 1);
CMenu.AddMember(25, 50, "Chams", 0, 1, 1);
CMenu.AddMember(25, 65, "Uc-Forum", 0, 1, 1);
CMenu.CheckKeys();
}
}
RESULT:
(the gray background is from a test app)
If you use it I would appreciate thanking me
Similar topics
» [Coding] Menu 3d
» [C++] Aimbot Coding
» Coding a SSDT RootKit
» [Source] Tabbed Menu
» Button Menu D3D9
» [C++] Aimbot Coding
» Coding a SSDT RootKit
» [Source] Tabbed Menu
» Button Menu D3D9
1 sayfadaki 1 sayfası
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz
Cuma Ağus. 29, 2014 8:33 am tarafından Hello EMO
» goldenchase.net maden yaparak para kazanma
Cuma Ağus. 29, 2014 8:18 am tarafından Hello EMO
» etichal hacker görsel egitim seti
Çarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO
» KO TBL Source C#
Ptsi Ara. 09, 2013 6:36 am tarafından Hello EMO
» x86 Registers
C.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de WYD
Çarş. Tem. 10, 2013 7:25 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de CS Metodo²
Çarş. Tem. 10, 2013 7:23 am tarafından Hello EMO
» [Tutorial] Aprendendo basico deASM OLLYDBG
Çarş. Tem. 10, 2013 7:22 am tarafından Hello EMO
» Basic C# DLL injector
Ptsi Tem. 08, 2013 7:48 am tarafından Hello EMO