Skip to content
Snippets Groups Projects
Commit 1beaa01f authored by Tofu Linden's avatar Tofu Linden
Browse files

PE merge.

parents 0faa004a c4277e42
No related branches found
No related tags found
No related merge requests found
...@@ -354,6 +354,8 @@ void LLFloaterCamera::updateState() ...@@ -354,6 +354,8 @@ void LLFloaterCamera::updateState()
childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode); childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode);
childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode);
updateCameraPresetButtons();
//hiding or showing the panel with controls by reshaping the floater //hiding or showing the panel with controls by reshaping the floater
bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode;
if (showControls == childIsVisible(CONTROLS)) return; if (showControls == childIsVisible(CONTROLS)) return;
...@@ -384,6 +386,16 @@ void LLFloaterCamera::updateState() ...@@ -384,6 +386,16 @@ void LLFloaterCamera::updateState()
} }
} }
void LLFloaterCamera::updateCameraPresetButtons()
{
ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset");
childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW);
childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW);
childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW);
childSetValue("mouselook_view", gAgent.cameraMouselook());
}
void LLFloaterCamera::onClickCameraPresets(const LLSD& param) void LLFloaterCamera::onClickCameraPresets(const LLSD& param)
{ {
std::string name = param.asString(); std::string name = param.asString();
...@@ -405,4 +417,7 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) ...@@ -405,4 +417,7 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param)
gAgent.changeCameraToMouselook(); gAgent.changeCameraToMouselook();
} }
LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance();
if (camera_floater)
camera_floater->updateCameraPresetButtons();
} }
...@@ -103,6 +103,9 @@ class LLFloaterCamera ...@@ -103,6 +103,9 @@ class LLFloaterCamera
/* updates the state (UI) according to the current mode */ /* updates the state (UI) according to the current mode */
void updateState(); void updateState();
/* update camera preset buttons toggle state according to the currently selected preset */
void updateCameraPresetButtons();
void onClickBtn(ECameraControlMode mode); void onClickBtn(ECameraControlMode mode);
void assignButton2Mode(ECameraControlMode mode, const std::string& button_name); void assignButton2Mode(ECameraControlMode mode, const std::string& button_name);
......
...@@ -323,7 +323,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) ...@@ -323,7 +323,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this));
sSkin = gSavedSettings.getString("SkinCurrent"); sSkin = gSavedSettings.getString("SkinCurrent");
gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
...@@ -536,6 +537,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) ...@@ -536,6 +537,9 @@ void LLFloaterPreference::onOpen(const LLSD& key)
{ {
childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel()); childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel());
childSetVisible("maturity_desired_combobox", false); childSetVisible("maturity_desired_combobox", false);
// Display selected maturity icons.
onChangeMaturity();
} }
// Enabled/disabled popups, might have been changed by user actions // Enabled/disabled popups, might have been changed by user actions
...@@ -1212,7 +1216,19 @@ void LLFloaterPreference::applyResolution() ...@@ -1212,7 +1216,19 @@ void LLFloaterPreference::applyResolution()
refresh(); refresh();
} }
void LLFloaterPreference::onChangeMaturity()
{
U8 sim_access = gSavedSettings.getU32("PreferredMaturity");
getChild<LLIconCtrl>("rating_icon_general")->setVisible(sim_access == SIM_ACCESS_PG
|| sim_access == SIM_ACCESS_MATURE
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_moderate")->setVisible(sim_access == SIM_ACCESS_MATURE
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
}
void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param) void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
......
...@@ -134,8 +134,9 @@ class LLFloaterPreference : public LLFloater ...@@ -134,8 +134,9 @@ class LLFloaterPreference : public LLFloater
void onCommitMediaEnabled(); void onCommitMediaEnabled();
void onCommitMusicEnabled(); void onCommitMusicEnabled();
void applyResolution(); void applyResolution();
void onChangeMaturity();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param);
void buildPopupLists(); void buildPopupLists();
static void refreshSkin(void* data); static void refreshSkin(void* data);
......
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
height="40" height="40"
image_selected="Cam_Preset_Back_On" image_selected="Cam_Preset_Back_On"
image_unselected="Cam_Preset_Back_Off" image_unselected="Cam_Preset_Back_Off"
is_toggle="true"
layout="topleft" layout="topleft"
left="0" left="0"
name="rear_view" name="rear_view"
...@@ -146,6 +147,7 @@ ...@@ -146,6 +147,7 @@
height="40" height="40"
image_selected="Cam_Preset_Side_On" image_selected="Cam_Preset_Side_On"
image_unselected="Cam_Preset_Side_Off" image_unselected="Cam_Preset_Side_Off"
is_toggle="true"
layout="topleft" layout="topleft"
left_pad="5" left_pad="5"
name="group_view" name="group_view"
...@@ -160,6 +162,7 @@ ...@@ -160,6 +162,7 @@
height="40" height="40"
image_selected="Cam_Preset_Front_On" image_selected="Cam_Preset_Front_On"
image_unselected="Cam_Preset_Front_Off" image_unselected="Cam_Preset_Front_Off"
is_toggle="true"
layout="topleft" layout="topleft"
left="0" left="0"
name="front_view" name="front_view"
...@@ -174,6 +177,7 @@ ...@@ -174,6 +177,7 @@
height="40" height="40"
image_selected="Cam_Preset_Eye_Off" image_selected="Cam_Preset_Eye_Off"
image_unselected="Cam_Preset_Eye_Off" image_unselected="Cam_Preset_Eye_Off"
is_toggle="true"
layout="topleft" layout="topleft"
left_pad="5" left_pad="5"
name="mouselook_view" name="mouselook_view"
......
...@@ -141,7 +141,34 @@ ...@@ -141,7 +141,34 @@
label="General" label="General"
name="Desired_PG" name="Desired_PG"
value="13" /> value="13" />
<combo_box.commit_callback
function="Pref.MaturitySettings"/>
</combo_box> </combo_box>
<icon
follows="left|top"
height="16"
image_name="Parcel_PG_Dark"
layout="topleft"
left_pad="5"
name="rating_icon_general"
top_delta="3"
width="18"/>
<icon
follows="left|top"
height="16"
image_name="Parcel_M_Dark"
layout="topleft"
left_pad="2"
name="rating_icon_moderate"
width="18"/>
<icon
follows="left|top"
height="16"
image_name="Parcel_R_Dark"
layout="topleft"
left_pad="2"
name="rating_icon_adult"
width="18"/>
<text <text
type="string" type="string"
length="1" length="1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment