-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata.lua
More file actions
70 lines (63 loc) · 1.83 KB
/
Copy pathdata.lua
File metadata and controls
70 lines (63 loc) · 1.83 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
local deepcopy = util.table.deepcopy
data:extend({
{type = "item-subgroup", name = "virtual-signal-diplomacy", group = "signals", order = "d"},
{
type = "sprite",
name = "diplomacy_black",
filename = "__diplomacy__/graphics/diplomacy_black.png",
width = 32, height = 32,
flags = {"gui-icon"}
}
})
for _, name in pairs({"enemy", "neutral", "ally", "diplomacy"}) do
data:extend({
{
type = "virtual-signal",
name = name,
localised_name = name,
icon = "__diplomacy__/graphics/" .. name .. ".png",
icon_size = 32,
subgroup = "virtual-signal-diplomacy",
order = "a[diplomacy]-[" .. name .. "]"
}
})
end
local styles = data.raw["gui-style"].default
local slot_button = styles.slot_button
styles.ZD_diplomacy_button = {
type = "button_style",
parent = "slot_button",
tooltip = "mod-name.diplomacy",
default_graphical_set = deepcopy(slot_button.default_graphical_set),
hovered_graphical_set = deepcopy(slot_button.hovered_graphical_set),
clicked_graphical_set = deepcopy(slot_button.clicked_graphical_set)
}
local ZD_diplomacy_button = styles.ZD_diplomacy_button
ZD_diplomacy_button.default_graphical_set.glow = {
top_outer_border_shift = 4,
bottom_outer_border_shift = -4,
left_outer_border_shift = 4,
right_outer_border_shift = -4,
draw_type = "outer",
filename = "__diplomacy__/graphics/diplomacy.png",
flags = {"gui-icon"},
size = 32,
scale = 1
}
ZD_diplomacy_button.hovered_graphical_set.glow.center = {
filename = "__diplomacy__/graphics/diplomacy_black.png",
flags = {"gui-icon"},
size = 32,
scale = 1
}
ZD_diplomacy_button.clicked_graphical_set.glow = {
top_outer_border_shift = 2,
bottom_outer_border_shift = -2,
left_outer_border_shift = 2,
right_outer_border_shift = -2,
draw_type = "outer",
filename = "__diplomacy__/graphics/diplomacy_black.png",
flags = {"gui-icon"},
size = 32,
scale = 1
}