Repository navigation
Expand file tree
/
Copy pathdata.lua
More file actions
49 lines (46 loc) · 1.44 KB
/
Copy pathdata.lua
File metadata and controls
49 lines (46 loc) · 1.44 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
data:extend({
{
type = "sprite",
name = "improved-display-panel-open-icon",
filename = "__improved-display-panel__/button_open_icon.png",
priority = "extra-high-no-scale",
size = 64,
scale = 0.5,
flags = {"gui-icon"},
},
})
local function drag_handle_graphical_set(tint)
local function part(position, size)
local result = {position = position, size = size}
if tint then
result.tint = tint
end
return result
end
return {
base = {
top = part({192, 8}, {8, 7}),
top_tiling = true,
center = part({200, 8}, {8, 8}),
center_tiling_horizontal = true,
bottom = part({208, 8}, {8, 8}),
bottom_tiling = true,
},
}
end
local styles = data.raw["gui-style"].default
styles.improved_display_panel_drag_handle = {
type = "button_style",
parent = "button",
size = {28, 32},
padding = 0,
clicked_vertical_offset = 0,
default_graphical_set = drag_handle_graphical_set(),
hovered_graphical_set = drag_handle_graphical_set({220, 220, 220}),
clicked_graphical_set = drag_handle_graphical_set({255, 205, 105}),
selected_graphical_set = drag_handle_graphical_set({255, 205, 105}),
selected_hovered_graphical_set = drag_handle_graphical_set({255, 225, 150}),
selected_clicked_graphical_set = drag_handle_graphical_set({255, 205, 105}),
disabled_graphical_set = drag_handle_graphical_set({100, 100, 100}),
left_click_sound = "__core__/sound/gui-tool-button.ogg",
}