aboutsummaryrefslogtreecommitdiff
path: root/V3/Screens/IScreen.cs
blob: 197aaec94104c1e33561c4da60a2720d46a0009b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using V3.Input;

namespace V3.Screens
{
    /// <summary>
    /// A screen that can be handled by a screen manager and that provides
    /// information on how to deal with other screens below this one.
    /// </summary>
    public interface IScreen : IDrawable, IUpdateable
    {
        /// <summary>
        /// Indicates whether screens below this one should be updated.
        /// </summary>
        bool UpdateLower { get; }

        /// <summary>
        /// Indicates whether screens below this one should be drawn.
        /// </summary>
        bool DrawLower { get; }

        /// <summary>
        /// Handles the given key event and returns whether it should be passed
        /// to the screens below this one.
        /// </summary>
        /// <param name="keyEvent">the key event that occurred</param>
        /// <returns>true if the event has been handeled by this screen and
        /// should not be passed to the lower screens, false otherwise</returns>
        bool HandleKeyEvent(IKeyEvent keyEvent);

        /// <summary>
        /// Handles the given mouse event and returns whether it should be passed
        /// to the screens below this one.
        /// </summary>
        /// <param name="mouseEvent">the mouse event that occurred</param>
        /// <returns>true if the event has been handeled by this screen and
        /// should not be passed to the lower screens, false otherwise</returns>
        bool HandleMouseEvent(IMouseEvent mouseEvent);
    }
}