mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Data model - Added data model visualization view model
Debugger - Split debugger into different tabs Debugger - Added data model debugger
This commit is contained in:
1 parent
291a343428
commit
796c0dc671
33 files changed
+565
-236
No files matched your search
@@ -1,10 +1,16 @@
|
||||
using Artemis.Core.Plugins.Abstract.DataModels;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels.Attributes;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Plugins.Modules.General
|
||||
{
|
||||
public class GeneralDataModel : DataModel
|
||||
{
|
||||
public GeneralDataModel()
|
||||
{
|
||||
PlayerInfo = new PlayerInfo();
|
||||
}
|
||||
|
||||
[DataModelProperty(Name = "A test string", Description = "This is a test string that's not of any use outside testing!")]
|
||||
public string TestString { get; set; }
|
||||
|
||||
@@ -13,6 +19,8 @@ namespace Artemis.Plugins.Modules.General
|
||||
|
||||
[DataModelProperty(Name = "Player info", Description = "[TEST] Contains information about the player")]
|
||||
public PlayerInfo PlayerInfo { get; set; }
|
||||
|
||||
public double UpdatesDividedByFour { get; set; }
|
||||
}
|
||||
|
||||
public class PlayerInfo : DataModel
|
||||
@@ -22,5 +30,7 @@ namespace Artemis.Plugins.Modules.General
|
||||
|
||||
[DataModelProperty(Name = "A test boolean", Description = "This is a test boolean that's not of any use outside testing!")]
|
||||
public bool TestBoolean { get; set; }
|
||||
|
||||
public SKPoint Position { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,16 +5,19 @@ using Artemis.Core.Plugins.Abstract.DataModels;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Plugins.Modules.General.ViewModels;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Plugins.Modules.General
|
||||
{
|
||||
public class GeneralModule : ProfileModule<GeneralDataModel>
|
||||
{
|
||||
private readonly PluginSettings _settings;
|
||||
private Random _rand;
|
||||
|
||||
public GeneralModule(PluginSettings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
_rand = new Random();
|
||||
}
|
||||
|
||||
public override IEnumerable<ModuleViewModel> GetViewModels()
|
||||
@@ -22,6 +25,12 @@ namespace Artemis.Plugins.Modules.General
|
||||
return new List<ModuleViewModel> {new GeneralViewModel(this)};
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
DataModel.UpdatesDividedByFour += 0.25;
|
||||
DataModel.PlayerInfo.Position = new SKPoint(_rand.Next(100), _rand.Next(100));
|
||||
}
|
||||
|
||||
public override void EnablePlugin()
|
||||
{
|
||||
DisplayName = "General";
|
||||
|
||||
Reference in new issue
Block a user