Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ReAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,15 @@ public override void Render()
Graphics.DrawBox(position, position + textSize, Color.Black.ToSharpDx());
Graphics.DrawText(text, position, ColorFromName(color).ToSharpDx());
}
}

}
private static Color ColorFromName(string color)
{
if (color.StartsWith("#")) return ColorTranslator.FromHtml(color); // allow hex based colors
return Color.FromName(color);
}


private void ApplyPendingSideEffects()
{
var applicationResults = _pendingSideEffects.Select(x => (x, ApplicationResult: x.Apply(_state))).ToList();
Expand Down Expand Up @@ -518,4 +520,4 @@ private bool ShouldExecute(out string state)
state = "Ready";
return true;
}
}
}