Viewer UI work to add icons for the nav bar and places profile to indicate parcel privacy settings. Using engineering art icons.
parent
32d30f33be
commit
b43da6721e
|
|
@ -190,6 +190,7 @@ LLLocationInputCtrl::Params::Params()
|
|||
scripts_icon("scripts_icon"),
|
||||
damage_icon("damage_icon"),
|
||||
damage_text("damage_text"),
|
||||
privacy_icon("privacy_icon"),
|
||||
maturity_help_topic("maturity_help_topic")
|
||||
{
|
||||
}
|
||||
|
|
@ -342,6 +343,13 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
|
|||
mDamageText = LLUICtrlFactory::create<LLTextBox>(damage_text);
|
||||
addChild(mDamageText);
|
||||
|
||||
LLIconCtrl::Params privacy_icon = p.privacy_icon;
|
||||
privacy_icon.tool_tip = LLTrans::getString("LocationCtrlPrivacyTooltip");
|
||||
privacy_icon.mouse_opaque = true;
|
||||
mParcelIcon[PRIVACY_ICON] = LLUICtrlFactory::create<LLIconCtrl>(privacy_icon);
|
||||
mParcelIcon[PRIVACY_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PRIVACY_ICON));
|
||||
addChild(mParcelIcon[PRIVACY_ICON]);
|
||||
|
||||
// Register callbacks and load the location field context menu (NB: the order matters).
|
||||
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Navbar.Action", boost::bind(&LLLocationInputCtrl::onLocationContextMenuItemClicked, this, _2));
|
||||
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Navbar.EnableMenuItem", boost::bind(&LLLocationInputCtrl::onLocationContextMenuItemEnabled, this, _2));
|
||||
|
|
@ -810,6 +818,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
|
|||
bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610.
|
||||
bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel);
|
||||
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
|
||||
bool privacy = current_parcel->getPrivacy();
|
||||
|
||||
// Most icons are "block this ability"
|
||||
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
|
||||
|
|
@ -819,6 +828,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
|
|||
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
|
||||
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
|
||||
mDamageText->setVisible(allow_damage);
|
||||
mParcelIcon[PRIVACY_ICON]->setVisible( privacy );
|
||||
|
||||
// Padding goes to left of both landmark star and for sale btn
|
||||
x -= mAddLandmarkHPad;
|
||||
|
|
@ -1175,6 +1185,9 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon)
|
|||
case DAMAGE_ICON:
|
||||
LLNotificationsUtil::add("NotSafe");
|
||||
break;
|
||||
case PRIVACY_ICON:
|
||||
LLNotificationsUtil::add("PrivateParcel");
|
||||
break;
|
||||
case ICON_COUNT:
|
||||
break;
|
||||
// no default to get compiler warning when a new icon gets added
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ public:
|
|||
push_icon,
|
||||
build_icon,
|
||||
scripts_icon,
|
||||
damage_icon;
|
||||
damage_icon,
|
||||
privacy_icon;
|
||||
Optional<LLTextBox::Params> damage_text;
|
||||
Params();
|
||||
};
|
||||
|
|
@ -109,12 +110,13 @@ private:
|
|||
enum EParcelIcon
|
||||
{
|
||||
VOICE_ICON = 0,
|
||||
FLY_ICON,
|
||||
PUSH_ICON,
|
||||
BUILD_ICON,
|
||||
SCRIPTS_ICON,
|
||||
DAMAGE_ICON,
|
||||
ICON_COUNT
|
||||
FLY_ICON, // 1
|
||||
PUSH_ICON, // 2
|
||||
BUILD_ICON, // 3
|
||||
SCRIPTS_ICON, // 4
|
||||
DAMAGE_ICON, // 5
|
||||
PRIVACY_ICON, // 6
|
||||
ICON_COUNT // 7 total
|
||||
};
|
||||
|
||||
friend class LLUICtrlFactory;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ static std::string icon_scripts;
|
|||
static std::string icon_scripts_no;
|
||||
static std::string icon_damage;
|
||||
static std::string icon_damage_no;
|
||||
static std::string icon_privacy_on;
|
||||
static std::string icon_privacy_off;
|
||||
|
||||
LLPanelPlaceProfile::LLPanelPlaceProfile()
|
||||
: LLPanelPlaceInfo(),
|
||||
|
|
@ -114,6 +116,8 @@ BOOL LLPanelPlaceProfile::postBuild()
|
|||
mScriptsText = getChild<LLTextBox>("scripts_value");
|
||||
mDamageIcon = getChild<LLIconCtrl>("damage_icon");
|
||||
mDamageText = getChild<LLTextBox>("damage_value");
|
||||
mPrivacyIcon = getChild<LLIconCtrl>("privacy_icon");
|
||||
mPrivacyText = getChild<LLTextBox>("privacy_value");
|
||||
|
||||
mRegionNameText = getChild<LLTextBox>("region_name");
|
||||
mRegionTypeText = getChild<LLTextBox>("region_type");
|
||||
|
|
@ -153,6 +157,8 @@ BOOL LLPanelPlaceProfile::postBuild()
|
|||
icon_scripts_no = getString("icon_ScriptsNo");
|
||||
icon_damage = getString("icon_Damage");
|
||||
icon_damage_no = getString("icon_DamageNo");
|
||||
icon_privacy_on = getString("icon_PrivacyOn");
|
||||
icon_privacy_off = getString("icon_PrivacyOff");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -182,6 +188,8 @@ void LLPanelPlaceProfile::resetLocation()
|
|||
mScriptsText->setText(loading);
|
||||
mDamageIcon->setValue(loading);
|
||||
mDamageText->setText(loading);
|
||||
mPrivacyIcon->setValue(loading);
|
||||
mPrivacyText->setText(loading);
|
||||
|
||||
mRegionNameText->setValue(loading);
|
||||
mRegionTypeText->setValue(loading);
|
||||
|
|
@ -414,6 +422,17 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
|
|||
mDamageText->setText(off);
|
||||
}
|
||||
|
||||
if (parcel->getPrivacy())
|
||||
{
|
||||
mPrivacyIcon->setValue(icon_privacy_on);
|
||||
mPrivacyText->setText(on);
|
||||
}
|
||||
else
|
||||
{
|
||||
mPrivacyIcon->setValue(icon_privacy_off);
|
||||
mPrivacyText->setText(off);
|
||||
}
|
||||
|
||||
mRegionNameText->setText(region->getName());
|
||||
mRegionTypeText->setText(region->getSimProductName());
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ private:
|
|||
LLTextBox* mScriptsText;
|
||||
LLIconCtrl* mDamageIcon;
|
||||
LLTextBox* mDamageText;
|
||||
LLIconCtrl* mPrivacyIcon;
|
||||
LLTextBox* mPrivacyText;
|
||||
|
||||
LLTextBox* mRegionNameText;
|
||||
LLTextBox* mRegionTypeText;
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ void LLPanelTopInfoBar::initParcelIcons()
|
|||
mParcelIcon[BUILD_ICON] = getChild<LLIconCtrl>("build_icon");
|
||||
mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon");
|
||||
mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon");
|
||||
mParcelIcon[PRIVACY_ICON] = getChild<LLIconCtrl>("privacy_icon");
|
||||
|
||||
mParcelIcon[VOICE_ICON]->setToolTip(LLTrans::getString("LocationCtrlVoiceTooltip"));
|
||||
mParcelIcon[FLY_ICON]->setToolTip(LLTrans::getString("LocationCtrlFlyTooltip"));
|
||||
|
|
@ -109,6 +110,7 @@ void LLPanelTopInfoBar::initParcelIcons()
|
|||
mParcelIcon[BUILD_ICON]->setToolTip(LLTrans::getString("LocationCtrlBuildTooltip"));
|
||||
mParcelIcon[SCRIPTS_ICON]->setToolTip(LLTrans::getString("LocationCtrlScriptsTooltip"));
|
||||
mParcelIcon[DAMAGE_ICON]->setToolTip(LLTrans::getString("LocationCtrlDamageTooltip"));
|
||||
mParcelIcon[PRIVACY_ICON]->setToolTip(LLTrans::getString("LocationCtrlPrivacyTooltip"));
|
||||
|
||||
mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON));
|
||||
mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON));
|
||||
|
|
@ -116,6 +118,7 @@ void LLPanelTopInfoBar::initParcelIcons()
|
|||
mParcelIcon[BUILD_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, BUILD_ICON));
|
||||
mParcelIcon[SCRIPTS_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, SCRIPTS_ICON));
|
||||
mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, DAMAGE_ICON));
|
||||
mParcelIcon[PRIVACY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, PRIVACY_ICON));
|
||||
|
||||
mDamageText->setText(LLStringExplicit("100%"));
|
||||
}
|
||||
|
|
@ -295,6 +298,7 @@ void LLPanelTopInfoBar::updateParcelIcons()
|
|||
bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610.
|
||||
bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel);
|
||||
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
|
||||
bool privacy = current_parcel->getPrivacy();
|
||||
|
||||
// Most icons are "block this ability"
|
||||
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
|
||||
|
|
@ -304,6 +308,7 @@ void LLPanelTopInfoBar::updateParcelIcons()
|
|||
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
|
||||
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
|
||||
mDamageText->setVisible(allow_damage);
|
||||
mParcelIcon[PRIVACY_ICON]->setVisible( privacy );
|
||||
|
||||
layoutParcelIcons();
|
||||
}
|
||||
|
|
@ -409,6 +414,9 @@ void LLPanelTopInfoBar::onParcelIconClick(EParcelIcon icon)
|
|||
case DAMAGE_ICON:
|
||||
LLNotificationsUtil::add("NotSafe");
|
||||
break;
|
||||
case PRIVACY_ICON:
|
||||
LLNotificationsUtil::add("PrivateParcel");
|
||||
break;
|
||||
case ICON_COUNT:
|
||||
break;
|
||||
// no default to get compiler warning when a new icon gets added
|
||||
|
|
|
|||
|
|
@ -65,12 +65,13 @@ private:
|
|||
enum EParcelIcon
|
||||
{
|
||||
VOICE_ICON = 0,
|
||||
FLY_ICON,
|
||||
PUSH_ICON,
|
||||
BUILD_ICON,
|
||||
SCRIPTS_ICON,
|
||||
DAMAGE_ICON,
|
||||
ICON_COUNT
|
||||
FLY_ICON, // 1
|
||||
PUSH_ICON, // 2
|
||||
BUILD_ICON, // 3
|
||||
SCRIPTS_ICON, // 4
|
||||
DAMAGE_ICON, // 5
|
||||
PRIVACY_ICON, // 6
|
||||
ICON_COUNT // 7 total
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 787 B |
Binary file not shown.
|
After Width: | Height: | Size: 833 B |
|
|
@ -1,4 +1,4 @@
|
|||
<!--
|
||||
<!--
|
||||
This file contains metadata about how to load, display, and scale textures for rendering in the UI.
|
||||
Images do *NOT* have to appear in this file in order to use them as textures in the UI...simply refer
|
||||
to them by filename (relative to textures directory).
|
||||
|
|
@ -348,6 +348,8 @@ with the same filename but different name
|
|||
<texture name="Parcel_ScriptsNo_Dark" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" />
|
||||
<texture name="Parcel_Voice_Dark" file_name="icons/Parcel_Voice_Dark.png" preload="false" />
|
||||
<texture name="Parcel_VoiceNo_Dark" file_name="icons/Parcel_VoiceNo_Dark.png" preload="false" />
|
||||
<texture name="Parcel_PrivacyOff_Dark" file_name="icons/Parcel_PrivacyOff_Dark.png" preload="false" />
|
||||
<texture name="Parcel_PrivacyOn_Dark" file_name="icons/Parcel_PrivacyOn_Dark.png" preload="false" />
|
||||
|
||||
<texture name="Parcel_BuildNo_Light" file_name="icons/Parcel_BuildNo_Light.png" preload="false" />
|
||||
<texture name="Parcel_FlyNo_Light" file_name="icons/Parcel_FlyNo_Light.png" preload="false" />
|
||||
|
|
|
|||
|
|
@ -5627,6 +5627,17 @@ This area has voice chat disabled. You won't be able to hear anyone talking
|
|||
This area has building disabled. You can't build or rez objects here.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="privacy.tga"
|
||||
name="PrivateParcel"
|
||||
persist="true"
|
||||
type="notify"
|
||||
unique="true">
|
||||
This is a private parcel. You can't see
|
||||
others outside the parcel, and those
|
||||
outside are not able to see you.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="ScriptsStopped"
|
||||
|
|
|
|||
|
|
@ -153,6 +153,14 @@
|
|||
name="icon_DamageNo"
|
||||
translate="false"
|
||||
value="Parcel_DamageNo_Dark" />
|
||||
<string
|
||||
name="icon_PrivacyOff"
|
||||
translate="false"
|
||||
value="Parcel_PrivacyOff_Dark" />
|
||||
<string
|
||||
name="icon_PrivacyOn"
|
||||
translate="false"
|
||||
value="Parcel_PrivacyOn_Dark" />
|
||||
<button
|
||||
follows="top|left"
|
||||
height="24"
|
||||
|
|
@ -543,6 +551,31 @@
|
|||
top_delta="0"
|
||||
value="Off"
|
||||
width="60" />
|
||||
<icon
|
||||
follows="top|left"
|
||||
height="18"
|
||||
image_name="Parcel_PrivacyOff_Dark"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="privacy_icon"
|
||||
top_pad="7"
|
||||
width="22" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="8"
|
||||
name="privacy_label"
|
||||
value="Privacy:"
|
||||
width="90" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="0"
|
||||
name="privacy_value"
|
||||
value="Off"
|
||||
width="60" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
|
|
|
|||
|
|
@ -88,6 +88,16 @@
|
|||
visible="false"
|
||||
width="14"
|
||||
/>
|
||||
<icon
|
||||
follows="right|top"
|
||||
height="13"
|
||||
image_name="Parcel_PrivacyOff_Dark"
|
||||
left="2"
|
||||
name="privacy_icon"
|
||||
top="3"
|
||||
visible="false"
|
||||
width="14"
|
||||
/>
|
||||
<text
|
||||
follows="right|top"
|
||||
font="SansSerifSmall"
|
||||
|
|
|
|||
|
|
@ -3043,6 +3043,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
|
|||
<string name="LocationCtrlAdultIconTooltip">Adult Region</string>
|
||||
<string name="LocationCtrlModerateIconTooltip">Moderate Region</string>
|
||||
<string name="LocationCtrlGeneralIconTooltip">General Region</string>
|
||||
<string name="LocationCtrlPrivacyTooltip">Private Parcel</string>
|
||||
|
||||
<!-- Strings used by the (currently Linux) auto-updater app -->
|
||||
<string name="UpdaterWindowTitle">
|
||||
|
|
|
|||
|
|
@ -123,6 +123,15 @@
|
|||
font="SansSerifSmall"
|
||||
text_color="TextFgColor"
|
||||
/>
|
||||
<privacy_icon
|
||||
name="privacy_icon"
|
||||
width="14"
|
||||
height="13"
|
||||
top="19"
|
||||
left="2"
|
||||
follows="right|top"
|
||||
image_name="Parcel_PrivacyOn_Dark"
|
||||
/>
|
||||
<combo_button
|
||||
name="Location History"
|
||||
label=""
|
||||
|
|
|
|||
|
|
@ -113,6 +113,15 @@
|
|||
font="SansSerifSmall"
|
||||
text_color="TextFgColor"
|
||||
/>
|
||||
<privacy_icon
|
||||
name="privacy_icon"
|
||||
width="14"
|
||||
height="13"
|
||||
top="19"
|
||||
left="2"
|
||||
follows="right|top"
|
||||
image_name="Parcel_PrivacyOn_Dark"
|
||||
/>
|
||||
<combo_button
|
||||
name="Location History"
|
||||
label=""
|
||||
|
|
|
|||
Loading…
Reference in New Issue