Added the SetPartText access method to SceneObjectGroup to set the text of member SceneObjectParts.

afrisby
MW 2007-08-13 14:39:12 +00:00
parent 7fbc3266df
commit dc24317678
1 changed files with 35 additions and 17 deletions

View File

@ -82,7 +82,7 @@ namespace OpenSim.Region.Environment.Scenes
part.GroupPosition = value; part.GroupPosition = value;
} }
} }
} }
} }
public override uint LocalId public override uint LocalId
@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Scenes
protected bool m_isSelected = false; protected bool m_isSelected = false;
public bool IsSelected public bool IsSelected
{ {
get{ return m_isSelected;} get { return m_isSelected; }
set { m_isSelected = value; } set { m_isSelected = value; }
} }
@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
m_scene = scene; m_scene = scene;
m_regionHandle = regionHandle; m_regionHandle = regionHandle;
StringReader sr = new StringReader(xmlData); StringReader sr = new StringReader(xmlData);
XmlTextReader reader = new XmlTextReader(sr); XmlTextReader reader = new XmlTextReader(sr);
reader.ReadStartElement("SceneObjectGroup"); reader.ReadStartElement("SceneObjectGroup");
@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Scenes
m_regionHandle = regionHandle; m_regionHandle = regionHandle;
m_scene = scene; m_scene = scene;
// this.Pos = pos; // this.Pos = pos;
LLVector3 rootOffset = new LLVector3(0, 0, 0); LLVector3 rootOffset = new LLVector3(0, 0, 0);
SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset); SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset);
this.m_parts.Add(newPart.UUID, newPart); this.m_parts.Add(newPart.UUID, newPart);
@ -188,11 +188,11 @@ namespace OpenSim.Region.Environment.Scenes
writer.WriteEndElement(); writer.WriteEndElement();
writer.WriteEndElement(); writer.WriteEndElement();
writer.Close(); writer.Close();
// System.Console.WriteLine("prim: " + sw.ToString()); // System.Console.WriteLine("prim: " + sw.ToString());
return sw.ToString(); return sw.ToString();
// st.Close(); // st.Close();
// return ""; // return "";
} }
#region Copying #region Copying
@ -391,7 +391,7 @@ namespace OpenSim.Region.Environment.Scenes
linkPart.ParentID = this.m_rootPart.LocalID; linkPart.ParentID = this.m_rootPart.LocalID;
this.m_parts.Add(linkPart.UUID, linkPart); this.m_parts.Add(linkPart.UUID, linkPart);
linkPart.SetParent(this); linkPart.SetParent(this);
//TODO: rest of parts //TODO: rest of parts
m_scene.EventManager.OnBackup -= objectGroup.ProcessBackup; m_scene.EventManager.OnBackup -= objectGroup.ProcessBackup;
@ -450,11 +450,11 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="name"></param> /// <param name="name"></param>
public void SetPartName(string name, uint localID) public void SetPartName(string name, uint localID)
{ {
SceneObjectPart part = this.GetChildPrim(localID); SceneObjectPart part = this.GetChildPrim(localID);
if (part != null) if (part != null)
{ {
part.PartName = name; part.PartName = name;
} }
} }
public void SetPartDescription(string des, uint localID) public void SetPartDescription(string des, uint localID)
@ -466,6 +466,24 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public void SetPartText(string text, uint localID)
{
SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
part.Text = text;
}
}
public void SetPartText(string text, LLUUID partID)
{
SceneObjectPart part = this.GetChildPrim(partID);
if (part != null)
{
part.Text = text;
}
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -740,13 +758,13 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="part"></param> /// <param name="part"></param>
internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part) internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part)
{ {
if( m_rootPart == part ) if (m_rootPart == part)
{ {
part.SendFullUpdateToClient( remoteClient, Pos ); part.SendFullUpdateToClient(remoteClient, Pos);
} }
else else
{ {
part.SendFullUpdateToClient( remoteClient ); part.SendFullUpdateToClient(remoteClient);
} }
} }