00001
00032 #include "llviewerprecompiledheaders.h"
00033
00034
00035 #include "llpaneldebug.h"
00036
00037
00038 #include "llerror.h"
00039 #include "llrect.h"
00040 #include "llstring.h"
00041 #include "llfontgl.h"
00042
00043
00044 #include "audioengine.h"
00045 #include "llbutton.h"
00046 #include "llcheckboxctrl.h"
00047 #include "llcolorswatch.h"
00048 #include "llcombobox.h"
00049 #include "llresmgr.h"
00050 #include "llsky.h"
00051 #include "llslider.h"
00052 #include "llsliderctrl.h"
00053 #include "llspinctrl.h"
00054 #include "lltextbox.h"
00055 #include "llui.h"
00056 #include "llvosky.h"
00057 #include "message.h"
00058 #include "llagent.h"
00059 #include "llviewercontrol.h"
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 LLPanelDebug::LLPanelDebug(const std::string& name, const LLRect& rect)
00075 : LLPanel(name, rect)
00076 {
00077 LLCheckboxCtrl* check = NULL;
00078 LLSliderCtrl *sliderctrl = NULL;
00079
00080 const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF_SMALL );
00081
00082 const S32 HPAD = 10;
00083 const S32 VPAD = 4;
00084
00085 const S32 TOP_PAD = 10;
00086
00087
00088 const S32 SEGMENT_WIDTH = 128;
00089 const S32 LEFT = HPAD;
00090 const S32 RULER1 = LEFT + SEGMENT_WIDTH + 30;
00091 const S32 RULER2 = RULER1 + HPAD;
00092 const S32 RIGHT = RULER2 + SEGMENT_WIDTH;
00093 const S32 LABEL_OFFSET = 60;
00094
00095 S32 cur_y = rect.getHeight() - TOP_PAD;
00096
00097 sliderctrl = new LLSliderCtrl(
00098 "Drop Shadow Floater",
00099 LLRect( LEFT, cur_y, RIGHT, cur_y - SLIDERCTRL_HEIGHT ),
00100 "Drop Shadow Floater",
00101 font,
00102 LABEL_OFFSET,
00103 RULER2 + SPINCTRL_DEFAULT_LABEL_WIDTH + SPINCTRL_BTN_WIDTH,
00104 TRUE,
00105 TRUE,
00106 FALSE,
00107 NULL, NULL,
00108 (F32)gSavedSettings.getS32("DropShadowFloater"),
00109 0.f, 10.f, 1.0f,
00110 "DropShadowFloater");
00111 sliderctrl->setFollowsTop();
00112 sliderctrl->setFollowsLeft();
00113 addChild(sliderctrl);
00114 cur_y -= VPAD + SLIDERCTRL_HEIGHT;
00115
00116 sliderctrl = new LLSliderCtrl(
00117 "Drop Shadow Button",
00118 LLRect( LEFT, cur_y, RIGHT, cur_y - SLIDERCTRL_HEIGHT ),
00119 "Drop Shadow Button",
00120 font,
00121 LABEL_OFFSET,
00122 RULER2 + SPINCTRL_DEFAULT_LABEL_WIDTH + SPINCTRL_BTN_WIDTH,
00123 TRUE,
00124 TRUE,
00125 FALSE,
00126 NULL, NULL,
00127 (F32)gSavedSettings.getS32("DropShadowButton"),
00128 0.f, 10.f, 1.0f,
00129 "DropShadowButton");
00130 sliderctrl->setFollowsTop();
00131 sliderctrl->setFollowsLeft();
00132 addChild(sliderctrl);
00133 cur_y -= VPAD + SLIDERCTRL_HEIGHT;
00134
00135 check = new LLCheckboxCtrl("left click",
00136 LLRect(LEFT, cur_y, RIGHT, cur_y - 20),
00137 "Left Click Shows Menu Unless Interactive",
00138 font,
00139 NULL, NULL,
00140 gSavedSettings.getBOOL("LeftClickShowMenu"));
00141 check->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP);
00142 addChild(check);
00143 mLeftClickCheck = check;
00144 cur_y -= VPAD+20;
00145 }
00146
00147
00148 LLPanelDebug::~LLPanelDebug()
00149 {
00150
00151 }
00152
00153
00154 void LLPanelDebug::apply()
00155 {
00156 gSavedSettings.setBOOL("LeftClickShowMenu", mLeftClickCheck->get() );
00157 }
00158
00159 void LLPanelDebug::cancel()
00160 {
00161 }