FIRE-2717: Display traffic and area in landmark

Ansariel 2014-08-25 14:02:44 +02:00
parent c8110f8586
commit bb4903d28c
9 changed files with 194 additions and 33 deletions

View File

@ -56,7 +56,9 @@ LLPanelPlaceInfo::LLPanelPlaceInfo()
mInfoType(UNKNOWN),
mScrollingPanel(NULL),
mScrollContainer(NULL),
mDescEditor(NULL)
mDescEditor(NULL),
// <FS:Ansariel> FIRE-2717: Display traffic and area in landmark
mInfoText(NULL)
{}
//virtual
@ -78,6 +80,8 @@ BOOL LLPanelPlaceInfo::postBuild()
mRegionName = getChild<LLTextBox>("region_title");
mParcelName = getChild<LLTextBox>("parcel_title");
mDescEditor = getChild<LLExpandableTextBox>("description");
// <FS:Ansariel> FIRE-2717: Display traffic and area in landmark
mInfoText = findChild<LLTextBox>("information");
mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon");
mMaturityRatingText = getChild<LLTextBox>("maturity_value");
@ -103,6 +107,12 @@ void LLPanelPlaceInfo::resetLocation()
mRegionName->setText(loading);
mParcelName->setText(loading);
mDescEditor->setText(loading);
// <FS:Ansariel> FIRE-2717: Display traffic and area in landmark
if (mInfoText)
{
mInfoText->setText(loading);
}
// </FS:Ansariel>
// <FS:Ansariel> Fix loading icon
//mMaturityRatingIcon->setValue(LLUUID::null);
mMaturityRatingIcon->setValue(LLSD("Unknown_Icon"));
@ -195,6 +205,12 @@ void LLPanelPlaceInfo::setErrorStatus(U32 status, const std::string& reason)
mMaturityRatingText->setValue(not_available);
mRegionName->setText(not_available);
mParcelName->setText(not_available);
// <FS:Ansariel> FIRE-2717: Display traffic and area in landmark
if (mInfoText)
{
mInfoText->setText(not_available);
}
// </FS:Ansariel>
// <FS:Ansariel> Fix loading icon
//mMaturityRatingIcon->setValue(LLUUID::null);
mMaturityRatingIcon->setValue(LLSD("Unknown_Icon"));
@ -260,6 +276,17 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
mParcelName->setText(getString("not_available"));
}
// <FS:Ansariel> FIRE-2717: Display traffic and area in landmark
if (mInfoText)
{
LLStringUtil::format_map_t args;
args["TRAFFIC"] = llformat("%d", (S32)parcel_data.dwell);
args["AREA"] = llformat("%d", parcel_data.actual_area);
std::string info_text = getString("information_text", args);
mInfoText->setText(info_text);
}
// </FS:Ansariel>
// <FS:Ansariel> FIRE-817: Separate place details floater
if (!mParcelDetailLoadedSignal.empty())
{

View File

@ -136,6 +136,8 @@ protected:
LLExpandableTextBox* mDescEditor;
LLIconCtrl* mMaturityRatingIcon;
LLTextBox* mMaturityRatingText;
// <FS:Ansariel> FIRE-2717: Display traffic and area in landmark
LLTextBox* mInfoText;
};
#endif // LL_LLPANELPLACEINFO_H

View File

@ -2,10 +2,10 @@
<panel
background_visible="true"
follows="all"
height="570"
height="587"
layout="topleft"
left="0"
min_height="350"
min_height="367"
name="landmark_info"
top="20"
width="333">
@ -43,6 +43,10 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string
name="information_text">
Traffic: [TRAFFIC] Area: [AREA] m²
</string>
<!-- Texture names for rating icons -->
<string
name="icon_PG"
@ -64,7 +68,7 @@
top="0"
left="0"
width="331"
height="570"
height="587"
border_size="0"
orientation="vertical">
<layout_panel
@ -107,7 +111,7 @@
<layout_panel
name="place_info_content"
auto_resize="true"
height="540"
height="557"
width="331"
layout="topleft"
follows="all">
@ -191,7 +195,7 @@
<panel
follows="top|left|right"
height="55"
height="72"
layout="topleft"
left="4"
name="landmark_info_panel"
@ -255,6 +259,24 @@
left_pad="0"
name="created"
right="-1" />
<text
follows="left|top"
height="15"
layout="topleft"
top_pad="2"
left="0"
name="information_label"
value="Info:"
width="60" />
<text
follows="left|top|right"
height="15"
layout="topleft"
left_pad="0"
name="information"
right="-1" />
</panel>
<panel

