z_mirror/TaskList

git clone https://git.raiguard.me/z_mirror/TaskList

Caleb HeuerFix shortcut prototype errors4b09963

trunk
2.6 KiB102 linesraw
1data:extend({
2  { type = "custom-input", name = "tlst-toggle-gui", key_sequence = "CONTROL + T", action = "lua" },
3  { type = "custom-input", name = "tlst-new-task", key_sequence = "", action = "lua" },
4  { type = "custom-input", name = "tlst-linked-confirm-gui", key_sequence = "", linked_game_control = "confirm-gui" },
5  {
6    type = "shortcut",
7    name = "tlst-toggle-gui",
8    icon = "__TaskList__/graphics/tasks-dark-x32.png",
9    icon_size = 32,
10    small_icon = "__TaskList__/graphics/tasks-dark-x24.png",
11    small_icon_size = 24,
12    toggleable = true,
13    associated_control_input = "tlst-toggle-gui",
14    action = "lua",
15  },
16  {
17    type = "shortcut",
18    name = "tlst-new-task",
19    icon = "__TaskList__/graphics/new-task-dark-x32.png",
20    icon_size = 32,
21    small_icon = "__TaskList__/graphics/new-task-dark-x24.png",
22    small_icon_size = 24,
23    toggleable = true,
24    associated_control_input = "tlst-new-task",
25    action = "lua",
26  },
27  {
28    type = "sprite",
29    name = "tlst_arrow_up",
30    filename = "__TaskList__/graphics/tool-icons.png",
31    position = { 0, 0 },
32    size = 32,
33    mipmap_count = 2,
34    flags = { "icon" },
35  },
36  {
37    type = "sprite",
38    name = "tlst_arrow_down",
39    filename = "__TaskList__/graphics/tool-icons.png",
40    position = { 0, 32 },
41    size = 32,
42    mipmap_count = 2,
43    flags = { "icon" },
44  },
45  {
46    type = "sprite",
47    name = "tlst_arrow_right",
48    filename = "__TaskList__/graphics/tool-icons.png",
49    position = { 0, 64 },
50    size = 32,
51    mipmap_count = 2,
52    flags = { "icon" },
53  },
54})
55
56local styles = data.raw["gui-style"]["default"]
57
58styles.tlst_description_frame = {
59  type = "frame_style",
60  padding = 6,
61  top_padding = 4,
62  graphical_set = {
63    base = {
64      position = { 85, 0 },
65      corner_size = 8,
66      center = { position = { 42, 8 }, width = 1, height = 1 },
67      draw_type = "outer",
68    },
69    shadow = default_inner_shadow,
70  },
71}
72
73styles.tlst_red_dialog_button = {
74  type = "button_style",
75  parent = "dialog_button",
76  default_graphical_set = styles.red_button.default_graphical_set,
77  hovered_graphical_set = styles.red_button.hovered_graphical_set,
78  clicked_graphical_set = styles.red_button.clicked_graphical_set,
79}
80
81styles.tlst_tasks_scroll_pane = {
82  type = "scroll_pane_style",
83  parent = "flib_naked_scroll_pane",
84  top_padding = 8,
85  bottom_padding = 8,
86  vertical_flow_style = {
87    type = "vertical_flow_style",
88  },
89}
90
91styles.tlst_task_item_flow = {
92  type = "horizontal_flow_style",
93  height = 24,
94  vertical_align = "center",
95}
96
97styles.tlst_new_task_label = {
98  type = "label_style",
99  font = "default-semibold",
100  font_color = { 128, 206, 240 },
101  hovered_font_color = { 154, 250, 255 },
102}