Files
BepInEx/Projects/BanquetForFools/Source/Assembly-CSharp/DrawSettings.cs
2025-05-21 20:40:04 +02:00

85 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
// Token: 0x020000EC RID: 236
public class DrawSettings
{
// Token: 0x06001528 RID: 5416 RVA: 0x00197BA0 File Offset: 0x00195DA0
public DrawSettings()
{
this.undos = new Stack<Color32[]>();
this.redos = new Stack<Color32[]>();
}
// Token: 0x06001529 RID: 5417 RVA: 0x00197BDB File Offset: 0x00195DDB
public void SetDrawColour(Color new_color)
{
this.drawColor = new_color;
}
// Token: 0x0600152A RID: 5418 RVA: 0x00197BE4 File Offset: 0x00195DE4
public void SetLineWidth(int new_width)
{
this.lineWidth = new_width;
}
// Token: 0x0600152B RID: 5419 RVA: 0x00197BF0 File Offset: 0x00195DF0
public void SetAlpha(float amount)
{
Color color = this.drawColor;
color.a = amount;
this.drawColor = color;
}
// Token: 0x0600152C RID: 5420 RVA: 0x00197C13 File Offset: 0x00195E13
public void AddUndo(Color32[] undo)
{
this.undos.Push(undo);
this.redos.Clear();
}
// Token: 0x0600152D RID: 5421 RVA: 0x00197C2C File Offset: 0x00195E2C
public Color32[] Undo(Color32[] newState)
{
Color32[] array = this.undos.Pop();
this.redos.Push(newState);
return array;
}
// Token: 0x0600152E RID: 5422 RVA: 0x00197C45 File Offset: 0x00195E45
public bool CanUndo()
{
return this.undos.Count > 0;
}
// Token: 0x0600152F RID: 5423 RVA: 0x00197C55 File Offset: 0x00195E55
public Color32[] Redo(Color32[] newState)
{
Color32[] array = this.redos.Pop();
this.undos.Push(newState);
return array;
}
// Token: 0x06001530 RID: 5424 RVA: 0x00197C6E File Offset: 0x00195E6E
public bool CanRedo()
{
return this.redos.Count > 0;
}
// Token: 0x0400250C RID: 9484
public Color drawColor = Color.black;
// Token: 0x0400250D RID: 9485
public int lineWidth = 5;
// Token: 0x0400250E RID: 9486
public float transparency = 1f;
// Token: 0x0400250F RID: 9487
public Stack<Color32[]> undos;
// Token: 0x04002510 RID: 9488
public Stack<Color32[]> redos;
}