forked from Haplo064/ChatTranslator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHandy.cs
More file actions
53 lines (46 loc) · 1.67 KB
/
Handy.cs
File metadata and controls
53 lines (46 loc) · 1.67 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
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Plugin;
namespace ChatTranslator
{
public partial class ChatTranslator
{
private void SaveConfig()
{
_configuration.Lang = _languageInt;
_configuration.Channels = _channels;
_configuration.NotSelf = _notSelf;
_configuration.Whitelist = _whitelist;
_configuration.ChosenLanguages = _chosenLanguages;
_configuration.OneChan = _oneChan;
_configuration.OneInt = _oneInt;
_configuration.TextColour = _textColour;
_configuration.Blacklist = _blacklist;
_configuration.TranMode = _tranMode;
_pluginInterface.SavePluginConfig(_configuration);
}
private void PrintChat(XivChatType type, string senderName, SeString messageSeString)
{
var chat = new XivChatEntry
{
Type = type,
Name = senderName,
MessageBytes = messageSeString.Encode()
};
_pluginInterface.Framework.Gui.Chat.PrintChat(chat);
}
public void PrintChatToLog(SeString debugMe)
{
PluginLog.Log("=================");
PluginLog.Log($"{debugMe.TextValue}");
foreach (var pl in debugMe.Payloads)
{
PluginLog.Log($"TYPE: {pl.Type}");
if (pl.Type != PayloadType.UIForeground) continue;
var pl2 = (UIForegroundPayload)pl;
PluginLog.Log($"--COL:{pl2.UIColor.UIForeground}");
}
}
}
}