forked from ESOUIMods/ESO_QuestMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_notes.txt
72 lines (63 loc) · 2.84 KB
/
dev_notes.txt
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
local defaults =
{
["pin_colors"] = {
[PIN_TYPE_QUEST_UNCOMPLETED] =
{
color = { 1, 1, 1 },
suffix = "(UN)",
},
[PIN_TYPE_QUEST_COMPLETED] =
{
color = { 1, 1, 1 },
suffix = "(CM)",
},
-- more
},
["pin_tooltip_colors"] = {
[PIN_TYPE_QUEST_UNCOMPLETED] = { 1, 1, 1 },
[PIN_TYPE_QUEST_COMPLETED] = { 1, 1, 1 },
}
}
local sv = ZO_SavedVars:NewAccountWide("YourAddon", 1, nil, defaults)
local QUEST_NAME_LAYOUT = {
[PIN_TYPE_QUEST_UNCOMPLETED] =
{
color = ZO_ColorDef:New(unpack(type(sv.PIN_TYPE_QUEST_UNCOMPLETED["pin_colors"]) == "table" and sv.PIN_TYPE_QUEST_UNCOMPLETED["pin_colors"].color or defaults.color["pin_colors"])),
tooltipColor = ZO_ColorDef:New(unpack(type(sv.PIN_TYPE_QUEST_UNCOMPLETED["pin_colors"]) == "table" and sv.PIN_TYPE_QUEST_UNCOMPLETED["pin_colors"].color or defaults.color["pin_colors"])),
suffix = "(UN)",
},
[PIN_TYPE_QUEST_COMPLETED] =
{
color = ZO_ColorDef:New(unpack(type(sv.PIN_TYPE_QUEST_COMPLETED["pin_colors"]) == "table" and sv.PIN_TYPE_QUEST_COMPLETED["pin_colors"].color or defaults.color["pin_colors"])),
tooltipColor = ZO_ColorDef:New(unpack(type(sv.PIN_TYPE_QUEST_UNCOMPLETED["pin_tooltip_colors"]) == "table" and sv.PIN_TYPE_QUEST_UNCOMPLETED["pin_tooltip_colors"].color or defaults.color["pin_tooltip_colors"])),
suffix = "(CM)",
},
-- more
}
function QuestMap:RefreshPinLayout()
LMP:SetLayoutKey(PIN_TYPE_QUEST_UNCOMPLETED, "size", QuestMap.settings.pinSize)
LMP:SetLayoutKey(PIN_TYPE_QUEST_UNCOMPLETED, "level", QuestMap.settings.pinLevel+PIN_PRIORITY_OFFSET)
LMP:SetLayoutKey(PIN_TYPE_QUEST_UNCOMPLETED, "texture", QuestMap.iconSets[QuestMap.settings.iconSet][1])
LMP:SetLayoutKey(PIN_TYPE_QUEST_UNCOMPLETED, "tint", QUEST_NAME_LAYOUT[PIN_TYPE_QUEST_UNCOMPLETED]["pin_colors"].color)
LMP:RefreshPins(PIN_TYPE_QUEST_UNCOMPLETED)
-- more
end
-- pin color
getFunc = function() return
QUEST_NAME_LAYOUT[PIN_TYPE_QUEST_COMPLETED]["pin_colors"].color:UnpackRGB()
end,
setFunc = function(r,g,b,a)
QUEST_NAME_LAYOUT[PIN_TYPE_QUEST_COMPLETED]["pin_colors"].color:SetRGB(r, g, b)
sv.PIN_TYPE_QUEST_COMPLETED.color = { QUEST_NAME_LAYOUT[PIN_TYPE_QUEST_COMPLETED]["pin_colors"].color:UnpackRGB() }
QuestMap:RefreshPinLayout()
end,
local function FormatQuestName(questName, questNameLayoutType)
local layout = QuestMap.QUEST_NAME_LAYOUT[questNameLayoutType]
local color = layout.tooltipColor
local suffix = layout.suffix
return color:Colorize(string.format("%s %s", questName, suffix))
end
local function FormatQuestName(questName, questNameLayoutType)
local layout = QuestMap.QUEST_NAME_LAYOUT[questNameLayoutType]
return layout.tooltipColor:Colorize(string.format("%s %s", questName, layout.suffix))
end