diff --git a/src/CSSUniversalMenuAPI/Extensions/IFocusMenuExtension.cs b/src/CSSUniversalMenuAPI/Extensions/IFocusMenuExtension.cs new file mode 100644 index 0000000..1ebe048 --- /dev/null +++ b/src/CSSUniversalMenuAPI/Extensions/IFocusMenuExtension.cs @@ -0,0 +1,29 @@ +namespace CSSUniversalMenuAPI.Extensions; + +/// +/// Allow a menu or a notification to be presented to a player, but without taking focus from the player.
+/// This should be used when you want to present a menu to a player who may not be expecting it, such as votes. +///
+public interface IFocusMenuExtension +{ + /// + /// When true, the menu shall open in a state where the player can see it, or see a notification, + /// but require further action to be manipulate. It is expected that this would be a key that requires pressing + /// to toggle the menu.
+ ///
+ /// Implementations should default this value to true. + ///
+ bool OpenWithFocus { get; set; } + + /// + /// Returns whether or not the player's input is to be received by this menu if it were visible.
+ /// Whether the menu is being occluded by another menu should have no bearing on this value. + ///
+ bool HasFocus { get; } + + /// + /// Returns whether or not this menu's input has never been focused, enabling scenarios such as timing out a menu if + /// it has received no interaction from the player. + /// + bool NeverHadFocus { get; } +}