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/llpaneldebug.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 'linden/indra/newview/llpaneldebug.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldebug.cpp | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/linden/indra/newview/llpaneldebug.cpp b/linden/indra/newview/llpaneldebug.cpp new file mode 100644 index 0000000..1d2d670 --- /dev/null +++ b/linden/indra/newview/llpaneldebug.cpp | |||
@@ -0,0 +1,155 @@ | |||
1 | /** | ||
2 | * @file llpaneldebug.cpp | ||
3 | * @brief Debug preferences panel for preferences floater | ||
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 | // file include | ||
31 | #include "llpaneldebug.h" | ||
32 | |||
33 | // linden library includes | ||
34 | #include "llerror.h" | ||
35 | #include "llrect.h" | ||
36 | #include "llstring.h" | ||
37 | #include "llfontgl.h" | ||
38 | |||
39 | // project includes | ||
40 | #include "audioengine.h" | ||
41 | #include "llbutton.h" | ||
42 | #include "llcheckboxctrl.h" | ||
43 | #include "llcolorswatch.h" | ||
44 | #include "llcombobox.h" | ||
45 | #include "llresmgr.h" | ||
46 | #include "llsky.h" | ||
47 | #include "llslider.h" | ||
48 | #include "llsliderctrl.h" | ||
49 | #include "llspinctrl.h" | ||
50 | #include "lltextbox.h" | ||
51 | #include "llui.h" | ||
52 | #include "llvosky.h" | ||
53 | #include "message.h" | ||
54 | #include "llagent.h" | ||
55 | #include "llviewercontrol.h" | ||
56 | |||
57 | // | ||
58 | // Imported globals | ||
59 | // | ||
60 | |||
61 | |||
62 | // | ||
63 | // Globals | ||
64 | // | ||
65 | |||
66 | // | ||
67 | // Static functions | ||
68 | // | ||
69 | |||
70 | LLPanelDebug::LLPanelDebug(const std::string& name, const LLRect& rect) | ||
71 | : LLPanel(name, rect) | ||
72 | { | ||
73 | LLCheckboxCtrl* check = NULL; | ||
74 | LLSliderCtrl *sliderctrl = NULL; | ||
75 | |||
76 | const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF_SMALL ); | ||
77 | |||
78 | const S32 HPAD = 10; | ||
79 | const S32 VPAD = 4; | ||
80 | |||
81 | const S32 TOP_PAD = 10; | ||
82 | |||
83 | // alignment "rulers" for buttons | ||
84 | const S32 SEGMENT_WIDTH = 128; | ||
85 | const S32 LEFT = HPAD; | ||
86 | const S32 RULER1 = LEFT + SEGMENT_WIDTH + 30; | ||
87 | const S32 RULER2 = RULER1 + HPAD; | ||
88 | const S32 RIGHT = RULER2 + SEGMENT_WIDTH; | ||
89 | const S32 LABEL_OFFSET = 60; | ||
90 | |||
91 | S32 cur_y = rect.getHeight() - TOP_PAD; | ||
92 | |||
93 | sliderctrl = new LLSliderCtrl( | ||
94 | "Drop Shadow Floater", | ||
95 | LLRect( LEFT, cur_y, RIGHT, cur_y - SLIDERCTRL_HEIGHT ), | ||
96 | "Drop Shadow Floater", | ||
97 | font, | ||
98 | LABEL_OFFSET, | ||
99 | RULER2 + SPINCTRL_DEFAULT_LABEL_WIDTH + SPINCTRL_BTN_WIDTH, | ||
100 | TRUE, | ||
101 | TRUE, | ||
102 | NULL, NULL, | ||
103 | (F32)gSavedSettings.getS32("DropShadowFloater"), | ||
104 | 0.f, 10.f, 1.0f, | ||
105 | "DropShadowFloater"); | ||
106 | sliderctrl->setFollowsTop(); | ||
107 | sliderctrl->setFollowsLeft(); | ||
108 | addChild(sliderctrl); | ||
109 | cur_y -= VPAD + SLIDERCTRL_HEIGHT; | ||
110 | |||
111 | sliderctrl = new LLSliderCtrl( | ||
112 | "Drop Shadow Button", | ||
113 | LLRect( LEFT, cur_y, RIGHT, cur_y - SLIDERCTRL_HEIGHT ), | ||
114 | "Drop Shadow Button", | ||
115 | font, | ||
116 | LABEL_OFFSET, | ||
117 | RULER2 + SPINCTRL_DEFAULT_LABEL_WIDTH + SPINCTRL_BTN_WIDTH, | ||
118 | TRUE, | ||
119 | TRUE, | ||
120 | NULL, NULL, | ||
121 | (F32)gSavedSettings.getS32("DropShadowButton"), | ||
122 | 0.f, 10.f, 1.0f, | ||
123 | "DropShadowButton"); | ||
124 | sliderctrl->setFollowsTop(); | ||
125 | sliderctrl->setFollowsLeft(); | ||
126 | addChild(sliderctrl); | ||
127 | cur_y -= VPAD + SLIDERCTRL_HEIGHT; | ||
128 | |||
129 | check = new LLCheckboxCtrl("left click", | ||
130 | LLRect(LEFT, cur_y, RIGHT, cur_y - 20), | ||
131 | "Left Click Shows Menu Unless Interactive", | ||
132 | font, | ||
133 | NULL, NULL, | ||
134 | gSavedSettings.getBOOL("LeftClickShowMenu")); | ||
135 | check->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP); | ||
136 | addChild(check); | ||
137 | mLeftClickCheck = check; | ||
138 | cur_y -= VPAD+20; | ||
139 | } | ||
140 | |||
141 | |||
142 | LLPanelDebug::~LLPanelDebug() | ||
143 | { | ||
144 | // Children all cleaned up by default view destructor. | ||
145 | } | ||
146 | |||
147 | |||
148 | void LLPanelDebug::apply() | ||
149 | { | ||
150 | gSavedSettings.setBOOL("LeftClickShowMenu", mLeftClickCheck->get() ); | ||
151 | } | ||
152 | |||
153 | void LLPanelDebug::cancel() | ||
154 | { | ||
155 | } | ||