00001 00033 #include "llviewerprecompiledheaders.h" 00034 00035 #include "llsavedsettingsglue.h" 00036 00037 #include "lluictrl.h" 00038 00039 #include "llviewercontrol.h" 00040 00041 void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, void* data) 00042 { 00043 const char* name = (const char*)data; 00044 LLSD value = ctrl->getValue(); 00045 gSavedSettings.setBOOL(name, value.asBoolean()); 00046 } 00047 00048 void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, void* data) 00049 { 00050 const char* name = (const char*)data; 00051 LLSD value = ctrl->getValue(); 00052 gSavedSettings.setS32(name, value.asInteger()); 00053 } 00054 00055 void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, void* data) 00056 { 00057 const char* name = (const char*)data; 00058 LLSD value = ctrl->getValue(); 00059 gSavedSettings.setF32(name, (F32)value.asReal()); 00060 } 00061 00062 void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, void* data) 00063 { 00064 const char* name = (const char*)data; 00065 LLSD value = ctrl->getValue(); 00066 gSavedSettings.setU32(name, (U32)value.asInteger()); 00067 } 00068 00069 void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, void* data) 00070 { 00071 const char* name = (const char*)data; 00072 LLSD value = ctrl->getValue(); 00073 gSavedSettings.setString(name, value.asString()); 00074 }