Class TrayAction
Base class for a Socially Distant system tray applet.
Implements
Inherited Members
Namespace: SociallyDistant.Core.UI.Shell
Assembly: SociallyDistant.Framework.dll
Syntax
public abstract class TrayAction : IGameContentConstructors
TrayAction(IGameContext)
Creates a new instance of the TrayAction class.
Declaration
protected TrayAction(IGameContext context)Parameters
| Type | Name | Description | 
|---|---|---|
| IGameContext | context | Socially Distant's game context. | 
Properties
Context
Gets Socially Distant's game context.
Declaration
protected IGameContext Context { get; }Property Value
| Type | Description | 
|---|---|
| IGameContext | 
Icon
Gets or sets an icon to use for this applet.
Declaration
public CompositeIcon? Icon { get; protected set; }Property Value
| Type | Description | 
|---|---|
| CompositeIcon? | 
PopoverContent
Gets or sets content to be displayed as a tooltip when the player hovers over this applet.
Declaration
public PopoverContent? PopoverContent { get; protected set; }Property Value
| Type | Description | 
|---|---|
| PopoverContent | 
Methods
CanUseInGameMode(GameMode)
Called by the game during game mode changes, to determine if this tray applet should be available.
Declaration
public virtual bool CanUseInGameMode(GameMode gameMode)Parameters
| Type | Name | Description | 
|---|---|---|
| GameMode | gameMode | A GameMode value indicating which game mode Socially Distant is transitioning to. | 
Returns
| Type | Description | 
|---|---|
| bool | True to show the widget, false otherwise. | 
Invoke()
Called when the player clicks the tray applet.
Declaration
public abstract void Invoke()