ZicmA Planet
http://zicma.rc-part.com/neobbs/

ZPGUI Tutorial - RealInfSystem - How to?
http://zicma.rc-part.com/neobbs/viewtopic.php?f=4&t=30
Page 1 of 1

Author:  ZicmA [ Fri Feb 04, 2011 6:25 pm ]
Post subject:  ZPGUI Tutorial - RealInfSystem - How to?

Note !! ** Some method in RealInfSystem locked because can't implement to global use.

What 's RealInfSystem?. Look in image.
Image

You can add message or digit texture and can fix paramiters for show and hide include range and growth rate.too

Step 1 : Define ZPGUI Object.

Code:
   static ZPGuiSystem      * pclsDamageInfo = 0; // Can use pointer.


Step 2 : Initial GUI. ** You can set font and size by create your font system.
Code:
   pclsDamageInfo = new ZPGuiSystem();
   pclsDamageInfo->Initial();
   //Create Font. - Default font = Verdana 10.
   pclsDamageInfo->CreateSystemFontEx("Book Antiqua","_24B",24,true,false,false);
   //Set Font.
   pclsDamageInfo->SetFont("Book Antiqua","_24B",-1);

   pclsDamageInfo->SetRealInfScale(100); // This's fix Scale % for Digit Texture


Step 3 : Render GUI. ** Not require DoDlgLoop() and UpdateDlg() and RenderGUI();
Code:
   pclsDamageInfo->RenderRealInf(false);


Step 4 : If you use Pointer Object don't forgot delete pointer.
Code:
   delete pclsDamageInfo;
   pclsDamageInfo = NULL;


RealInfSystem Event :

for Font - ZP_FONTSTRING + Not Project 3D Point to 2D.

Code:
   pclsDamageInfo->AddInfomation(cTV_3DVECTOR(pclsMessageBox.clsGUI.GetDlgRect().fPx1,pclsMessageBox.clsGUI.GetDlgRect().fPy1,0)
         ,10,50,1000,true,1.2f,RGBA(1.0f,1.0f,1.0f,1.0f),"Inventory full !!",ZP_FONTSTRING,false);


for Digit Texture + Project 3D Point to 2D.

Code:
   pclsDamageInfo->AddInfomation(v3ActorPos  + cTV_3DVECTOR(0.0f,45.0f,0.0f),50,50,1800,true,1.5f,ZP_DIGITCOLOR_000000,lRealDamage);      

Page 1 of 1 All times are UTC + 7 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/