aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs23
2 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index b00d465..e2415b9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -37,6 +37,7 @@ using libsecondlife.Packets;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Region.Environment.Interfaces; 38using OpenSim.Region.Environment.Interfaces;
39using OpenSim.Region.Physics.Manager; 39using OpenSim.Region.Physics.Manager;
40using System.Drawing;
40 41
41namespace OpenSim.Region.Environment.Scenes 42namespace OpenSim.Region.Environment.Scenes
42{ 43{
@@ -166,6 +167,12 @@ namespace OpenSim.Region.Environment.Scenes
166 get { return m_rootPart.OwnerID; } 167 get { return m_rootPart.OwnerID; }
167 } 168 }
168 169
170 public Color Color
171 {
172 get { return m_rootPart.Color; }
173 set { m_rootPart.Color = value; }
174 }
175
169 public string Text 176 public string Text
170 { 177 {
171 get { return m_rootPart.Text; } 178 get { return m_rootPart.Text; }
@@ -1417,6 +1424,10 @@ namespace OpenSim.Region.Environment.Scenes
1417 1424
1418 public override void SetText(string text, Vector3 color, double alpha) 1425 public override void SetText(string text, Vector3 color, double alpha)
1419 { 1426 {
1427 Color = Color.FromArgb (0xff - (int)(alpha * 0xff),
1428 (int)(color.x * 0xff),
1429 (int)(color.y * 0xff),
1430 (int)(color.z * 0xff));
1420 Text = text; 1431 Text = text;
1421 } 1432 }
1422 } 1433 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 1604dad..52bea40 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -37,6 +37,7 @@ using OpenSim.Framework;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
38using OpenSim.Region.Environment.Scenes.Scripting; 38using OpenSim.Region.Environment.Scenes.Scripting;
39using OpenSim.Region.Physics.Manager; 39using OpenSim.Region.Physics.Manager;
40using System.Drawing;
40 41
41namespace OpenSim.Region.Environment.Scenes 42namespace OpenSim.Region.Environment.Scenes
42{ 43{
@@ -303,6 +304,21 @@ namespace OpenSim.Region.Environment.Scenes
303 set { m_description = value; } 304 set { m_description = value; }
304 } 305 }
305 306
307 private Color m_color = Color.Black;
308
309 public Color Color
310 {
311 get { return m_color; }
312 set
313 {
314 m_color = value;
315 /* ScheduleFullUpdate() need not be called b/c after
316 * setting the color, the text will be set, so then
317 * ScheduleFullUpdate() will be called. */
318 //ScheduleFullUpdate();
319 }
320 }
321
306 private string m_text = ""; 322 private string m_text = "";
307 323
308 public string Text 324 public string Text
@@ -1003,9 +1019,10 @@ namespace OpenSim.Region.Environment.Scenes
1003 } 1019 }
1004 } 1020 }
1005 1021
1022 byte[] color = new byte[] { m_color.R, m_color.G, m_color.B, m_color.A };
1006 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid, 1023 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid,
1007 OwnerID, 1024 OwnerID,
1008 m_text, ParentID, m_particleSystem, lRot); 1025 m_text, color, ParentID, m_particleSystem, lRot);
1009 } 1026 }
1010 1027
1011 /// Terse updates 1028 /// Terse updates
@@ -1092,6 +1109,10 @@ namespace OpenSim.Region.Environment.Scenes
1092 1109
1093 public void SetText(string text, Vector3 color, double alpha) 1110 public void SetText(string text, Vector3 color, double alpha)
1094 { 1111 {
1112 Color = Color.FromArgb (0xff - (int)(alpha * 0xff),
1113 (int)(color.x * 0xff),
1114 (int)(color.y * 0xff),
1115 (int)(color.z * 0xff));
1095 Text = text; 1116 Text = text;
1096 } 1117 }
1097 1118