@@ -21,7 +21,7 @@ public abstract class Widget
2121 public int ZLayer { get ; set ; } = 0 ;
2222
2323 /// <summary>
24- /// If Widget is Display
24+ /// If Widget is Displayed
2525 /// </summary>
2626 public bool Displayed { get ; set ; } = true ;
2727
@@ -41,15 +41,20 @@ public abstract class Widget
4141 public PauseState PauseState { get ; set ; } = PauseState . Normal ;
4242
4343 /// <summary>
44- /// Name of Widgets
44+ /// Name of Widget
4545 /// </summary>
4646 public string Name { get ; set ; } = "" ;
4747
4848 /// <summary>
49- /// Get Real Position (Position + Parent RealPostion if widget has Parent)
49+ /// Get Real Position (Position + Parent RealPosition if widget has Parent)
5050 /// </summary>
5151 public Vec2 RealPosition => Parent != null ? Position + Parent . RealPosition : Position ;
5252
53+ /// <summary>
54+ /// If Widget is really displayed (considering parent's display state)
55+ /// </summary>
56+ public bool RealDisplayed => Displayed && ( Parent == null || Parent . RealDisplayed ) ;
57+
5358 /// <summary>
5459 /// Get All Direct Children of Widget
5560 /// </summary>
@@ -72,10 +77,10 @@ public Scene? Scene
7277 private Scene ? _scene ;
7378
7479 /// <summary>
75- /// Widget
80+ /// Initializes a new instance of the <see cref=" Widget"/> class.
7681 /// </summary>
77- /// <param name="position">Position Widget </param>
78- /// <param name="zLayer">ZLayer </param>
82+ /// <param name="position">The position of the widget. </param>
83+ /// <param name="zLayer">The Z layer of the widget. </param>
7984 protected Widget ( Vec2 position , int zLayer = 0 )
8085 {
8186 Position = position ;
@@ -113,7 +118,7 @@ public List<Widget> GetAllChildren()
113118 /// <summary>
114119 /// Add Child and return it
115120 /// </summary>
116- /// <param name="widget">Widget which be added</param>
121+ /// <param name="widget">Widget which will be added</param>
117122 /// <typeparam name="T">Type of Widget</typeparam>
118123 /// <returns>Child</returns>
119124 public T AddChild < T > ( T widget )
@@ -129,7 +134,7 @@ public T AddChild<T>(T widget)
129134 /// <summary>
130135 /// Remove Child
131136 /// </summary>
132- /// <param name="widget">Child will be removed</param>
137+ /// <param name="widget">Child that will be removed</param>
133138 public void RemoveChild ( Widget widget )
134139 {
135140 widget . Scene = null ;
0 commit comments