View File

@ -18,6 +18,9 @@
<string name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string name="information_text">
Traffic: [TRAFFIC] Gebiet: [AREA] m²
</string>
<layout_stack name="place_info_sidetray_main">
<layout_panel name="header_container">
@ -38,6 +41,7 @@
<text name="owner_label" value="Eigentümer:" width="70"/>
<text name="creator_label" value="Ersteller:" width="70"/>
<text name="created_label" value="Erstellt:" width="70"/>
<text name="information_label" value="Information:" width="70"/>
</panel>
<panel name="landmark_edit_panel">
<text name="title_label" value="Titel:" width="70"/>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
follows="all"
height="570"
height="587"
layout="topleft"
left="0"
min_height="350"
min_height="367"
name="landmark_info"
top="20"
width="333">
@ -42,6 +42,10 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string
name="information_text">
Traffic: [TRAFFIC] Area: [AREA] m²
</string>
<!-- Texture names for rating icons -->
<string
name="icon_PG"
@ -63,7 +67,7 @@
top="0"
left="0"
width="331"
height="570"
height="587"
border_size="0"
orientation="vertical">
<layout_panel
@ -106,7 +110,7 @@
<layout_panel
name="place_info_content"
auto_resize="true"
height="540"
height="557"
width="331"
layout="topleft"
follows="all">
@ -190,7 +194,7 @@
<panel
follows="top|left|right"
height="55"
height="72"
layout="topleft"
left="4"
name="landmark_info_panel"
@ -254,6 +258,24 @@
left_pad="0"
name="created"
right="-1" />
<text
follows="left|top"
height="15"
layout="topleft"
top_pad="2"
left="0"
name="information_label"
value="Info:"
width="60" />
<text
follows="left|top|right"
height="15"
layout="topleft"
left_pad="0"
name="information"
right="-1" />
</panel>
<panel

View File

@ -2,10 +2,10 @@
<panel
background_visible="true"
follows="all"
height="570"
height="587"
layout="topleft"
left="0"
min_height="350"
min_height="367"
name="landmark_info"
top="20"
width="333">
@ -43,6 +43,10 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string
name="information_text">
Traffic: [TRAFFIC] Area: [AREA] m²
</string>
<!-- Texture names for rating icons -->
<string
name="icon_PG"
@ -64,7 +68,7 @@
top="0"
left="0"
width="331"
height="570"
height="587"
border_size="0"
orientation="vertical">
<layout_panel
@ -107,7 +111,7 @@
<layout_panel
name="place_info_content"
auto_resize="true"
height="540"
height="557"
width="331"
layout="topleft"
follows="all">
@ -191,7 +195,7 @@
<panel
follows="top|left|right"
height="55"
height="72"
layout="topleft"
left="4"
name="landmark_info_panel"
@ -255,6 +259,24 @@
left_pad="0"
name="created"
right="-1" />
<text
follows="left|top"
height="15"
layout="topleft"
top_pad="2"
left="0"
name="information_label"
value="Info:"
width="60" />
<text
follows="left|top|right"
height="15"
layout="topleft"
left_pad="0"
name="information"
right="-1" />
</panel>
<panel

View File

