PATH-245: Hooking the characters floater up to the character service. Also, adding in an additional state to handle the floater when the service does not exist.

master
Todd Stinson 2012-02-07 14:13:57 -08:00
parent cdcbc4c026
commit fa46459cdb
5 changed files with 16 additions and 9 deletions

View File

@ -187,7 +187,7 @@ void LLFloaterPathfindingCharacters::sendCharactersDataGetRequest()
std::string charactersDataURL = getCapabilityURL();
if (charactersDataURL.empty())
{
setMessagingState(kMessagingComplete);
setMessagingState(kMessagingServiceNotAvailable);
llwarns << "cannot query pathfinding characters from current region '" << getRegionName() << "'" << llendl;
}
else
@ -235,7 +235,7 @@ std::string LLFloaterPathfindingCharacters::getCapabilityURL() const
LLViewerRegion* region = gAgent.getRegion();
if (region != NULL)
{
charactersDataURL = region->getCapability("ObjectNavMeshProperties");
charactersDataURL = region->getCapability("CharacterProperties");
}
return charactersDataURL;
@ -431,6 +431,10 @@ void LLFloaterPathfindingCharacters::updateCharactersStatusMessage()
statusText = getString("characters_messaging_complete_available", string_args);
}
break;
case kMessagingServiceNotAvailable:
statusText = getString("characters_messaging_service_not_available");
styleParams.color = warningColor;
break;
default:
statusText = getString("characters_messaging_initial");
llassert(0);

View File

@ -57,7 +57,8 @@ public:
kMessagingFetchRequestSent_MultiRequested,
kMessagingFetchReceived,
kMessagingFetchError,
kMessagingComplete
kMessagingComplete,
kMessagingServiceNotAvailable
} EMessagingState;
virtual BOOL postBuild();

View File

@ -33,8 +33,8 @@
#define CHARACTER_NAME_FIELD "name"
#define CHARACTER_DESCRIPTION_FIELD "description"
#define CHARACTER_OWNER_FIELD "description"
#define CHARACTER_CPU_TIME_FIELD "landimpact"
#define CHARACTER_OWNER_FIELD "owner"
#define CHARACTER_CPU_TIME_FIELD "cpu_time"
#define CHARACTER_POSITION_FIELD "position"
//---------------------------------------------------------------------------

View File

@ -1491,6 +1491,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
{
capabilityNames.append("AttachmentResources");
capabilityNames.append("AvatarPickerSearch");
capabilityNames.append("CharacterProperties");
capabilityNames.append("ChatSessionRequest");
capabilityNames.append("CopyInventoryFromNotecard");
capabilityNames.append("CreateInventoryCategory");

View File

@ -19,6 +19,7 @@
<floater.string name="characters_messaging_fetch_error">Error detected while querying for pathfinding characters</floater.string>
<floater.string name="characters_messaging_complete_none_found">No pathfinding characters</floater.string>
<floater.string name="characters_messaging_complete_available">[NUM_SELECTED] characters selected out of [NUM_TOTAL]</floater.string>
<floater.string name="characters_messaging_service_not_available">Required capability is not available in current region</floater.string>
<scroll_list
column_padding="0"
draw_heading="true"
@ -52,8 +53,8 @@
width="64" />
</scroll_list>
<text
height="13"
word_wrap="false"
height="26"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
@ -62,7 +63,7 @@
layout="topleft"
name="characters_status"
top="161"
width="500">
width="240">
Characters:
</text>
<button
@ -113,7 +114,7 @@
layout="topleft"
name="actions_label"
top_pad="12"
width="910">
width="242">
Actions on selected characters:
</text>
<check_box