aboutsummaryrefslogtreecommitdiff
path: root/V3/Screens/IScreenManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'V3/Screens/IScreenManager.cs')
-rw-r--r--V3/Screens/IScreenManager.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/V3/Screens/IScreenManager.cs b/V3/Screens/IScreenManager.cs
new file mode 100644
index 0000000..e61c49c
--- /dev/null
+++ b/V3/Screens/IScreenManager.cs
@@ -0,0 +1,35 @@
+namespace V3.Screens
+{
+ /// <summary>
+ /// Handles screens using a screen stack. You can add screens to the
+ /// foreground using the AddScreen method, remove screens from the
+ /// foreground using the RemoveScreen method and remove all screens using
+ /// the Clear method. The top screen is always drawn and updated, and
+ /// it can decide whether lower screens should be drawn and/or updated
+ /// too. The screens are updated from top to bottom, and drawn from
+ /// bottom to top.
+ /// </summary>
+ public interface IScreenManager : IDrawable, IUpdateable
+ {
+ /// <summary>
+ /// Adds a screen to the foreground.
+ /// </summary>
+ /// <param name="screen">the screen to add in the foreground</param>
+ void AddScreen(IScreen screen);
+
+ /// <summary>
+ /// Removes the given screen if it is on the top of the screen stack.
+ /// </summary>
+ /// <param name="screen">the screen to remove</param>
+ /// <returns>true if the screen was on top and has been removed,
+ /// false otherwise</returns>
+ void RemoveScreen(IScreen screen);
+
+ /// <summary>
+ /// Clears the screen stack.
+ /// </summary>
+ void Clear();
+
+ GameScreen GetGameScreen();
+ }
+}