Add option to have the script dialog ignore the global transparency setting and use an opaque background to make it easiert to notice. Fixes FIRE-1868

meow-7.2.2
Ansariel 2011-07-02 22:19:29 +02:00
parent c64a3e84ad
commit 803aa3b1aa
5 changed files with 43 additions and 3 deletions

View File

@ -209,7 +209,8 @@ public:
virtual void setColor(const LLColor4& color);
F32 getCurrentTransparency();
// Ansariel: Changed to virtual. We might want to change the transparency ourself!
virtual F32 getCurrentTransparency();
void setTransparencyType(ETypeTransparency type);
ETypeTransparency getTransparencyType() const {return mTransparencyType;}

View File

@ -2,6 +2,17 @@
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="llsd.xsd">
<map>
<key>FSScriptDialogNoTransparency</key>
<map>
<key>Comment</key>
<string>If true, script dialogs will be shown opaque and ignore the floater opacity settings.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShowMutedAvatarsAsCloud</key>
<map>
<key>Comment</key>

View File

@ -278,6 +278,21 @@ void LLScriptFloater::restorePosition()
}
}
// Ansariel: Override base method so we have the option to ignore
// the global transparency settings and show the script dialog
// always on opaque background.
F32 LLScriptFloater::getCurrentTransparency()
{
if (gSavedSettings.getBOOL("FSScriptDialogNoTransparency"))
{
return 1.0;
}
else
{
return LLUICtrl::getCurrentTransparency();
}
}
void LLScriptFloater::onFocusLost()
{
if(getNotificationId().notNull())

View File

@ -178,6 +178,8 @@ public:
void restorePosition();
F32 getCurrentTransparency();
protected:
/**

View File

@ -460,6 +460,17 @@
top_pad="5"
width="415" />
<check_box
control_name="FSScriptDialogNoTransparency"
follows="left|top"
layout="topleft"
left="30"
height="12"
name="FSScriptDialogNoTransparency"
top_pad="10"
width="450"
label="Show script dialogs always on opaque background" />
<!-- ## Zi: Pie menu -->
<check_box
control_name="OverridePieColors"
@ -468,7 +479,7 @@
left="30"
height="12"
name="override_pie_color_checkbox"
top_pad="15"
top_pad="10"
width="450"
label="Override pie menu background color and opacity:" />
<color_swatch
@ -479,7 +490,7 @@
label_height="0"
layout="topleft"
left_delta="10"
top_pad="10"
top_pad="5"
name="pie_bg_color_override"
tool_tip="Choose pie menu background color"
width="44">