D:/Zythum/DinoKod/Mod_Aeternis_Client/A_WinContact.cpp

00001 //---------------------------------------------------------------------------------------------
00002 //      This file is a part of "DinoKod".
00003 //      Copyright © 2003 Dino Productions. All Rights Reserved.
00004 //      
00005 //      File                    : A_WinContact.cpp
00006 //      Author                  : Sebastien LEIX        sebastien.leix@wanadoo.fr
00007 //      Date                    : 02/06/2003
00008 //      Modification    :
00009 //
00010 //---------------------------------------------------------------------------------------------
00011 #include "Common/Time.h"
00012 #include "Common/LocalizedString.h"
00013 #include "Render/Render.h"
00014 #include "Render/Font.h"
00015 #include "Interface/Text.h"
00016 
00017 #include "Mod_Aeternis_Client/A_Interface.h"
00018 
00019 #include "Mod_Aeternis_Client/A_WinContact.h"
00020 
00021 #define GUIDIR( __gui ) KStr( "GUI/%s/%s", GETLANGUAGEPREFIX(), __gui )
00022 #define BUTTONCONTACT   GUIDIR("Return")
00023 #define BUTTONCONTACTHL GUIDIR("Return_HL")
00024 #define BUTTONCONTACTC  GUIDIR("Return_C")
00025 
00026 //------------------------------------------------------------------------------------------
00027 //------------------------------------------------------------------------------------------
00028 //------------------------------------------------------------------------------------------
00029 KAWinContact::KAWinContact( KWin* pFather, KFPt& Pos, KFPt& Size, KInterface* pInterface )
00030 : KWin( pFather, Pos, Size, pInterface )
00031 {
00032         m_hBackGround = KSHADER_NO;
00033 
00034         KFPt    ButtonSize = KFPt( 0.25f, 0.04f );
00035         // Button Back
00036         m_pButtonBack = new KButton( this, KFPt( 0.05f, 0.9f ), ButtonSize, m_pInterface );
00037 
00038         new KText(this, KFPt( 0.1f, 0.04f ), ButtonSize, m_pInterface,"www.aeternis.com") ;
00039         new KText(this, KFPt( 0.6f, 0.05f ), ButtonSize, m_pInterface,"Powered by Zythum Project\nwww.zythum-project.com\ndino@zythum-project.com") ;
00040 
00041         new KText(this, KFPt( 0.05f, 0.21f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L1)) ;
00042         new KText(this, KFPt( 0.05f, 0.24f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L2)) ;
00043         new KText(this, KFPt( 0.05f, 0.27f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L3)) ;
00044         new KText(this, KFPt( 0.05f, 0.30f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L4)) ;
00045 
00046         new KText(this, KFPt( 0.05f, 0.4f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L5)) ;
00047         new KText(this, KFPt( 0.05f, 0.43f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L6)) ;
00048 
00049         new KText(this, KFPt( 0.05f, 0.53f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L7)) ;
00050         new KText(this, KFPt( 0.05f, 0.56f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L8)) ;
00051 
00052         new KText(this, KFPt( 0.05f, 0.66f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L9)) ;
00053 
00054         new KText(this, KFPt( 0.6f, 0.8f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L10)) ;
00055         new KText(this, KFPt( 0.6f, 0.83f ), ButtonSize, m_pInterface,(char*)GETLOCALSTRING(LS_CONTACT_L11)) ;
00056 
00057 }
00058 
00059 //------------------------------------------------------------------------------------------
00060 KAWinContact::~KAWinContact()
00061 {
00062 }
00063 
00064 //------------------------------------------------------------------------------------------
00065 void KAWinContact::Display()
00066 {
00067         u8              FadeAlpha = (u8)(255.0f * GetFade());
00068 
00069         m_pInterface->ShowMouse();
00070 
00071         DrawQuad( 0.0f, 0.0f, 1.0f, 1.0f, m_hBackGround, KRGBA( 255, 255, 255, FadeAlpha ) );
00072 }
00073 
00074 //------------------------------------------------------------------------------------------
00075 void KAWinContact::Manage()
00076 {
00077         if( m_pButtonBack->IsClicked() )
00078         {
00079                 m_pButtonBack->Reset();
00080                 ((KAInterface*)m_pInterface)->SetWin( KAIW_START );
00081         }
00082 }
00083 
00084 //------------------------------------------------------------------------------------------
00085 void KAWinContact::Load()
00086 {
00087         KWin::Load();
00088 
00089         m_hBackGround = m_pRender->GetpShaderBank()->LoadShader( GUIDIR("Contact") );
00090         m_pButtonBack->SetShaders( BUTTONCONTACT, BUTTONCONTACTHL, BUTTONCONTACTC );
00091 }
00092 
00093 //------------------------------------------------------------------------------------------
00094 void KAWinContact::Unload()
00095 {
00096         KWin::Unload();
00097 
00098         m_pRender->GetpShaderBank()->UnloadShader( m_hBackGround );
00099 }

Generated on Sun Mar 25 20:02:14 2007 for Zythum Project by  doxygen 1.5.1-p1