mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
Add support for custom colors for design display.
This commit is contained in:
parent
ec7a53bee2
commit
2b30a88bf4
13 changed files with 438 additions and 39 deletions
|
|
@ -189,6 +189,19 @@ public class DesignManager
|
|||
_event.Invoke(DesignChanged.Type.ChangedDescription, design, oldDescription);
|
||||
}
|
||||
|
||||
public void ChangeColor(Design design, string newColor)
|
||||
{
|
||||
var oldColor = design.Color;
|
||||
if (oldColor == newColor)
|
||||
return;
|
||||
|
||||
design.Color = newColor;
|
||||
design.LastEdit = DateTimeOffset.UtcNow;
|
||||
_saveService.QueueSave(design);
|
||||
Glamourer.Log.Debug($"Changed color of design {design.Identifier}.");
|
||||
_event.Invoke(DesignChanged.Type.ChangedColor, design, oldColor);
|
||||
}
|
||||
|
||||
/// <summary> Add a new tag to a design. The tags remain sorted. </summary>
|
||||
public void AddTag(Design design, string tag)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue