mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Co-authored-by: Paul <ritter.paul1+git@googlemail.com> Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
18 lines
400 B
C#
18 lines
400 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Robust.Client.UserInterface
|
|
{
|
|
public static class LogicalExtensions
|
|
{
|
|
public static IEnumerable<Control> GetSelfAndLogicalAncestors(this Control control)
|
|
{
|
|
Control? c = control;
|
|
while (c != null)
|
|
{
|
|
yield return c;
|
|
c = c.Parent;
|
|
}
|
|
}
|
|
}
|
|
}
|