@ -2,7 +2,7 @@
<panel
background_visible="true"
follows="all"
height="570"
height="587"
layout="topleft"
left="0"
min_height="350"
@ -43,6 +43,10 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string
name="information_text">
Traffic: [TRAFFIC] Area: [AREA] m²
</string>
<!-- Texture names for rating icons -->
<string
name="icon_PG"
@ -64,7 +68,7 @@
top="0"
left="0"
width="331"
height="570"
height="587"
border_size="0"
orientation="vertical">
<layout_panel
@ -107,7 +111,7 @@
<layout_panel
name="place_info_content"
auto_resize="true"
height="540"
height="557"
width="331"
layout="topleft"
follows="all">
@ -115,7 +119,7 @@
<scroll_container
color="SL-Background_50"
follows="all"
height="532"
height="549"
layout="topleft"
left="9"
name="place_scroll"
@ -125,7 +129,7 @@
<panel
bg_alpha_color="SL-Background_50"
follows="left|top|right"
height="630"
height="647"
layout="topleft"
left="0"
min_height="300"
@ -195,7 +199,7 @@
width="268" />
<panel
follows="left|top|right"
height="55"
height="72"
layout="topleft"
left="10"
name="landmark_info_panel"
@ -252,6 +256,22 @@
name="created"
top_delta="0"
width="200" />
<text
follows="left|top"
height="15"
layout="topleft"
left="0"
name="information_label"
value="Info:"
width="50" />
<text
follows="left|top|right"
height="15"
layout="topleft"
left="70"
name="information"
top_delta="0"
width="200"/>
</panel>
<panel
follows="left|top|right"

View File

@ -2,7 +2,7 @@
<panel
background_visible="true"
follows="all"
height="570"
height="587"
layout="topleft"
left="0"
min_height="350"
@ -43,6 +43,10 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string
name="information_text">
Traffic: [TRAFFIC] Area: [AREA] m²
</string>
<!-- Texture names for rating icons -->
<string
name="icon_PG"
@ -64,7 +68,7 @@
top="0"
left="0"
width="331"
height="570"
height="587"
border_size="0"
orientation="vertical">
<layout_panel
@ -107,7 +111,7 @@
<layout_panel
name="place_info_content"
auto_resize="true"
height="540"
height="557"
width="331"
layout="topleft"
follows="all">
@ -115,7 +119,7 @@
<scroll_container
color="SL-Background_50"
follows="all"
height="532"
height="549"
layout="topleft"
left="9"
name="place_scroll"
@ -125,7 +129,7 @@
<panel
bg_alpha_color="SL-Background_50"
follows="left|top|right"
height="630"
height="647"
layout="topleft"
left="0"
min_height="300"
@ -195,7 +199,7 @@
width="268" />
<panel
follows="left|top|right"
height="55"
height="72"
layout="topleft"
left="10"
name="landmark_info_panel"
@ -252,6 +256,22 @@
name="created"
top_delta="0"
width="200" />
<text
follows="left|top"
height="15"
layout="topleft"
left="0"
name="information_label"
value="Info:"
width="50" />
<text
follows="left|top|right"
height="15"
layout="topleft"
left="70"
name="information"
top_delta="0"
width="200"/>
</panel>
<panel
follows="left|top|right"

View File

@ -2,10 +2,10 @@
<panel
background_visible="true"
follows="all"
height="570"
height="587"
layout="topleft"
left="0"
min_height="350"
min_height="367"
name="landmark_info"
top="20"
width="333">
@ -43,6 +43,10 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
<string
name="information_text">
Traffic: [TRAFFIC] Area: [AREA] m²
</string>
<!-- Texture names for rating icons -->
<string
name="icon_PG"
@ -64,7 +68,7 @@
top="0"
left="0"
width="331"
height="570"
height="587"
border_size="0"
orientation="vertical">
<layout_panel
@ -107,7 +111,7 @@
<layout_panel
name="place_info_content"
auto_resize="true"
height="540"
height="557"
width="331"
layout="topleft"
follows="all">
@ -191,7 +195,7 @@
<panel
follows="top|left|right"
height="55"
height="72"
layout="topleft"
left="4"
name="landmark_info_panel"
@ -255,6 +259,24 @@
left_pad="0"
name="created"
right="-1" />
<text
follows="left|top"
height="15"
layout="topleft"
top_pad="2"
left="0"
name="information_label"
value="Info:"
width="60" />
<text
follows="left|top|right"
height="15"
layout="topleft"
left_pad="0"
name="information"
right="-1" />
</panel>
<panel