aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorSean Dague2008-12-19 22:27:45 +0000
committerSean Dague2008-12-19 22:27:45 +0000
commitdb4f4c255b5e5fa96bda5b60e39dc04815f19321 (patch)
tree9991c260a4728f226e29b7b5160c84498e5d8729 /OpenSim/Region/Environment
parent- Set acceleration and rotational velocity to 0, too (diff)
downloadopensim-SC_OLD-db4f4c255b5e5fa96bda5b60e39dc04815f19321.zip
opensim-SC_OLD-db4f4c255b5e5fa96bda5b60e39dc04815f19321.tar.gz
opensim-SC_OLD-db4f4c255b5e5fa96bda5b60e39dc04815f19321.tar.bz2
opensim-SC_OLD-db4f4c255b5e5fa96bda5b60e39dc04815f19321.tar.xz
let you specify a hex number as the color in the vector rendering
module. This expands the colors you can use.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
index 256bf27..6b9fde4 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
@@ -322,8 +322,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
322 { 322 {
323 nextLine = nextLine.Remove(0, 9); 323 nextLine = nextLine.Remove(0, 9);
324 nextLine = nextLine.Trim(); 324 nextLine = nextLine.Trim();
325 int hex = 0;
325 326
326 Color newColour = Color.FromName(nextLine); 327 Color newColour;
328 if(Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
329 {
330 newColour = Color.FromArgb(hex);
331 }
332 else
333 {
334 // this doesn't fail, it just returns black if nothing is found
335 newColour = Color.FromName(nextLine);
336 }
327 337
328 myBrush.Color = newColour; 338 myBrush.Color = newColour;
329 drawPen.Color = newColour; 339 drawPen.Color = newColour;