Skip to content

Commit bc786e9

Browse files
author
ozelot379
committed
Convert dialog ui
1 parent 2e8323d commit bc786e9

8 files changed

Lines changed: 114 additions & 80 deletions

‎src/converter/BarConverter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class BarConverter extends AbstractConverter {
7676
[
7777
"textures/gui/achievements/nub.png",
7878
"textures/ui/experiencenub.png",
79-
"textures/ui/experience_bar_nub_blue.png",
79+
"textures/ui/experience_bar_nub_blue.png"
8080
]
8181
]
8282
];

‎src/converter/ChestFrontConverter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ChestFrontConverter extends AbstractConverter {
4141
return [
4242
["textures/entity/chest/normal.png", "textures/blocks/chest_front.png"],
4343
["textures/entity/chest/trapped.png", "textures/blocks/trapped_chest_front.png"],
44-
["textures/entity/chest/ender.png", "textures/blocks/ender_chest_front.png"],
44+
["textures/entity/chest/ender.png", "textures/blocks/ender_chest_front.png"]
4545
];
4646
}
4747
}

‎src/converter/ChestSideConverter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ChestSideConverter extends AbstractConverter {
3939
static get DEFAULT_CONVERTER_DATA() {
4040
return [
4141
["textures/entity/chest/normal.png", "textures/blocks/chest_side.png"],
42-
["textures/entity/chest/ender.png", "textures/blocks/ender_chest_side.png"],
42+
["textures/entity/chest/ender.png", "textures/blocks/ender_chest_side.png"]
4343
];
4444
}
4545
}

‎src/converter/DespriteConverter.js‎

Lines changed: 54 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,60 @@ class DespriteConverter extends AbstractConverter {
3636
*/
3737
static get DEFAULT_CONVERTER_DATA() {
3838
return [
39-
// Cartography table
40-
["textures/gui/container/cartography_table.png", 256, [
41-
[176, 0, 66, 66, "textures/ui/cartography_table_map.png"],
42-
[176, 66, 66, 66, "textures/ui/cartography_table_zoom.png"],
43-
[176, 132, 50, 50, "textures/ui/cartography_table_copy.png"],
44-
[0, 166, 66, 66, "textures/ui/cartography_table_glass.png"]
45-
]],
46-
47-
// Hotbar
48-
["textures/gui/widgets.png", 256, [
49-
[0, 0, 1, 22, "textures/ui/hotbar_start_cap.png"],
50-
[1, 0, 20, 22, "textures/ui/hotbar_0.png"],
51-
[21, 0, 20, 22, "textures/ui/hotbar_1.png"],
52-
[41, 0, 20, 22, "textures/ui/hotbar_2.png"],
53-
[61, 0, 20, 22, "textures/ui/hotbar_3.png"],
54-
[81, 0, 20, 22, "textures/ui/hotbar_4.png"],
55-
[101, 0, 20, 22, "textures/ui/hotbar_5.png"],
56-
[121, 0, 20, 22, "textures/ui/hotbar_6.png"],
57-
[141, 0, 20, 22, "textures/ui/hotbar_7.png"],
58-
[161, 0, 20, 22, "textures/ui/hotbar_8.png"],
59-
[181, 0, 1, 22, "textures/ui/hotbar_end_cap.png"],
60-
[0, 22, 24, 24, "textures/ui/pocket_ui_highlight_selected_slot.png"],
61-
[0, 22, 24, 24, "textures/ui/pocket_ui_highlight_slot.png"],
62-
[0, 22, 24, 24, "textures/ui/selected_hotbar_slot.png"]
63-
]],
64-
65-
// Mob effect background
66-
["textures/gui/container/inventory.png", 256, [
67-
[141, 166, 24, 24, "textures/ui/hud_mob_effect_background.png"]
68-
]],
69-
70-
// Recipe book inventory icon
71-
["textures/gui/recipe_button.png", 256, [
72-
[0, 0, 20, 18, "textures/ui/recipe_book_icon.png"]
73-
]]
39+
[
40+
"textures/gui/recipe_button.png",
41+
256,
42+
[
43+
[0, 0, 20, 18, "textures/ui/recipe_book_icon.png"]
44+
]
45+
],
46+
[
47+
"textures/gui/widgets.png",
48+
256,
49+
[
50+
[0, 0, 1, 22, "textures/ui/hotbar_start_cap.png"],
51+
[1, 0, 20, 22, "textures/ui/hotbar_0.png"],
52+
[21, 0, 20, 22, "textures/ui/hotbar_1.png"],
53+
[41, 0, 20, 22, "textures/ui/hotbar_2.png"],
54+
[61, 0, 20, 22, "textures/ui/hotbar_3.png"],
55+
[81, 0, 20, 22, "textures/ui/hotbar_4.png"],
56+
[101, 0, 20, 22, "textures/ui/hotbar_5.png"],
57+
[121, 0, 20, 22, "textures/ui/hotbar_6.png"],
58+
[141, 0, 20, 22, "textures/ui/hotbar_7.png"],
59+
[161, 0, 20, 22, "textures/ui/hotbar_8.png"],
60+
[181, 0, 1, 22, "textures/ui/hotbar_end_cap.png"],
61+
[0, 22, 24, 24, "textures/ui/pocket_ui_highlight_selected_slot.png"],
62+
[0, 22, 24, 24, "textures/ui/pocket_ui_highlight_slot.png"],
63+
[0, 22, 24, 24, "textures/ui/selected_hotbar_slot.png"]
64+
]
65+
],
66+
[
67+
"textures/gui/container/cartography_table.png",
68+
256,
69+
[
70+
[176, 0, 66, 66, "textures/ui/cartography_table_map.png"],
71+
[176, 66, 66, 66, "textures/ui/cartography_table_zoom.png"],
72+
[176, 132, 50, 50, "textures/ui/cartography_table_copy.png"],
73+
[0, 166, 66, 66, "textures/ui/cartography_table_glass.png"]
74+
]
75+
],
76+
[
77+
"textures/gui/container/horse.png",
78+
256,
79+
[
80+
[1, 221, 16, 16, "textures/ui/empty_horse_slot_armor.png"],
81+
[19, 221, 16, 16, "textures/ui/empty_horse_slot_saddle.png"],
82+
[37, 221, 16, 16, "textures/ui/empty_llama_slot_carpet.png"]
83+
]
84+
],
85+
[
86+
"textures/gui/container/inventory.png",
87+
256,
88+
[
89+
[135, 29, 16, 13, "textures/ui/arrow.png"],
90+
[141, 166, 24, 24, "textures/ui/hud_mob_effect_background.png"]
91+
]
92+
]
7493
];
7594
}
7695
}

