-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActions.cs
More file actions
126 lines (97 loc) · 2.84 KB
/
Copy pathActions.cs
File metadata and controls
126 lines (97 loc) · 2.84 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
using APC;
using APCEvents.APCIn;
using state_types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public abstract class IAPCArgs { }
public abstract class APCEvent<APCEventArgs> where APCEventArgs : IAPCArgs
{
private Action<APCEventArgs> _actions = args => { };
public void Subscribe(Action<APCEventArgs> action) => _actions += action;
public void Publish(APCEventArgs message) => _actions(message);
}
namespace APCEvents {
namespace APCOut
{
public class IsConnectedEventArgs : IAPCArgs
{
public bool connected { get; set; }
}
public class IsConnectedEvent : APCEvent<IsConnectedEventArgs> { }
public class BtnId : IAPCArgs
{
public int Id { get; set; }
}
public class BtnPressedEvent : APCEvent<BtnId>
{
}
public class BtnReleasedEvent : APCEvent<BtnId>
{
}
public class SliderChangedEventArgs : IAPCArgs
{
public int id { get; set; }
public int value { get; set; }
}
public class SliderChangedEvent : APCEvent<SliderChangedEventArgs>
{
}
}
namespace UI
{
public class BtnSelectedEventArgs : IAPCArgs
{
public int id { get; set; }
}
public class BtnSelectedEvent : APCEvent<BtnSelectedEventArgs>
{
}
public class ChangeColorInUiEvent: APCEvent<BtnSelectedEventArgs> { }
public class BtnPublishPositionEvent: APCEvent<Position> { }
public class Position: IAPCArgs
{
public Godot.Vector2 pos { get; set; }
}
}
namespace APCIn
{
public class CycleLedEventArgs : IAPCArgs {
public int id { get; set; }
}
public class CycleLedEvent : APCEvent<CycleLedEventArgs> {
}
}
namespace KeyAction
{
public class ShortcutEventArgs : IAPCArgs
{
public Hotkey Hotkey { get; set; }
}
public class ShortcutEvent : APCEvent<ShortcutEventArgs>
{
}
public class TextEventArgs : IAPCArgs
{
public string text { get; set; }
}
public class TextEvent : APCEvent<TextEventArgs>
{
}
public class SetTextEvent : APCEvent<TextEventArgs> { }
public class ShortcutChanged : APCEvent<ShortcutEventArgs>
{
}
public class SelectedModsChangedArgs : IAPCArgs
{
public Keys new_mods { get; set; }
}
public class SelectedModsChanged : APCEvent<SelectedModsChangedArgs> { }
public class SelectedCharChangedArgs : IAPCArgs {
public Keys new_chars { get; set; }
}
public class SelectedCharChanged: APCEvent<SelectedCharChangedArgs> { }
}
}