Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

tip.cpp

Go to the documentation of this file.
00001 /* *************************************************************************************
00002         Writer:         Sebastien Bloc
00003         Copyright:      2003-2004
00004         eMail:          sebastien.bloc@free.fr
00005         URL:            http://mignonsoft.free.fr
00006 
00007         This program is free software; you can redistribute it and/or
00008         modify it under the terms of the GNU General Public License
00009         as published by the Free Software Foundation; either version 2
00010         of the License, or (at your option) any later version.
00011 
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU General Public License for more details.
00016         http://www.gnu.org/copyleft/gpl.html
00017 ************************************************************************************* */
00018 
00019 #include "3d.h"
00020 #include "input.h"
00021 #include "controlEngine.h"
00022 #include "tip.h"
00023 
00024 extern ControlEngine ce;
00025 
00026 Tip::Tip()      
00027 {
00028         // init variable
00029         name="Tip";
00030         text.Setup(ce.fontTexture,ft_texture);
00031         text.SetAlign(align_center,align_center);
00032         text.SetWrapping(FALSE,TRUE,TRUE);
00033         text.material.SetDS(1,1,1,1);
00034 }
00035 
00036 Tip::~Tip()
00037 {
00038 }
00039 
00040 // ********************************************************************************
00041 
00042 void Tip::Create()
00043 {
00044         SetParent();
00045 
00046         // init general
00047         faceNode = ce.primitive.AddFace(name,id,-1,TRUE); 
00048         Face *face = faceNode->elem;
00049         face->text=&text; // attache le text
00050         face->material.SetDS(1,1,0,0.3f);
00051         face->blending=TRUE;
00052 }
00053 
00054 // ********************************************************************************
00055 
00056 void Tip::operator=(char *newCaption)
00057 {
00058         text.SetText(newCaption);
00059 }
00060 
00061 void Tip::SetText(char *newCaption)
00062 {
00063         text.SetText(newCaption);
00064 }
00065 
00066 // ********************************************************************************
00067 
00068 void Tip::ToString(MyString &str)
00069 {
00070         str.AddFormat("name: %s",name);
00071 }
00072 
00073 // ********************************************************************************
00074 // ********************************************************************************
00075 // ********************************************************************************
00076 // ********************************************************************************
00077 // ********************************************************************************
00078 // ********************************************************************************

Generated on Fri Aug 20 19:19:50 2004 for 3d Controls by doxygen 1.3.6