]> O.S.I.I.S - jp/crow.git/commitdiff
add FindByName in HostContainer
authorjpbruyere <jp.bruyere@hotmail.com>
Tue, 16 Feb 2016 12:53:03 +0000 (13:53 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Tue, 16 Feb 2016 12:53:03 +0000 (13:53 +0100)
src/OpenTKGameWindow.cs

index bc5c5cc4da0dd1cef350d6649fbf5afcc52ee3cf..862d25db6bd05dbeac0e1bd258da6f56bc4f341e 100644 (file)
@@ -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;