‎src/converter/DialogConverter.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class DialogConverter extends AbstractConverter {
7878
["textures/ui/dialog_background_hollow_8", [8, 8, 33, 33]],
7979
["textures/ui/dialog_background_opaque", [4, 4, 4, 4]],
8080
["textures/ui/dialog_background_opaque_overlap_bottom", [4, 4, 4, 4]],
81-
["textures/ui/thin_dialog", [6, 6, 6, 6]]
81+
["textures/ui/menubackground", [4, 4, 4, 4]],
82+
["textures/ui/thin_dialog", [5, 5, 5, 5]]
8283
]]
8384
]]
8485
];
Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {AbstractConverter} from "./AbstractConverter";
22

33
/**
4-
* Class ButtonConverter
4+
* Class NineSliceConverter
55
*/
6-
class ButtonConverter extends AbstractConverter {
6+
class NineSliceConverter extends AbstractConverter {
77
/**
88
* @inheritDoc
99
*/
@@ -94,9 +94,58 @@ class ButtonConverter extends AbstractConverter {
9494
[
9595
"textures/ui/focus_border_selected",
9696
"textures/ui/focus_border_white",
97+
"textures/ui/pack_borders",
98+
"textures/ui/pause_screen_border",
99+
"textures/ui/square_image_border_white",
97100
"textures/ui/world_screenshot_focus_border"
98101
]
99102
],
103+
[
104+
"textures/gui/container/generic_54.png",
105+
256,
106+
[
107+
[7, 17, 18, 18, 5, [
108+
"textures/ui/cell_image",
109+
"textures/ui/recipe_book_item_bg"
110+
]],
111+
[2, 2, 1, 1, 0, [
112+
"textures/ui/dialog_divider",
113+
"textures/ui/divider",
114+
"textures/ui/divider2",
115+
"textures/ui/divider3",
116+
"textures/ui/HowToPlayDivider",
117+
"textures/ui/lightgreybars",
118+
"textures/ui/list_item_divider_line_light",
119+
"textures/ui/StoreTopBar",
120+
"textures/ui/StoreTopBarFiller"
121+
]]
122+
],
123+
[
124+
"textures/ui/recipe_book_pane_bg",
125+
"textures/ui/recipe_book_touch_cell_selected"
126+
]
127+
],
128+
[
129+
"textures/gui/container/inventory.png",
130+
256,
131+
[
132+
[25, 7, 51, 72, 5, [
133+
"textures/ui/player_preview_border"
134+
]]
135+
],
136+
[]
137+
],
138+
[
139+
"textures/gui/container/creative_inventory/tab_item_search.png",
140+
256,
141+
[
142+
[80, 4, 90, 12, 5, [
143+
"textures/ui/edit_box_indent",
144+
"textures/ui/edit_box_indent_hover"
145+
]]
146+
],
147+
[]
148+
],
100149
[
101150
"textures/gui/container/creative_inventory/tabs.png",
102151
256,
@@ -142,44 +191,9 @@ class ButtonConverter extends AbstractConverter {
142191
]]
143192
],
144193
[]
145-
],
146-
[
147-
"textures/gui/container/generic_54.png",
148-
256,
149-
[
150-
[7, 17, 18, 18, 5, [
151-
"textures/ui/cell_image",
152-
"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"
163-
]]
164-
],
165-
[
166-
"textures/ui/recipe_book_pane_bg",
167-
"textures/ui/recipe_book_touch_cell_selected"
168-
]
169-
],
170-
[
171-
"textures/gui/container/creative_inventory/tab_item_search.png",
172-
256,
173-
[
174-
[79, 3, 92, 14, 5, [
175-
"textures/ui/edit_box_indent",
176-
"textures/ui/edit_box_indent_hover"
177-
]]
178-
],
179-
[]
180194
]
181195
];
182196
}
183197
}
184198

