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 5 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 5 Misafir :: 1 Arama motorları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
[Source] - Button Menu D3D9
1 sayfadaki 1 sayfası
[Source] - Button Menu D3D9
Credits Stevepwns
I started with micros button struct and made this,
It can be a little laggy when you draw to many (more than 10 or 15) but it works pretty good and is easy to use.
I figured I'd share it and hope some can learn from it, its seems to be a good start.
use what ever text and rect render method your familiar with. I left mime for example code.
Credits to Micro and Me if you use this please
Enjoy:
//In Declerations::
//create your button
//In Initialize::
//call as such
//Function your calling
//In End Scene::
//Call as such
//Function your calling
I started with micros button struct and made this,
It can be a little laggy when you draw to many (more than 10 or 15) but it works pretty good and is easy to use.
I figured I'd share it and hope some can learn from it, its seems to be a good start.
use what ever text and rect render method your familiar with. I left mime for example code.
Credits to Micro and Me if you use this please
Enjoy:
//In Declerations::
//create your button
- Kod:
struct Buttons
{
int num;
char *caption;
int x;
int y;
int w;
int h;
bool clicked;
bool mOver;
}; Buttons Button[20];
//In Initialize::
//call as such
- Kod:
initbtn( 1, "option", 25, 100, 125, 20);
//Function your calling
- Kod:
void initbtn(int bnum, char *bcaption, int bx, int by, int bw, int bh )
{
Button[bnum].num = bnum;
Button[bnum].caption = bcaption;
Button[bnum].x = bx;
Button[bnum].y = by;
Button[bnum].w = bw;
Button[bnum].h = bh;
Button[bnum].clicked = false;
}
//In End Scene::
//Call as such
- Kod:
RenderButton( m_pD3Ddev, 1); //or create array to draw multiple buttons
//Function your calling
- Kod:
void RenderButton( IDirect3DDevice9 *pD3Ddev, int butnum )
{
int mw = Button[butnum].x + Button[butnum].w;
int mh = Button[butnum].y + Button[butnum].h;
//Defualt apperance
drawguibox( Button[butnum].x, Button[butnum].y, Button[butnum].w, Button[butnum].h, 0, 0, 0, 255, 0, 0, 255, 100 );
DrawText( Button[butnum].x + 15, Button[butnum].y + 3, Button[butnum].caption, 0, 0, 0);
POINT cur;
GetCursorPos( &cur );
//if the mouse coords are
//the same as the buttons coords
if ( cur.x >= Button[butnum].x && cur.x <= mw && cur.y >= Button[butnum].y && cur.y <= mh )
{
//draw with higher opacity
drawguibox( Button[butnum].x, Button[butnum].y, Button[butnum].w, Button[butnum].h, 255, 255, 255, 125, 0, 0, 255, 125 );
DrawText( Button[butnum].x + 15, Button[butnum].y + 3, Button[butnum].caption, 255, 0, 0);
//if mouse button is clicked
if ( GetAsyncKeyState( VK_LBUTTON ) &1 )
{
//then the button has been clicked
Button[butnum].clicked = !Button[butnum].clicked;
}
}
if ( Button[butnum].clicked )
{
//the buttton has been clicked and the text
//color changes to show its been clicked
DrawText( Button[butnum].x + 15, Button[butnum].y + 3, Button[butnum].caption, 0, 255, 0);
}
Similar topics
» Button Menu D3D9
» D3D9 Model Recognition Logger
» [Source] Tabbed Menu
» [Coding] - Another D3D menu example
» [Source] Great D3D Crosshair source
» D3D9 Model Recognition Logger
» [Source] Tabbed Menu
» [Coding] - Another D3D menu example
» [Source] Great D3D Crosshair source
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