aboutsummaryrefslogtreecommitdiff
path: root/V3/Screens/IScreen.cs
diff options
context:
space:
mode:
Diffstat (limited to 'V3/Screens/IScreen.cs')
-rw-r--r--V3/Screens/IScreen.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/V3/Screens/IScreen.cs b/V3/Screens/IScreen.cs
new file mode 100644
index 0000000..197aaec
--- /dev/null
+++ b/V3/Screens/IScreen.cs
@@ -0,0 +1,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);
+ }
+}