Added UI elements borrowed from DarthAffe

Added a WIP of profile classes
This commit is contained in:
SpoinkyNL committed 2018-01-13 00:06:28 +01:00
1 parent 4f146865a4
commit 6eefa733b4
23 files changed
+847 -108

No files matched your search

@@ -0,0 +1,23 @@
using System.Collections.Generic;
using Artemis.Core.ProfileElements.Interfaces;
using RGB.NET.Core;
namespace Artemis.Core.ProfileElements
{
public class Folder : IProfileElement
{
public List<IProfileElement> Children { get; set; }
public void Update()
{
foreach (var profileElement in Children)
profileElement.Update();
}
public void Render(IRGBDevice rgbDevice)
{
foreach (var profileElement in Children)
profileElement.Render(rgbDevice);
}
}
}
@@ -0,0 +1,23 @@
using System.Collections.Generic;
using RGB.NET.Core;
namespace Artemis.Core.ProfileElements.Interfaces
{
public interface IProfileElement
{
/// <summary>
/// The element's children
/// </summary>
List<IProfileElement> Children { get; set; }
/// <summary>
/// Updates the element
/// </summary>
void Update();
/// <summary>
/// Renders the element
/// </summary>
void Render(IRGBDevice rgbDevice);
}
}
@@ -0,0 +1,21 @@
using System.Collections.Generic;
using Artemis.Core.ProfileElements.Interfaces;
using RGB.NET.Core;
namespace Artemis.Core.ProfileElements
{
public class Profile : IProfileElement
{
public List<IProfileElement> Children { get; set; }
public void Update()
{
}
public void Render(IRGBDevice rgbDevice)
{
foreach (var profileElement in Children)
profileElement.Render(rgbDevice);
}
}
}