let you specify a hex number as the color in the vector rendering
module. This expands the colors you can use.0.6.1-post-fixes
parent
11d0456246
commit
db4f4c255b
|
@ -322,8 +322,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
|
|||
{
|
||||
nextLine = nextLine.Remove(0, 9);
|
||||
nextLine = nextLine.Trim();
|
||||
int hex = 0;
|
||||
|
||||
Color newColour = Color.FromName(nextLine);
|
||||
Color newColour;
|
||||
if(Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
|
||||
{
|
||||
newColour = Color.FromArgb(hex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// this doesn't fail, it just returns black if nothing is found
|
||||
newColour = Color.FromName(nextLine);
|
||||
}
|
||||
|
||||
myBrush.Color = newColour;
|
||||
drawPen.Color = newColour;
|
||||
|
|
Loading…
Reference in New Issue