Fix to implement the color display for Linden, Estate Manager, and Muted minimap and Radar entries.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-19 23:59:46 -04:00
parent 3d3ac50d4e
commit 8c7055b835

View File

@@ -76,6 +76,9 @@ private:
LLColor4 mCustomTagColor;
LLColor4 mEffectColor;
LLColor4 mFriendColor;
LLColor4 mLindenColor;
LLColor4 mMutedColor;
LLColor4 mEMColor;
U32 mSelectedClient;
};
@@ -196,23 +199,20 @@ void LLPrefsAscentVanImpl::refreshValues()
mSelectedClient = LLSavedSettingsGlue::getCOAU32("AscentReportClientIndex");
mEffectColor = LLSavedSettingsGlue::getCOAColor4("EffectColor");
if (LLSavedSettingsGlue::getCOABOOL("AscentUseCustomTag"))
{
childEnable("custom_tag_label_text");
childEnable("custom_tag_label_box");
childEnable("custom_tag_color_text");
childEnable("custom_tag_color_swatch");
}
else
{
childDisable("custom_tag_label_text");
childDisable("custom_tag_label_box");
childDisable("custom_tag_color_text");
childDisable("custom_tag_color_swatch");
}
BOOL use_custom = LLSavedSettingsGlue::getCOABOOL("AscentUseCustomTag");
childSetEnabled("custom_tag_label_text", use_custom);
childSetEnabled("custom_tag_label_box", use_custom);
childSetEnabled("custom_tag_color_text", use_custom);
childSetEnabled("custom_tag_color_swatch", use_custom);
mCustomTagLabel = LLSavedSettingsGlue::getCOAString("AscentCustomTagLabel");
mCustomTagColor = LLSavedSettingsGlue::getCOAColor4("AscentCustomTagColor");
mFriendColor = LLSavedSettingsGlue::getCOAColor4("AscentFriendColor");
mLindenColor = LLSavedSettingsGlue::getCOAColor4("AscentLindenColor");
mMutedColor = LLSavedSettingsGlue::getCOAColor4("AscentMutedColor");
mEMColor = LLSavedSettingsGlue::getCOAColor4("AscentEstateOwnerColor");
}
void LLPrefsAscentVanImpl::refresh()
@@ -233,10 +233,23 @@ void LLPrefsAscentVanImpl::refresh()
getChild<LLColorSwatchCtrl>("effect_color_swatch")->set(mEffectColor);
getChild<LLColorSwatchCtrl>("custom_tag_color_swatch")->set(mCustomTagColor);
getChild<LLColorSwatchCtrl>("friend_color_swatch")->set(mFriendColor);
getChild<LLColorSwatchCtrl>("linden_color_swatch")->set(mLindenColor);
getChild<LLColorSwatchCtrl>("muted_color_swatch")->set(mMutedColor);
getChild<LLColorSwatchCtrl>("em_color_swatch")->set(mEMColor);
LLSavedSettingsGlue::setCOAColor4("EffectColor", LLColor4::white);
LLSavedSettingsGlue::setCOAColor4("EffectColor", mEffectColor);
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", LLColor4::yellow);
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", LLColor4::white);
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", mFriendColor);
LLSavedSettingsGlue::setCOAColor4("AscentLindenColor", LLColor4::white);
LLSavedSettingsGlue::setCOAColor4("AscentLindenColor", mLindenColor);
LLSavedSettingsGlue::setCOAColor4("AscentMutedColor", LLColor4::white);
LLSavedSettingsGlue::setCOAColor4("AscentMutedColor", mMutedColor);
LLSavedSettingsGlue::setCOAColor4("AscentEstateOwnerColor", LLColor4::white);
LLSavedSettingsGlue::setCOAColor4("AscentEstateOwnerColor", mEMColor);
gAgent.resetClientTag();
}
@@ -244,23 +257,17 @@ void LLPrefsAscentVanImpl::cancel()
{
//General --------------------------------------------------------------------------------
childSetValue("use_account_settings_check", mUseAccountSettings);
//Colors ---------------------------------------------------------------------------------
LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox");
combo->setCurrentByIndex(mSelectedClient);
childSetValue("show_self_tag_check", mShowSelfClientTag);
childSetValue("show_self_tag_color_check", mShowSelfClientTagColor);
childSetValue("customize_own_tag_check", mCustomTagOn);
childSetValue("custom_tag_label_box", mCustomTagLabel);
getChild<LLColorSwatchCtrl>("effect_color_swatch")->set(mEffectColor);
getChild<LLColorSwatchCtrl>("custom_tag_color_swatch")->set(mCustomTagColor);
getChild<LLColorSwatchCtrl>("friend_color_swatch")->set(mFriendColor);
LLSavedSettingsGlue::setCOAColor4("EffectColor", LLColor4::white);
LLSavedSettingsGlue::setCOAColor4("EffectColor", mEffectColor);
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", LLColor4::yellow);
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", mFriendColor);
LLSavedSettingsGlue::setCOAColor4("AscentLindenColor", LLColor4::yellow);
LLSavedSettingsGlue::setCOAColor4("AscentLindenColor", mLindenColor);
LLSavedSettingsGlue::setCOAColor4("AscentMutedColor", LLColor4::yellow);
LLSavedSettingsGlue::setCOAColor4("AscentMutedColor", mMutedColor);
LLSavedSettingsGlue::setCOAColor4("AscentEstateOwnerColor", LLColor4::yellow);
LLSavedSettingsGlue::setCOAColor4("AscentEstateOwnerColor", mEMColor);
}
void LLPrefsAscentVanImpl::apply()
@@ -292,11 +299,14 @@ void LLPrefsAscentVanImpl::apply()
gSavedSettings.setBOOL("AscentShowSelfTag", childGetValue("show_self_tag_check"));
gSavedSettings.setBOOL("AscentShowSelfTagColor", childGetValue("show_self_tag_color_check"));
LLSavedSettingsGlue::setCOAColor4("EffectColor", childGetValue("effect_color_swatch"));
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", childGetValue("friend_color_swatch"));
LLSavedSettingsGlue::setCOABOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check"));
LLSavedSettingsGlue::setCOAString("AscentCustomTagLabel", childGetValue("custom_tag_label_box"));
LLSavedSettingsGlue::setCOAColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch"));
LLSavedSettingsGlue::setCOAColor4("EffectColor", childGetValue("effect_color_swatch"));
LLSavedSettingsGlue::setCOAColor4("AscentFriendColor", childGetValue("friend_color_swatch"));
LLSavedSettingsGlue::setCOAColor4("AscentLindenColor", childGetValue("linden_color_swatch"));
LLSavedSettingsGlue::setCOAColor4("AscentMutedColor", childGetValue("muted_color_swatch"));
LLSavedSettingsGlue::setCOAColor4("AscentEstateOwnerColor", childGetValue("em_color_swatch"));
LLSavedSettingsGlue::setCOABOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check"));
LLSavedSettingsGlue::setCOAString("AscentCustomTagLabel", childGetValue("custom_tag_label_box"));
LLSavedSettingsGlue::setCOAColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch"));
refreshValues();
}