-
Notifications
You must be signed in to change notification settings - Fork 8
/
Classes.cs
190 lines (172 loc) · 5.84 KB
/
Classes.cs
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using Dalamud.Game.Chat;
using Dalamud.Game.Chat.SeStringHandling;
using Dalamud.Plugin;
using Dalamud.Game.Command;
using IvanAkcheurov.NTextCat.Lib;
using Yandex;
using ImGuiNET;
using GoogleTranslateFreeApi;
using System.IO;
using System.Runtime.CompilerServices;
using Dalamud.Configuration;
using Num = System.Numerics;
using System.Collections.Concurrent;
namespace DalamudPlugin
{
public partial class ChatExtenderPlugin : IDalamudPlugin
{
public class ChatExtenderPluginConfiguration : IPluginConfiguration
{
public int Version { get; set; } = 0;
public string YandexKey { get; set; }
public List<TabBase> Items { get; set; }
public bool Inject { get; set; }
public int? Translator { get; set; }
public bool Extender { get; set; }
public float Alpha { get; set; }
public Num.Vector4[] ChanColour { get; set; }
public Num.Vector4[] LogColour { get; set; }
public string LTr { get; set; }
public string RTr { get; set; }
public bool NoMouse { get; set; }
public bool NoMouse2 { get; set; }
public bool NoMove { get; set; }
public bool NoResize { get; set; }
public bool NoScrollBar { get; set; }
public int? Space_Hor { get; set; }
public int? Space_Ver { get; set; }
public Num.Vector4 TimeColour { get; set; }
public Num.Vector4 NameColour { get; set; }
public Highlighter High { get; set; }
public String[] Chan { get; set; }
public bool AllowTranslation { get; set; }
public Num.Vector4[] BubbleColour { get; set; }
public bool[] BubbleEnable { get; set; }
public bool BubblesWindow { get; set; }
public int? FontSize { get; set; }
public bool HourTime { get; set; }
public bool FontShadow { get; set; }
public int? BubbleTime { get; set; }
}
public class TabBase
{
public string Title;
public ConcurrentQueue<ChatText> Chat;
public bool Enabled;
public bool[] Logs = {
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false, false,
false, false, false, false
};
public bool[] Chans = {
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true, true,
true, true, true, true
};
// 0 = Timestamp
// 1 = Channel
// 2 = Translate
// 3 = Write
// 4-9 = placeholders
public bool[] Config = { false, false, false, false,false,false,false,false,false,false };
public bool AutoScroll = true;
public bool Scroll = false;
public string Filter = "";
public bool FilterOn = false;
public bool msg = false;
public bool sel = false;
}
public class TextTypes
{
public string Text;
public PayloadType Type;
public Payload Payload;
}
public class Highlighter
{
public string[] highlights = {"words,to,highlight"};
public int htA = 120;
public int htB = 255;
public int htG = 255;
public int htR = 255;
public uint colour;
}
public class ChatText
{
public string Time;
public string Channel;
public string ChannelShort;
public string Sender;
public List<TextTypes> Text = new List<TextTypes>();
public bool Selected;
public int ChannelColour;
public DateTime DateTime;
public uint SenderId;
}
public class BubbleOffset
{
public int x = 0;
public int y = 0;
public Num.Vector2 Pos;
public float Width;
public float Height;
public string name;
public int extra;
}
public class BoundingBox
{
public Num.Vector2 min;
public Num.Vector2 max;
}
public class DynTab : TabBase
{
public DynTab(string title, ConcurrentQueue<ChatText> chat, bool enabled)
{
Title = title;
Chat = chat;
Enabled = enabled;
}
}
enum Race
{
Hyur,
Elezen,
Lalafell,
Miqote,
Roegadyn,
AuRa,
Hrothgar,
Viera
}
enum Gender
{
Male,
Female
}
}
}