Altering the layout of the pathfinding console based on feedback.

meow-7.2.2
Todd Stinson 2012-04-06 13:37:11 -07:00
parent 2ddae4e363
commit 8d9863f4ef
6 changed files with 1055 additions and 1015 deletions

View File

@ -115,7 +115,7 @@ void LLFloaterPathfindingBasic::onAgentStateCB(LLPathfindingManager::EAgentState
void LLFloaterPathfindingBasic::setAgentState(LLPathfindingManager::EAgentState pAgentState)
{
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("DrYellow");
static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor");
LLStyle::Params styleParams;
switch (pAgentState)
@ -126,12 +126,12 @@ void LLFloaterPathfindingBasic::setAgentState(LLPathfindingManager::EAgentState
break;
case LLPathfindingManager::kAgentStateNotEnabled :
mStatusText->setVisible(TRUE);
styleParams.color = warningColor;
styleParams.color = errorColor;
mStatusText->setText((LLStringExplicit)getString("status_pathfinding_not_enabled"), styleParams);
break;
case LLPathfindingManager::kAgentStateError :
mStatusText->setVisible(TRUE);
styleParams.color = warningColor;
styleParams.color = errorColor;
mStatusText->setText((LLStringExplicit)getString("status_unable_to_change_state"), styleParams);
break;
default :

View File

@ -456,7 +456,8 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListElement(const LLPat
void LLFloaterPathfindingCharacters::updateStatusMessage()
{
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("DrYellow");
static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor");
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("PathfindingWarningColor");
std::string statusText("");
LLStyle::Params styleParams;
@ -465,13 +466,15 @@ void LLFloaterPathfindingCharacters::updateStatusMessage()
{
case kMessagingUnknown:
statusText = getString("characters_messaging_initial");
styleParams.color = errorColor;
break;
case kMessagingGetRequestSent :
statusText = getString("characters_messaging_get_inprogress");
styleParams.color = warningColor;
break;
case kMessagingGetError :
statusText = getString("characters_messaging_get_error");
styleParams.color = warningColor;
styleParams.color = errorColor;
break;
case kMessagingComplete :
if (mCharactersScrollList->isEmpty())
@ -498,10 +501,11 @@ void LLFloaterPathfindingCharacters::updateStatusMessage()
break;
case kMessagingNotEnabled:
statusText = getString("characters_messaging_not_enabled");
styleParams.color = warningColor;
styleParams.color = errorColor;
break;
default:
statusText = getString("characters_messaging_initial");
styleParams.color = errorColor;
llassert(0);
break;
}

View File

@ -766,7 +766,8 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState()
void LLFloaterPathfindingConsole::updateStatusOnConsoleState()
{
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("DrYellow");
static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor");
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("PathfindingWarningColor");
std::string simulatorStatusText("");
std::string viewerStatusText("");
@ -777,20 +778,22 @@ void LLFloaterPathfindingConsole::updateStatusOnConsoleState()
case kConsoleStateUnknown :
simulatorStatusText = getString("navmesh_simulator_status_unknown");
viewerStatusText = getString("navmesh_viewer_status_unknown");
viewerStyleParams.color = errorColor;
break;
case kConsoleStateLibraryNotImplemented :
simulatorStatusText = getString("navmesh_simulator_status_unknown");
viewerStatusText = getString("navmesh_viewer_status_library_not_implemented");
viewerStyleParams.color = warningColor;
viewerStyleParams.color = errorColor;
break;
case kConsoleStateRegionNotEnabled :
simulatorStatusText = getString("navmesh_simulator_status_unknown");
viewerStatusText = getString("navmesh_viewer_status_region_not_enabled");
viewerStyleParams.color = warningColor;
viewerStyleParams.color = errorColor;
break;
case kConsoleStateCheckingVersion :
simulatorStatusText = getString("navmesh_simulator_status_unknown");
viewerStatusText = getString("navmesh_viewer_status_checking_version");
viewerStyleParams.color = warningColor;
break;
case kConsoleStateDownloading :
simulatorStatusText = getSimulatorStatusText();
@ -802,6 +805,7 @@ void LLFloaterPathfindingConsole::updateStatusOnConsoleState()
{
viewerStatusText = getString("navmesh_viewer_status_downloading");
}
viewerStyleParams.color = warningColor;
break;
case kConsoleStateHasNavMesh :
simulatorStatusText = getSimulatorStatusText();
@ -810,11 +814,12 @@ void LLFloaterPathfindingConsole::updateStatusOnConsoleState()
case kConsoleStateError :
simulatorStatusText = getString("navmesh_simulator_status_unknown");
viewerStatusText = getString("navmesh_viewer_status_error");
viewerStyleParams.color = warningColor;
viewerStyleParams.color = errorColor;
break;
default :
simulatorStatusText = getString("navmesh_simulator_status_unknown");
viewerStatusText = getString("navmesh_viewer_status_unknown");
viewerStyleParams.color = errorColor;
llassert(0);
break;
}
@ -967,7 +972,7 @@ void LLFloaterPathfindingConsole::generatePath()
void LLFloaterPathfindingConsole::updatePathTestStatus()
{
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("DrYellow");
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("PathfindingWarningColor");
std::string statusText("");
LLStyle::Params styleParams;

View File

@ -864,7 +864,8 @@ bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLink
void LLFloaterPathfindingLinksets::updateStatusMessage()
{
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("DrYellow");
static const LLColor4 errorColor = LLUIColorTable::instance().getColor("PathfindingErrorColor");
static const LLColor4 warningColor = LLUIColorTable::instance().getColor("PathfindingWarningColor");
std::string statusText("");
LLStyle::Params styleParams;
@ -873,20 +874,23 @@ void LLFloaterPathfindingLinksets::updateStatusMessage()
{
case kMessagingUnknown:
statusText = getString("linksets_messaging_initial");
styleParams.color = errorColor;
break;
case kMessagingGetRequestSent :
statusText = getString("linksets_messaging_get_inprogress");
styleParams.color = warningColor;
break;
case kMessagingGetError :
statusText = getString("linksets_messaging_get_error");
styleParams.color = warningColor;
styleParams.color = errorColor;
break;
case kMessagingSetRequestSent :
statusText = getString("linksets_messaging_set_inprogress");
styleParams.color = warningColor;
break;
case kMessagingSetError :
statusText = getString("linksets_messaging_set_error");
styleParams.color = warningColor;
styleParams.color = errorColor;
break;
case kMessagingComplete :
if (mLinksetsScrollList->isEmpty())
@ -913,10 +917,11 @@ void LLFloaterPathfindingLinksets::updateStatusMessage()
break;
case kMessagingNotEnabled :
statusText = getString("linksets_messaging_not_enabled");
styleParams.color = warningColor;
styleParams.color = errorColor;
break;
default:
statusText = getString("linksets_messaging_initial");
styleParams.color = errorColor;
llassert(0);
break;
}

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<floater
open_positioning="cascading"
can_tear_off="false"
height="448"
height="406"
layout="topleft"
name="floater_pathfinding_console"
help_topic="floater_pathfinding_console"
@ -31,136 +31,14 @@
<floater.string name="pathing_choose_start_point">Please choose start point.</floater.string>
<floater.string name="pathing_choose_end_point">Please choose end point.</floater.string>
<floater.string name="pathing_path_valid">Path is shown in orange.</floater.string>
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
follows="left|top"
layout="topleft"
left="15"
top="9"
width="208">
Show:
</text>
<check_box
height="19"
label="Navmesh"
layout="topleft"
left="14"
name="show_navmesh"
top_pad="7"
width="90" />
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
text_readonly_color="LabelDisabledColor"
length="1"
follows="left|top"
layout="topleft"
left="35"
width="188">
Show walkability map:
</text>
<combo_box
height="19"
layout="topleft"
left="34"
name="show_heatmap_mode"
top_pad="8"
width="156">
<combo_box.item
label="Do not show"
name="show_heatmap_mode_none"
value="0" />
<combo_box.item
label="Character type A"
name="show_heatmap_mode_a"
value="1" />
<combo_box.item
label="Character type B"
name="show_heatmap_mode_b"
value="2" />
<combo_box.item
label="Character type C"
name="show_heatmap_mode_c"
value="3" />
<combo_box.item
label="Character type D"
name="show_heatmap_mode_d"
value="4" />
</combo_box>
<check_box
height="19"
label="Walkables"
layout="topleft"
left="14"
name="show_walkables"
top_pad="10"
tool_tip="Functionality is not implemented currently."
width="90" />
<check_box
height="19"
label="Material volumes"
layout="topleft"
left="14"
name="show_material_volumes"
top_pad="4"
tool_tip="Functionality is not implemented currently."
width="90" />
<check_box
height="19"
label="Static obstacles"
layout="topleft"
left="14"
name="show_static_obstacles"
top_pad="4"
tool_tip="Functionality is not implemented currently."
width="90" />
<check_box
height="19"
label="Exclusion volumes"
layout="topleft"
left="14"
name="show_exclusion_volumes"
top_pad="4"
width="90" />
<check_box
height="19"
label="World"
layout="topleft"
left="14"
name="show_world"
top_pad="4"
width="90" />
<check_box
height="19"
label="X-Ray"
layout="topleft"
left="14"
name="x-ray"
top_pad="4"
width="90" />
<view_border
bevel_style="none"
follows="top|left"
layout="topleft"
left="14"
height="0"
width="200"
top_pad="12"
visible="true" />
<panel
border="false"
bevel_style="none"
follows="left|top"
layout="topleft"
height="73"
left="14"
top_pad="15"
height="68"
width="200">
<text
height="13"
@ -171,7 +49,7 @@
length="1"
layout="topleft"
left="0"
top_pad="5"
top_pad="0"
width="200">
Viewer status
</text>
@ -180,7 +58,7 @@
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
text_color="PathfindingGoodColor"
length="1"
follows="left|top"
layout="topleft"
@ -204,74 +82,124 @@
bevel_style="none"
follows="left|top"
layout="topleft"
height="73"
height="250"
width="200">
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
follows="left|top"
layout="topleft"
top_pad="9"
width="200">
Show:
</text>
<check_box
height="19"
label="Navmesh"
layout="topleft"
name="show_navmesh"
top_pad="7"
width="90" />
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
layout="topleft"
left="0"
top_pad="5"
width="200">
Simulator status
</text>
<text
height="40"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
text_readonly_color="LabelDisabledColor"
length="1"
follows="left|top"
layout="topleft"
left="0"
name="pathfinding_simulator_status"
top_pad="8"
width="200">
left="20"
width="180">
Show walkability map:
</text>
<combo_box
height="19"
layout="topleft"
left="20"
name="show_heatmap_mode"
top_pad="8"
width="156">
<combo_box.item
label="Do not show"
name="show_heatmap_mode_none"
value="0" />
<combo_box.item
label="Character type A"
name="show_heatmap_mode_a"
value="1" />
<combo_box.item
label="Character type B"
name="show_heatmap_mode_b"
value="2" />
<combo_box.item
label="Character type C"
name="show_heatmap_mode_c"
value="3" />
<combo_box.item
label="Character type D"
name="show_heatmap_mode_d"
value="4" />
</combo_box>
<check_box
height="19"
label="Walkables"
layout="topleft"
left="0"
name="show_walkables"
top_pad="10"
tool_tip="Functionality is not implemented currently."
width="90" />
<check_box
height="19"
label="Material volumes"
layout="topleft"
name="show_material_volumes"
top_pad="4"
tool_tip="Functionality is not implemented currently."
width="90" />
<check_box
height="19"
label="Static obstacles"
layout="topleft"
name="show_static_obstacles"
top_pad="4"
tool_tip="Functionality is not implemented currently."
width="90" />
<check_box
height="19"
label="Exclusion volumes"
layout="topleft"
name="show_exclusion_volumes"
top_pad="4"
width="90" />
<check_box
height="19"
label="World"
layout="topleft"
name="show_world"
top_pad="4"
width="90" />
<check_box
height="19"
label="X-Ray"
layout="topleft"
name="x-ray"
top_pad="4"
width="90" />
</panel>
<view_border
bevel_style="none"
follows="top|left"
layout="topleft"
left="14"
height="0"
width="200"
top_pad="0"
visible="true" />
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
layout="topleft"
left="14"
top_pad="18"
width="250">
Lost characters? Bad performance?
</text>
<button
follows="left|top"
height="21"
label="Characters..."
layout="topleft"
name="view_characters_floater"
left_pad="0"
top_pad="-17"
width="96"/>
<view_border
bevel_style="none"
follows="top|left"
layout="topleft"
left="230"
top="35"
height="366"
height="247"
width="214"
visible="true" />
<tab_container
@ -281,7 +209,7 @@
name="edit_test_tab_container"
left="227"
top="14"
height="388"
height="268"
width="218">
<panel
border="false"
@ -378,6 +306,41 @@
left="1"
name="test_panel"
label="Test">
<text
height="14"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
left="16"
follows="left|top"
layout="topleft"
top_pad="12"
width="190">
Ctrl-click to select start point.
</text>
<text
height="14"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
follows="left|top"
layout="topleft"
top_pad="5"
width="190">
Shift-click to select end point.
</text>
<view_border
bevel_style="none"
follows="top|left"
layout="topleft"
height="0"
width="185"
top_pad="13"
visible="true" />
<text
height="14"
word_wrap="true"
@ -387,7 +350,6 @@
length="1"
follows="left|top"
layout="topleft"
left="16"
top_pad="14"
width="190">
Character width
@ -465,33 +427,7 @@
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
follows="left|top"
layout="topleft"
top_pad="12"
width="190">
Ctrl-click to select start point.
</text>
<text
height="14"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
follows="left|top"
layout="topleft"
top_pad="5"
width="190">
Shift-click to select end point.
</text>
<text
height="14"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
text_color="PathfindingGoodColor"
length="1"
follows="left|top"
layout="topleft"
@ -509,4 +445,79 @@
width="96"/>
</panel>
</tab_container>
<panel
border="false"
bevel_style="none"
follows="left|top"
layout="topleft"
left="246"
height="73"
width="200">
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
layout="topleft"
left="0"
top_pad="5"
width="200">
Simulator status
</text>
<text
height="40"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
follows="left|top"
layout="topleft"
left="0"
name="pathfinding_simulator_status"
top_pad="8"
width="200">
</text>
</panel>
<view_border
bevel_style="none"
follows="top|left"
layout="topleft"
height="0"
left="14"
width="430"
top_pad="0"
visible="true" />
<panel
border="false"
bevel_style="none"
follows="left|top"
layout="topleft"
height="40"
top_pad="0"
width="400">
<text
height="13"
word_wrap="true"
use_ellipses="false"
type="string"
text_color="LabelTextColor"
length="1"
layout="topleft"
top_pad="18"
width="250">
Lost characters? Bad performance?
</text>
<button
follows="left|top"
height="21"
label="Characters..."
layout="topleft"
name="view_characters_floater"
left_pad="0"
top_pad="-17"
width="96"/>
</panel>
</floater>