00001
00032 #include "llviewerprecompiledheaders.h"
00033
00034 #include "llpanelLCD.h"
00035
00036
00037 #include "llerror.h"
00038 #include "llrect.h"
00039 #include "llfontgl.h"
00040 #include "message.h"
00041 #include "llvieweruictrlfactory.h"
00042
00043
00044 #include "llviewerwindow.h"
00045 #include "llcheckboxctrl.h"
00046 #include "llradiogroup.h"
00047 #include "llresmgr.h"
00048 #include "lltextbox.h"
00049 #include "llui.h"
00050 #include "viewer.h"
00051
00052
00053 #include "llagent.h"
00054
00055
00056
00057 #ifndef LL_LCD_H
00058 #include "lllcd.h"
00059 #endif
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 LLPanelLCD::LLPanelLCD()
00072 {
00073 gUICtrlFactory->buildPanel(this, "panel_preferences_lcd.xml");
00074 }
00075
00076 BOOL LLPanelLCD::postBuild()
00077 {
00078 requires("LCDDestination", WIDGET_TYPE_RADIO_GROUP);
00079 requires("DisplayLinden", WIDGET_TYPE_CHECKBOX);
00080 requires("DisplayDebug", WIDGET_TYPE_CHECKBOX);
00081 requires("DisplayDebugConsole", WIDGET_TYPE_CHECKBOX);
00082 requires("DisplayRegion", WIDGET_TYPE_CHECKBOX);
00083 requires("DisplayChat", WIDGET_TYPE_CHECKBOX);
00084 requires("DisplayIM", WIDGET_TYPE_CHECKBOX);
00085
00086 if (!checkRequirements())
00087 {
00088 return FALSE;
00089 }
00090
00091 refresh();
00092
00093 return TRUE;
00094 }
00095
00096
00097 LLPanelLCD::~LLPanelLCD()
00098 {
00099
00100 }
00101
00102 void LLPanelLCD::refresh()
00103 {
00104 mLCDDestination = gSavedSettings.getS32("LCDDestination");
00105 mDisplayChat = gSavedSettings.getBOOL("DisplayChat");
00106 mDisplayIM = gSavedSettings.getBOOL("DisplayIM");
00107 mDisplayRegion = gSavedSettings.getBOOL("DisplayRegion");
00108 mDisplayDebug = gSavedSettings.getBOOL("DisplayDebug");
00109 mDisplayDebugConsole = gSavedSettings.getBOOL("DisplayDebugConsole");
00110 mDisplayLinden = gSavedSettings.getBOOL("DisplayLinden");
00111
00112 LLPanel::refresh();
00113 }
00114
00115 void LLPanelLCD::apply()
00116 {
00117
00118 }
00119
00120
00121 void LLPanelLCD::cancel()
00122 {
00123
00124 gSavedSettings.setS32("LCDDestination", mLCDDestination);
00125 gSavedSettings.setBOOL("DisplayChat", mDisplayChat);
00126 gSavedSettings.setBOOL("DisplayIM", mDisplayIM);
00127 gSavedSettings.setBOOL("DisplayRegion", mDisplayRegion);
00128 gSavedSettings.setBOOL("DisplayDebug", mDisplayDebug);
00129 gSavedSettings.setBOOL("DisplayDebugConsole", mDisplayDebugConsole);
00130 gSavedSettings.setBOOL("DisplayLinden", mDisplayLinden);
00131 }