-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfig.cs
More file actions
55 lines (51 loc) · 1.96 KB
/
Config.cs
File metadata and controls
55 lines (51 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System.Runtime.CompilerServices;
using IPA.Config.Stores;
using IPA.Config.Stores.Attributes;
using NoteCutGuide.Algorithm;
using UnityEngine;
[assembly: InternalsVisibleTo(GeneratedStore.AssemblyVisibilityTarget)]
namespace NoteCutGuide
{
internal class Config
{
public static Config Instance;
public virtual bool Enabled { get; set; } = true;
public virtual float Width { get; set; } = 0.05f;
public virtual float Height { get; set; } = 0.5f;
public virtual float Depth { get; set; } = 0.05f;
public virtual float X { get; set; } = 0f;
public virtual float Y { get; set; } = 0.3f;
public virtual float Z { get; set; } = 0f;
public virtual bool Color { get; set; } = false;
[UseConverter(typeof(ColorConverter))]
public virtual Color Left { get; set; } = new Color(1f, 1f, 1f, 1f);
[UseConverter(typeof(ColorConverter))]
public virtual Color Right { get; set; } = new Color(1f, 1f, 1f, 1f);
public virtual bool HMD { get; set; } = false;
public virtual bool Bloom { get; set; } = false;
public virtual float Brightness { get; set; } = 0.75f;
public virtual bool Rainbow { get; set; } = false;
public virtual float Speed { get; set; } = 0.01f;
/// <summary>
/// This is called whenever BSIPA reads the config from disk (including when file changes are detected).
/// </summary>
public virtual void OnReload()
{
// Do stuff after config is read from disk.
}
/// <summary>
/// Call this to force BSIPA to update the config file. This is also called by BSIPA if it detects the file was modified.
/// </summary>
public virtual void Changed()
{
// Do stuff when the config is changed.
}
/// <summary>
/// Call this to have BSIPA copy the values from <paramref name="other"/> into this config.
/// </summary>
public virtual void CopyFrom(Config other)
{
// This instance's members populated from other
}
}
}