Vip_SolidSnake Admin
Posts : 61 Reputation : 26 Join date : 2010-02-04
| Subject: D3D Codings InGameMenu Fri 5 Feb 2010 - 21:08 | |
| Add Code in specified Files or Functions!!!File: d3d8dev.cppat Top: - Code:
-
#include "cLTFX.h" ( PRERESET ) - Code:
-
ltfx.PreReset( ); ( POSTRESET ) - Code:
-
ltfx.PostReset( "Arial", 8, pDevice );
( ENDSCENE OR PRESENT ) - Code:
-
ltfx.CheckNav( VK_INSERT ); ltfx.DrawMenu( 20, 20, D3DCOLOR_ARGB( 255, 255, 0, 0 ), D3DCOLOR_ARGB( 255, 255, 255, 255 ), D3DCOLOR_ARGB( 255, 255, 255, 255 ), pDevice );
( BEGINSCENE ) - Code:
-
if( exec1 ) { //init the font ltfx.InitalizeFont( "Arial", 8, pDev ); //use the pointer from a global float val! ltfx.AddMenuItem( "Wallhack", &cvar.wallhack, 0, 2 ); ltfx.AddMenuItem( "Wireframe", &cvar.wireframe, 0, 1 ); ltfx.AddMenuItem( "Zoom", &cvar.zoom, 0, 1 ); ltfx.AddMenuItem( "Stamina", &cvar.stamina, 0, 1 ); exec1 = false; } How To Use: ( Global ) - Code:
-
struct cVars { float wireframe, wallhack, zoom, stamina; }; cVars cvar;
bool exec1 = true;
cMenu ltfx( 5 ); //5 is max menu items //you can extend this so long as its ABOVE the number //of menu items you have currently How To Use: ( DrawIndexedPrimitive ) - Code:
-
if( cvar.wallhack == 1.0f ) { // for set 1 //hack }
if( cvar.wallhack == 2.0f ) { // for set 1 //hack }
if( cvar.wireframe == 1.0f ) { // for set 1 //hack }
if( cvar.zoom == 1.0f ) { // for set 1 //hack }
if( cvar.stamina == 1.0f ) { // for set 1 //hack } DOWNLOAD LINKVisual C++ - [You must be registered and logged in to see this link.]D3D StarterKit - [You must be registered and logged in to see this link.]DirectX SDK - [You must be registered and logged in to see this link.]Color Coding - [You must be registered and logged in to see this link.]d3dfont.cpp - [You must be registered and logged in to see this link.]d3dfont.h - [You must be registered and logged in to see this link.]stdafx.cpp - [You must be registered and logged in to see this link.]stdafx.h - [You must be registered and logged in to see this link.]cLTFX.cpp - [You must be registered and logged in to see this link.]cLTFX.h- [You must be registered and logged in to see this link.][You must be registered and logged in to see this image.] | |
|