Class Module
Allows you to add support for new games/applications
Inheritance
Implements
Inherited Members
Namespace: Artemis.Core.Modules
Assembly: Artemis.Core.dll
Syntax
public abstract class Module : DataModelPluginFeature, INotifyPropertyChanged, IDisposable
Properties
| Improve this Doc View SourceActivationRequirementMode
Gets or sets the activation requirement mode, defaults to Any
Declaration
public ActivationRequirementType ActivationRequirementMode { get; set; }
Property Value
Type | Description |
---|---|
ActivationRequirementType |
ActivationRequirements
A list of activation requirements
Note: if empty the module is always activated
Declaration
public List<IModuleActivationRequirement> ActivationRequirements { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<IModuleActivationRequirement> |
DefaultPriorityCategory
Gets or sets the default priority category for this module, defaults to Normal
Declaration
public ModulePriorityCategory DefaultPriorityCategory { get; set; }
Property Value
Type | Description |
---|---|
ModulePriorityCategory |
DisplayIcon
The modules display icon that's shown in the UI accepts:
Either set to the name of a Material Icon see (https://materialdesignicons.com for available icons) or set to a path relative to the plugin folder pointing to a .svg file
Declaration
public string DisplayIcon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DisplayName
The modules display name that's shown in the menu
Declaration
public string DisplayName { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
IsActivated
Gets whether this module is activated. A module can only be active while its ActivationRequirements are met
Declaration
public bool IsActivated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsActivatedOverride
Gets whether this module's activation was due to an override, can only be true if IsActivated is true
Declaration
public bool IsActivatedOverride { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUpdateAllowed
Gets whether updating this module is currently allowed
Declaration
public bool IsUpdateAllowed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ModuleTabs
A list of custom module tabs that show in the UI
Declaration
public IEnumerable<ModuleTab> ModuleTabs { get; protected set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ModuleTab> |
Priority
Gets the current priority of this module within its priority category
Declaration
public int Priority { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PriorityCategory
Gets the current priority category of this module
Declaration
public ModulePriorityCategory PriorityCategory { get; }
Property Value
Type | Description |
---|---|
ModulePriorityCategory |
UpdateDuringActivationOverride
Gets whether this module should update while IsActivatedOverride is true. When set to false Update(Double) and any timed updates will not get called during an activation override.
Defaults to false
Declaration
public bool UpdateDuringActivationOverride { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceEvaluateActivationRequirements()
Evaluates the activation requirements following the ActivationRequirementMode and returns the result
Declaration
public bool EvaluateActivationRequirements()
Returns
Type | Description |
---|---|
System.Boolean | The evaluated result of the activation requirements |
ModuleActivated(Boolean)
Called when the ActivationRequirements are met or during an override
Declaration
public abstract void ModuleActivated(bool isOverride)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isOverride | If true, the activation was due to an override. This usually means the module was activated by the profile editor |
ModuleDeactivated(Boolean)
Called when the ActivationRequirements are no longer met or during an override
Declaration
public abstract void ModuleDeactivated(bool isOverride)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isOverride | If true, the deactivation was due to an override. This usually means the module was deactivated by the profile editor |
Render(Double, SKCanvas, SKImageInfo)
Called each frame when the module should render
Declaration
public abstract void Render(double deltaTime, SKCanvas canvas, SKImageInfo canvasInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Double | deltaTime | Time since the last render |
SkiaSharp.SKCanvas | canvas | |
SkiaSharp.SKImageInfo | canvasInfo |
Update(Double)
Called each frame when the module should update
Declaration
public abstract void Update(double deltaTime)
Parameters
Type | Name | Description |
---|---|---|
System.Double | deltaTime | Time in seconds since the last update |