Added estate ID and region grid position to Region/Estate floater. FIRE-6367

ziree 2012-05-31 20:20:37 +02:00
parent a724cc5e87
commit fa28463498
2 changed files with 69 additions and 0 deletions

View File

@ -375,6 +375,23 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid));
panel->setCtrlsEnabled(allow_modify);
// <FS:Zi> Add estate ID and region grid position to Region panel
S32 grid_pos_x=-1;
S32 grid_pos_y=-1;
U32 estate_id;
if(region)
{
//compute the grid position of the region
LLVector3d global_pos = region->getPosGlobalFromRegion(LLVector3::zero);
grid_pos_x = (S32) (global_pos.mdV[VX]/256.0f);
grid_pos_y = (S32) (global_pos.mdV[VY]/256.0f);
}
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, estate_id);
panel->getChild<LLLineEditor>("estate_id")->setValue(LLSD((F32) estate_id));
panel->getChild<LLLineEditor>("grid_position_x")->setValue(LLSD((F32) grid_pos_x));
panel->getChild<LLLineEditor>("grid_position_y")->setValue(LLSD((F32) grid_pos_y));
// </FS:Zi>
// DEBUG PANEL
panel = tab->getChild<LLPanel>("Debug");

View File

@ -32,6 +32,27 @@
width="400">
unknown
</text>
<text
follows="right|top"
font="SansSerif"
height="20"
layout="topleft"
top_delta="0"
right="-98"
name="estate_id_lbl"
width="80">
Estate ID:
</text>
<line_editor
follows="right|top"
font="SansSerif"
height="20"
layout="topleft"
top_delta="0"
name="estate_id"
right="-10"
initial_value="unknown"
width="85" />
<text
follows="left|top"
font="SansSerif"
@ -54,6 +75,37 @@
width="200">
unknown
</text>
<text
follows="right|top"
font="SansSerif"
height="20"
layout="topleft"
top_delta="0"
right="-100"
name="grid_position_lbl"
width="80">
Grid Position:
</text>
<line_editor
follows="right|top"
font="SansSerif"
height="20"
layout="topleft"
right="-55"
name="grid_position_x"
top_delta="0"
initial_value="unknown"
width="40" />
<line_editor
follows="right|top"
font="SansSerif"
height="20"
layout="topleft"
right="-10"
name="grid_position_y"
top_delta="0"
initial_value="unknown"
width="40" />
<text
follows="left|top"
font="SansSerif"