diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llcompass.cpp | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llcompass.cpp | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/linden/indra/newview/llcompass.cpp b/linden/indra/newview/llcompass.cpp new file mode 100644 index 0000000..b3847d6 --- /dev/null +++ b/linden/indra/newview/llcompass.cpp | |||
@@ -0,0 +1,108 @@ | |||
1 | /** | ||
2 | * @file llcompass.cpp | ||
3 | * @brief A little map of the world with network information | ||
4 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #include "llviewerprecompiledheaders.h" | ||
29 | |||
30 | #include "linked_lists.h" | ||
31 | #include "llmath.h" // clampf() | ||
32 | #include "llmath.h" | ||
33 | #include "llgl.h" | ||
34 | |||
35 | #include "llui.h" | ||
36 | |||
37 | #include "llcircuit.h" | ||
38 | #include "message.h" | ||
39 | #include "llagent.h" | ||
40 | #include "llcompass.h" | ||
41 | |||
42 | #include "viewer.h" | ||
43 | #include "llviewerimage.h" | ||
44 | #include "llviewerimagelist.h" | ||
45 | #include "llviewercontrol.h" | ||
46 | #include "llviewercamera.h" | ||
47 | |||
48 | //#include "llglheaders.h" | ||
49 | |||
50 | // | ||
51 | // Imported globals | ||
52 | // | ||
53 | extern LLMessageSystem* gMessageSystem; | ||
54 | |||
55 | // | ||
56 | // Constants | ||
57 | // | ||
58 | |||
59 | ///---------------------------------------------------------------------------- | ||
60 | /// LLCompass | ||
61 | ///---------------------------------------------------------------------------- | ||
62 | |||
63 | LLCompass::LLCompass( const std::string& name, const LLRect& rect) | ||
64 | : LLView(name, rect, FALSE) | ||
65 | { | ||
66 | mTexture = NULL; | ||
67 | mBkgndTexture = NULL; | ||
68 | |||
69 | BOOL state = gSavedSettings.getBOOL( "ShowCompass" ); | ||
70 | |||
71 | setVisible( state ); | ||
72 | } | ||
73 | |||
74 | void LLCompass::setTexture(LLUUID image_id) | ||
75 | { | ||
76 | mTexture = gImageList.getImage(image_id, FALSE, TRUE); | ||
77 | } | ||
78 | |||
79 | void LLCompass::setBkgndTexture(LLUUID image_id) | ||
80 | { | ||
81 | mBkgndTexture = gImageList.getImage(image_id, FALSE, TRUE); | ||
82 | } | ||
83 | |||
84 | // | ||
85 | // Functions | ||
86 | // | ||
87 | |||
88 | ///---------------------------------------------------------------------------- | ||
89 | /// LLHorizontalCompass | ||
90 | ///---------------------------------------------------------------------------- | ||
91 | |||
92 | LLHorizontalCompass::LLHorizontalCompass( const std::string& name, const LLRect& rect, | ||
93 | const LLColor4& focus_color, | ||
94 | const LLUUID& image_id ) : | ||
95 | LLView( name, rect, TRUE ), | ||
96 | mFocusColor( focus_color ), | ||
97 | mTexture( NULL ) | ||
98 | { | ||
99 | setTexture( image_id ); | ||
100 | |||
101 | BOOL state = gSavedSettings.getBOOL( "ShowCompass" ); | ||
102 | setVisible( state ); | ||
103 | } | ||
104 | |||
105 | void LLHorizontalCompass::setTexture( const LLUUID& image_id ) | ||
106 | { | ||
107 | mTexture = gImageList.getImage(image_id, FALSE, TRUE); | ||
108 | } | ||