185-
export {ButtonConverter};
199+
export {NineSliceConverter};

‎src/converter/PlaceholderConverter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class PlaceholderConverter extends AbstractConverter {
107107
// Zombie
108108
["textures/entity/pig/pigzombie.png", 0, 0, 64, 32, 64, "textures/entity/pig/pigzombie.png", true],
109109
["textures/entity/zombie/husk.png", 0, 0, 64, 32, 64, "textures/entity/zombie/husk.png", true],
110-
["textures/entity/zombie/zombie.png", 0, 0, 64, 32, 64, "textures/entity/zombie/zombie.png", true],
110+
["textures/entity/zombie/zombie.png", 0, 0, 64, 32, 64, "textures/entity/zombie/zombie.png", true]
111111
];
112112
}
113113
}

‎src/converter/converters.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {BannerPatternConverter} from "./BannerPatternConverter";
55
import {BarConverter} from "./BarConverter";
66
import {BedConverter} from "./BedConverter";
77
import {BeeConverter} from "./BeeConverter";
8-
import {ButtonConverter} from "./ButtonConverter";
98
import {ChestFrontConverter} from "./ChestFrontConverter";
109
import {ChestLeftRightDoubleConverter} from "./ChestLeftRightDoubleConverter";
1110
import {ChestNormalConverter} from "./ChestNormalConverter";
@@ -24,6 +23,7 @@ import {FoxConverter} from "./FoxConverter";
2423
import {HorseConverter} from "./HorseConverter";
2524
import {MapIconsConverter} from "./MapIconsConverter";
2625
import {MetadataConverter} from "./MetadataConverter";
26+
import {NineSliceConverter} from "./NineSliceConverter";
2727
import {OpaqueConverter} from "./OpaqueConverter";
2828
import {OverlayToTranslateConverter} from "./OverlayToTranslateConverter";
2929
import {Particles1_13Converter} from "./Particles1_13Converter";
@@ -72,7 +72,7 @@ const converters = [
7272
...TitleConverter.getDefaultConverters(),
7373
...DespriteConverter.getDefaultConverters(),
7474
...BarConverter.getDefaultConverters(),
75-
...ButtonConverter.getDefaultConverters(),
75+
...NineSliceConverter.getDefaultConverters(),
7676
...DialogConverter.getDefaultConverters(),
7777
...OverlayToTranslateConverter.getDefaultConverters(),
7878
...ColorizeOverlayConverter.getDefaultConverters(),

0 commit comments

Comments
 (0)