diff options
author | Thomas Leyh <leyh.thomas@web.de> | 2016-07-24 08:14:18 +0200 |
---|---|---|
committer | Thomas Leyh <leyh.thomas@web.de> | 2016-07-24 08:14:18 +0200 |
commit | ced3d03bdb3ce866d832e03fb212865140905a9a (patch) | |
tree | 2a16c2063a46d3c354ce1585029dda3124f6ad93 /V3/Screens/IScreenManager.cs | |
parent | 0394dccaf06e1009e591a6ff4d645895574724c1 (diff) | |
download | V3-ced3d03bdb3ce866d832e03fb212865140905a9a.tar.gz V3-ced3d03bdb3ce866d832e03fb212865140905a9a.tar.bz2 |
Diffstat (limited to 'V3/Screens/IScreenManager.cs')
-rw-r--r-- | V3/Screens/IScreenManager.cs | 35 |
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(); + } +} |