summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/TFUICheckboxMouseCatcher.cs
blob: 0fe58cb8b7f3ca6060cdac012216ad6ef2837531 (plain)
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
using MPUIKIT;
using UnityEngine;

public class TFUICheckboxMouseCatcher : ThronefallUIElement
{
	public Checkbox target;

	public MPImageBasic targetGraphic;

	public Color defaultColor;

	public Color highlightColor;

	protected override void OnApply()
	{
		target.Toggle();
		targetGraphic.color = highlightColor;
	}

	protected override void OnClear()
	{
		targetGraphic.color = defaultColor;
	}

	protected override void OnFocus()
	{
		targetGraphic.color = highlightColor;
	}

	protected override void OnFocusAndSelect()
	{
		targetGraphic.color = highlightColor;
	}

	protected override void OnHardStateSet(SelectionState selectionState)
	{
	}

	protected override void OnSelect()
	{
		targetGraphic.color = highlightColor;
	}
}