diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-16 13:53:03 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-16 13:53:03 +0100 |
| commit | 3249b270c5bd2f33aaa878e17bcc0f570cc8ea56 (patch) | |
| tree | 0a934c6bff0f95a8d7d8eae6b268d38196d15391 | |
| parent | d89859cfcebbe9d18fb85c6cb0e06ed2c7425cc0 (diff) | |
add FindByName in HostContainer
| -rw-r--r-- | src/OpenTKGameWindow.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index bc5c5cc4..862d25db 100644 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -177,7 +177,15 @@ namespace Crow GraphicObjects.RemoveAt (0); } } - + public GraphicObject FindByName (string nameToFind) + { + foreach (GraphicObject w in GraphicObjects) { + GraphicObject r = w.FindByName (nameToFind); + if (r != null) + return r; + } + return null; + } #region Events //those events are raised only if mouse isn't in a graphic object public event EventHandler<MouseWheelEventArgs> MouseWheelChanged; |