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