llcompass.cpp

Go to the documentation of this file.
00001 
00032 #include "llviewerprecompiledheaders.h"
00033 
00034 #include "llmath.h"             // clampf()
00035 #include "llmath.h"
00036 #include "llgl.h"
00037 
00038 #include "llui.h"
00039 
00040 #include "llcircuit.h"
00041 #include "message.h"
00042 #include "llagent.h"
00043 #include "llcompass.h"
00044 
00045 #include "llviewerimage.h"
00046 #include "llviewerimagelist.h"
00047 #include "llviewercontrol.h"
00048 #include "llviewercamera.h"
00049 
00050 //#include "llglheaders.h"
00051 
00052 //
00053 // Imported globals
00054 //
00055 extern LLMessageSystem* gMessageSystem;
00056 
00057 //
00058 // Constants
00059 //
00060 
00064 
00065 LLCompass::LLCompass( const std::string& name, const LLRect& rect)
00066                 :       LLView(name, rect, FALSE)
00067 {
00068         mTexture = NULL;
00069         mBkgndTexture = NULL;
00070 
00071         BOOL state = gSavedSettings.getBOOL( "ShowCompass" );
00072 
00073         setVisible( state );
00074 }
00075 
00076 void LLCompass::setTexture(LLUUID image_id)
00077 {
00078         mTexture = gImageList.getImage(image_id, FALSE, TRUE);
00079 }
00080 
00081 void LLCompass::setBkgndTexture(LLUUID image_id)
00082 {
00083         mBkgndTexture = gImageList.getImage(image_id, FALSE, TRUE);
00084 }
00085 
00086 //
00087 // Functions
00088 //
00089 
00093 
00094 LLHorizontalCompass::LLHorizontalCompass( const std::string& name, const LLRect& rect,
00095                                                                                   const LLColor4& focus_color,
00096                                                                                   const LLUUID& image_id ) :
00097         LLView( name, rect, TRUE ),
00098         mFocusColor( focus_color ),
00099         mTexture( NULL )
00100 {
00101         setTexture( image_id );
00102 
00103         BOOL state = gSavedSettings.getBOOL( "ShowCompass" );
00104         setVisible( state );
00105 }
00106 
00107 void LLHorizontalCompass::setTexture( const LLUUID& image_id )
00108 {
00109         mTexture = gImageList.getImage(image_id, FALSE, TRUE);
00110 }

Generated on Fri May 16 08:33:16 2008 for SecondLife by  doxygen 1.5.5