Update to FIRE-1332

master
Cinders 2013-06-25 15:25:34 -06:00
parent f0aa0c5e70
commit 77cda051af
4 changed files with 49 additions and 10 deletions

View File

@ -193,10 +193,7 @@ void LLConsole::draw()
// <FS:CR> FIRE-1332 - Sepeate opacity settings for nametag and console chat
F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
//AO: Unify colors with the color preferences control for all onscreen overlay background
// console/bubblechat/tag backgrounds. FIRE-969
// LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
LLColor4 color = LLUIColorTable::instance().getColor("NameTagBackground");
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
//</AO>
color.mV[VALPHA] *= console_opacity;

View File

@ -590,6 +590,7 @@ BOOL LLFloaterPreference::postBuild()
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged));
gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2));
gSavedSettings.getControl("ConsoleBackgroundOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onConsoleOpacityChange, this, _2)); // <FS:CR> FIRE-1332 - Sepeate opacity settings for nametag and console chat
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this));
@ -1157,6 +1158,18 @@ void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue)
}
}
// <FS:CR> FIRE-1332 - Sepeate opacity settings for nametag and console chat
void LLFloaterPreference::onConsoleOpacityChange(const LLSD& newvalue)
{
LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("console_background");
if (color_swatch)
{
LLColor4 new_color = color_swatch->get();
color_swatch->set( new_color.setAlpha(newvalue.asReal()) );
}
}
// </FS:CR>
void LLFloaterPreference::onClickSetCache()
{
std::string cur_name(gSavedSettings.getString("CacheLocation"));

View File

@ -94,6 +94,7 @@ protected:
void onClickBrowserClearCache(); // Clear web history and caches as well as viewer caches above
void onLanguageChange();
void onNameTagOpacityChange(const LLSD& newvalue);
void onConsoleOpacityChange(const LLSD& newvalue); // <FS:CR> FIRE-1332 - Sepeate opacity settings for nametag and console chat
// <FS:Zi> Pie menu
// make sure controls get greyed out or enabled when pie color override is toggled

View File

@ -1425,6 +1425,35 @@
show_text="true"
top_pad="2"
width="415" />
<text
follows="left|top"
layout="topleft"
left="30"
height="12"
name="console_opacity"
top_pad="15"
width="220">
Console Opacity:
</text>
<color_swatch
can_apply_immediately="true"
color="0 0 0 0.5"
follows="left|top"
height="24"
label_height="0"
layout="topleft"
left="40"
top_pad="5"
name="console_background"
tool_tip="Choose console color"
width="44">
<color_swatch.init_callback
function="Pref.getUIColor"
parameter="ConsoleBackground" />
<color_swatch.commit_callback
function="Pref.applyUIColor"
parameter="ConsoleBackground" />
</color_swatch>
<slider
control_name="ConsoleBackgroundOpacity"
follows="left|top"
@ -1433,15 +1462,14 @@
initial_value="1"
max_val="1.00"
min_val="0.00"
decimal_digits="2"
label="Console Opacity:"
decimal_digits="3"
label="Opacity:"
layout="topleft"
label_width="135"
label_width="118"
name="console_background_opacity"
tool_tip="Choose console background opacity"
top_pad="0"
left="30"
width="435" />
left_pad="10"
width="378" />
<check_box
control_name="FSScriptDialogNoTransparency"