mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Patch from Mathias Soeken (thanks Mathias!) to take care of the color
and alpha argument of the llSetText command.
This commit is contained in:
@@ -37,6 +37,7 @@ using libsecondlife.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
@@ -166,6 +167,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
get { return m_rootPart.OwnerID; }
|
||||
}
|
||||
|
||||
public Color Color
|
||||
{
|
||||
get { return m_rootPart.Color; }
|
||||
set { m_rootPart.Color = value; }
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get { return m_rootPart.Text; }
|
||||
@@ -1417,6 +1424,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public override void SetText(string text, Vector3 color, double alpha)
|
||||
{
|
||||
Color = Color.FromArgb (0xff - (int)(alpha * 0xff),
|
||||
(int)(color.x * 0xff),
|
||||
(int)(color.y * 0xff),
|
||||
(int)(color.z * 0xff));
|
||||
Text = text;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user