Skip to content

Commit 8592d05

Browse files
author
ozelot379
committed
Convert dialog ui
1 parent 698fcb0 commit 8592d05

1 file changed

Lines changed: 23 additions & 13 deletions

File tree

‎src/converter/ButtonConverter.js‎

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ class ButtonConverter extends AbstractConverter {
2020

2121
const factor = (image_from.getWidth() / factor_detect);
2222

23-
for (const [x, y, width, height, tos] of buttons) {
23+
for (const [x, y, width, height, nineslice_size, tos] of buttons) {
2424
const image = image_from.clone().crop((x * factor), (y * factor), (width * factor), (height * factor));
2525

2626
image.autoCropTransparent();
2727

2828
const metadata = {
29-
nineslice_size: 5,
29+
nineslice_size,
3030
base_size: [width, height]
3131
};
3232

@@ -64,21 +64,21 @@ class ButtonConverter extends AbstractConverter {
6464
"textures/gui/widgets.png",
6565
256,
6666
[
67-
[0, 46, 200, 20, [
67+
[0, 46, 200, 20, 5, [
6868
"textures/ui/button_borderless_darkpressednohover",
6969
"textures/ui/button_borderless_lightpressednohover",
7070
"textures/ui/disabledButtonNoBorder",
7171
"textures/ui/recipe_book_button_borderless_lightpressednohover"
7272
]],
73-
[0, 66, 200, 20, [
73+
[0, 66, 200, 20, 5, [
7474
"textures/ui/button_borderless_dark",
7575
"textures/ui/button_borderless_light",
7676
"textures/ui/pocket_button_default",
7777
"textures/ui/recipe_book_button_borderless_light",
7878
"textures/ui/recipe_book_dark_button",
7979
"textures/ui/recipe_book_light_button"
8080
]],
81-
[0, 86, 200, 20, [
81+
[0, 86, 200, 20, 5, [
8282
"textures/ui/button_borderless_darkhover",
8383
"textures/ui/button_borderless_darkpressed",
8484
"textures/ui/button_borderless_lighthover",
@@ -101,20 +101,20 @@ class ButtonConverter extends AbstractConverter {
101101
"textures/gui/container/creative_inventory/tabs.png",
102102
256,
103103
[
104-
[0, 0, 28, 32, [
104+
[0, 0, 28, 32, 5, [
105105
"textures/ui/pocket_tab_left_side",
106106
"textures/ui/recipe_book_side_toggle_dark",
107107
"textures/ui/TabLeftBack",
108108
"textures/ui/TabLeftBackBottomMost",
109109
"textures/ui/TabLeftBackTopMost",
110110
"textures/ui/TabTopBackLeftMost"
111111
]],
112-
[28, 0, 28, 32, [
112+
[28, 0, 28, 32, 5, [
113113
"textures/ui/recipe_back_panel",
114114
"textures/ui/TabTopBack",
115115
"textures/ui/toolbar_background"
116116
]],
117-
[140, 0, 28, 32, [
117+
[140, 0, 28, 32, 5, [
118118
"textures/ui/pocket_tab_right_side",
119119
"textures/ui/TabRightBack",
120120
"textures/ui/TabRightBackBottomMost",
@@ -123,17 +123,17 @@ class ButtonConverter extends AbstractConverter {
123123
"textures/ui/TabTopBackRightMostDark",
124124
"textures/ui/XTab"
125125
]],
126-
[0, 32, 28, 32, [
126+
[0, 32, 28, 32, 5, [
127127
"textures/ui/recipe_book_side_toggle_dark_hover",
128128
"textures/ui/TabLeftFront",
129129
"textures/ui/TabLeftFrontBottomMost",
130130
"textures/ui/TabLeftFrontTopMost",
131131
"textures/ui/TabTopFrontLeftMost"
132132
]],
133-
[28, 32, 28, 32, [
133+
[28, 32, 28, 32, 5, [
134134
"textures/ui/TabTopFront"
135135
]],
136-
[140, 32, 28, 32, [
136+
[140, 32, 28, 32, 5, [
137137
"textures/ui/TabRightFront",
138138
"textures/ui/TabRightFrontBottomMost",
139139
"textures/ui/TabRightFrontTopMost",
@@ -147,9 +147,19 @@ class ButtonConverter extends AbstractConverter {
147147
"textures/gui/container/generic_54.png",
148148
256,
149149
[
150-
[7, 17, 18, 18, [
150+
[7, 17, 18, 18, 5, [
151151
"textures/ui/cell_image",
152152
"textures/ui/recipe_book_item_bg"
153+
]],
154+
[2, 2, 1, 1, 0, [
155+
"textures/ui/dialog_divider",
156+
"textures/ui/divider",
157+
"textures/ui/divider2",
158+
"textures/ui/divider3",
159+
"textures/ui/HowToPlayDivider",
160+
"textures/ui/list_item_divider_line_light",
161+
"textures/ui/StoreTopBar",
162+
"textures/ui/StoreTopBarFiller"
153163
]]
154164
],
155165
[
@@ -161,7 +171,7 @@ class ButtonConverter extends AbstractConverter {
161171
"textures/gui/container/creative_inventory/tab_item_search.png",
162172
256,
163173
[
164-
[79, 3, 92, 14, [
174+
[79, 3, 92, 14, 5, [
165175
"textures/ui/edit_box_indent",
166176
"textures/ui/edit_box_indent_hover"
167177
]]

0 commit comments

Comments
 (0)