2019-09-16 12:27:28 +02:00
|
|
|
package com.simibubi.create;
|
2019-07-11 09:03:08 +02:00
|
|
|
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.client.gui.AbstractGui;
|
2019-12-13 20:52:42 +01:00
|
|
|
import net.minecraft.client.gui.screen.Screen;
|
2019-07-11 09:03:08 +02:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2020-03-09 01:06:34 +01:00
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
2019-07-11 09:03:08 +02:00
|
|
|
|
2019-07-19 17:50:23 +02:00
|
|
|
public enum ScreenResources {
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
// Inventories
|
|
|
|
PLAYER_INVENTORY("player_inventory.png", 176, 108),
|
|
|
|
WAND_SYMMETRY("wand_symmetry.png", 207, 58),
|
2020-03-05 19:52:10 +01:00
|
|
|
BLOCKZAPPER("zapper.png", 217, 70),
|
|
|
|
TERRAINZAPPER("zapper.png", 0, 70, 217, 105),
|
|
|
|
TERRAINZAPPER_INACTIVE_PARAM("zapper.png", 0, 175, 14, 14),
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-11 19:55:11 +02:00
|
|
|
SCHEMATIC_TABLE("schematic_table.png", 207, 89),
|
|
|
|
SCHEMATIC_TABLE_PROGRESS("schematic_table.png", 209, 0, 24, 17),
|
2019-07-15 13:45:13 +02:00
|
|
|
SCHEMATIC("schematic.png", 207, 95),
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2020-02-08 20:02:14 +01:00
|
|
|
SCHEMATICANNON_BG("schematicannon.png", 247, 161),
|
|
|
|
SCHEMATICANNON_BG_FUEL("schematicannon.png", 247, 161),
|
2019-07-16 16:01:51 +02:00
|
|
|
SCHEMATICANNON_PROGRESS("schematicannon.png", 0, 161, 121, 16),
|
|
|
|
SCHEMATICANNON_PROGRESS_2("schematicannon.png", 122, 161, 16, 15),
|
|
|
|
SCHEMATICANNON_HIGHLIGHT("schematicannon.png", 0, 182, 28, 28),
|
|
|
|
SCHEMATICANNON_FUEL("schematicannon.png", 0, 215, 82, 4),
|
2019-07-11 09:03:08 +02:00
|
|
|
|
2019-08-26 20:17:16 +02:00
|
|
|
FLEXCRATE("flex_crate_and_stockpile_switch.png", 125, 129),
|
2020-01-24 22:55:20 +01:00
|
|
|
FLEXCRATE_DOUBLE("double_flexcrate.png", 197, 129),
|
2019-08-26 20:17:16 +02:00
|
|
|
FLEXCRATE_LOCKED_SLOT("flex_crate_and_stockpile_switch.png", 138, 0, 18, 18),
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-08-26 20:17:16 +02:00
|
|
|
STOCKSWITCH("flex_crate_and_stockpile_switch.png", 0, 129, 205, 93),
|
|
|
|
STOCKSWITCH_INTERVAL("flex_crate_and_stockpile_switch.png", 0, 222, 198, 17),
|
|
|
|
STOCKSWITCH_INTERVAL_END("flex_crate_and_stockpile_switch.png", 0, 239, 198, 17),
|
|
|
|
STOCKSWITCH_CURSOR_ON("flex_crate_and_stockpile_switch.png", 218, 129, 8, 21),
|
|
|
|
STOCKSWITCH_CURSOR_OFF("flex_crate_and_stockpile_switch.png", 226, 129, 8, 21),
|
|
|
|
STOCKSWITCH_BOUND_LEFT("flex_crate_and_stockpile_switch.png", 234, 129, 7, 21),
|
|
|
|
STOCKSWITCH_BOUND_RIGHT("flex_crate_and_stockpile_switch.png", 241, 129, 7, 21),
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2020-01-19 19:29:39 +01:00
|
|
|
FILTER("filter.png", 200, 100),
|
|
|
|
ATTRIBUTE_FILTER("filter.png", 0, 100, 200, 86),
|
2020-03-09 01:06:34 +01:00
|
|
|
|
2019-10-05 19:00:43 +02:00
|
|
|
// Logistical Index
|
|
|
|
INDEX_TOP("index.png", 41, 0, 174, 22),
|
|
|
|
INDEX_TOP_TRIM("index.png", 41, 22, 174, 6),
|
|
|
|
INDEX_MIDDLE("index.png", 41, 28, 183, 178),
|
|
|
|
INDEX_BOTTOM_TRIM("index.png", 41, 206, 174, 6),
|
|
|
|
INDEX_BOTTOM("index.png", 41, 212, 181, 44),
|
|
|
|
INDEX_SCROLLER_TOP("index.png", 224, 31, 10, 6),
|
|
|
|
INDEX_SCROLLER_MIDDLE("index.png", 224, 37, 10, 6),
|
|
|
|
INDEX_SCROLLER_BOTTOM("index.png", 224, 43, 10, 6),
|
|
|
|
INDEX_TAB("index.png", 0, 55, 22, 22),
|
|
|
|
INDEX_TAB_ACTIVE("index.png", 0, 77, 22, 22),
|
|
|
|
INDEX_SEARCH("index.png", 0, 99, 28, 19),
|
|
|
|
INDEX_SEARCH_OVERLAY("widgets.png", 0, 81, 176, 20),
|
|
|
|
|
2019-10-06 21:49:44 +02:00
|
|
|
LOGISTICAL_CONTROLLER_TRIM("controller.png", 178, 6),
|
|
|
|
LOGISTICAL_CONTROLLER("controller.png", 0, 6, 185, 71),
|
|
|
|
|
|
|
|
ITEM_COUNT_SCROLLAREA("controller.png", 62, 83, 22, 10),
|
|
|
|
BIG_SLOT("controller.png", 0, 83, 26, 26),
|
|
|
|
SHIPPING_SLOT("controller.png", 26, 83, 18, 21),
|
|
|
|
RECEIVING_SLOT("controller.png", 44, 83, 18, 21),
|
2019-10-05 19:00:43 +02:00
|
|
|
SLOT_FRAME("index.png", 0, 118, 18, 18),
|
|
|
|
SLOT_INNER("index.png", 18, 118, 18, 18),
|
|
|
|
DISABLED_SLOT_FRAME("index.png", 0, 136, 18, 18),
|
|
|
|
DISABLED_SLOT_INNER("index.png", 18, 136, 18, 18),
|
|
|
|
CRAFTY_SLOT_FRAME("index.png", 0, 154, 18, 18),
|
|
|
|
CRAFTY_SLOT_INNER("index.png", 18, 154, 18, 18),
|
|
|
|
SELECTED_SLOT_INNER("index.png", 18, 172, 18, 18),
|
|
|
|
|
2019-09-16 12:27:28 +02:00
|
|
|
// JEI
|
2019-12-13 20:52:42 +01:00
|
|
|
JEI_SLOT("jei/widgets.png", 18, 18),
|
2020-01-27 14:57:21 +01:00
|
|
|
JEI_CATALYST_SLOT("jei/widgets.png", 0, 156, 18, 18),
|
2019-12-13 20:52:42 +01:00
|
|
|
JEI_ARROW("jei/widgets.png", 19, 10, 42, 10),
|
|
|
|
JEI_LONG_ARROW("jei/widgets.png", 19, 0, 71, 10),
|
|
|
|
JEI_DOWN_ARROW("jei/widgets.png", 0, 21, 18, 14),
|
|
|
|
JEI_LIGHT("jei/widgets.png", 0, 42, 52, 11),
|
2020-01-27 23:25:59 +01:00
|
|
|
JEI_QUESTION_MARK("jei/widgets.png", 0, 178, 12, 16),
|
2019-12-13 20:52:42 +01:00
|
|
|
JEI_SHADOW("jei/widgets.png", 0, 56, 52, 11),
|
|
|
|
BLOCKZAPPER_UPGRADE_RECIPE("jei/widgets.png", 0, 75, 144, 66),
|
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
// Widgets
|
|
|
|
PALETTE_BUTTON("palette_picker.png", 0, 236, 20, 20),
|
|
|
|
TEXT_INPUT("widgets.png", 0, 28, 194, 47),
|
|
|
|
BUTTON("widgets.png", 18, 18),
|
|
|
|
BUTTON_HOVER("widgets.png", 18, 0, 18, 18),
|
|
|
|
BUTTON_DOWN("widgets.png", 36, 0, 18, 18),
|
|
|
|
INDICATOR("widgets.png", 0, 18, 18, 5),
|
|
|
|
INDICATOR_WHITE("widgets.png", 18, 18, 18, 5),
|
|
|
|
INDICATOR_GREEN("widgets.png", 0, 23, 18, 5),
|
|
|
|
INDICATOR_YELLOW("widgets.png", 18, 23, 18, 5),
|
|
|
|
INDICATOR_RED("widgets.png", 36, 23, 18, 5),
|
|
|
|
GRAY("background.png", 0, 0, 16, 16),
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-15 12:10:57 +02:00
|
|
|
BLUEPRINT_SLOT("widgets.png", 90, 0, 24, 24),
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
// Icons
|
2019-10-06 21:49:44 +02:00
|
|
|
I_ADD(0, 0),
|
2020-02-19 14:08:49 +01:00
|
|
|
I_TRASH(1, 0),
|
|
|
|
I_3x3(2, 0),
|
|
|
|
I_TARGET(3, 0),
|
|
|
|
I_PRIORITY_VERY_LOW(4, 0),
|
|
|
|
I_PRIORITY_LOW(5, 0),
|
|
|
|
I_PRIORITY_HIGH(6, 0),
|
|
|
|
I_PRIORITY_VERY_HIGH(7, 0),
|
|
|
|
I_BLACKLIST(8, 0),
|
|
|
|
I_WHITELIST(9, 0),
|
|
|
|
I_WHITELIST_OR(10, 0),
|
|
|
|
I_WHITELIST_AND(11, 0),
|
|
|
|
I_WHITELIST_NOT(12, 0),
|
|
|
|
I_RESPECT_NBT(13, 0),
|
|
|
|
I_IGNORE_NBT(14, 0),
|
2020-03-09 01:06:34 +01:00
|
|
|
|
2020-02-19 14:08:49 +01:00
|
|
|
I_CONFIRM(0, 1),
|
|
|
|
I_NONE(1, 1),
|
|
|
|
I_OPEN_FOLDER(2, 1),
|
|
|
|
I_REFRESH(3, 1),
|
|
|
|
I_ACTIVE(4, 1),
|
|
|
|
I_PASSIVE(5, 1),
|
|
|
|
I_ROTATE_PLACE(6, 1),
|
|
|
|
I_ROTATE_PLACE_RETURNED(7, 1),
|
|
|
|
I_ROTATE_NEVER_PLACE(8, 1),
|
|
|
|
I_MOVE_PLACE(9, 1),
|
|
|
|
I_MOVE_PLACE_RETURNED(10, 1),
|
|
|
|
I_MOVE_NEVER_PLACE(11, 1),
|
2020-03-09 01:06:34 +01:00
|
|
|
|
2020-02-19 14:08:49 +01:00
|
|
|
I_DONT_REPLACE(0, 2),
|
2020-02-27 18:09:41 +01:00
|
|
|
I_REPLACE_SOLID(1, 2),
|
2020-02-19 14:08:49 +01:00
|
|
|
I_REPLACE_ANY(2, 2),
|
|
|
|
I_REPLACE_EMPTY(3, 2),
|
2020-03-05 19:52:10 +01:00
|
|
|
I_CENTERED(4, 2),
|
|
|
|
I_ATTACHED(5, 2),
|
|
|
|
I_INSERTED(6, 2),
|
|
|
|
I_FILL(7, 2),
|
|
|
|
I_PLACE(8, 2),
|
|
|
|
I_REPLACE(9, 2),
|
|
|
|
I_CLEAR(10, 2),
|
|
|
|
I_OVERLAY(11, 2),
|
|
|
|
I_FLATTEN(12, 2),
|
2020-02-19 14:08:49 +01:00
|
|
|
|
|
|
|
I_TOOL_DEPLOY(0, 3),
|
|
|
|
I_SKIP_TILES(2, 3),
|
2020-02-27 18:09:41 +01:00
|
|
|
I_SKIP_MISSING(1, 3),
|
2020-03-09 01:06:34 +01:00
|
|
|
|
2020-02-19 14:08:49 +01:00
|
|
|
I_TOOL_MOVE_XZ(0, 4),
|
2020-02-27 18:09:41 +01:00
|
|
|
I_TOOL_MOVE_Y(1, 4),
|
2020-02-19 14:08:49 +01:00
|
|
|
I_TOOL_ROTATE(2, 4),
|
|
|
|
I_TOOL_MIRROR(3, 4),
|
|
|
|
|
|
|
|
I_PLAY(0, 5),
|
2020-02-27 18:09:41 +01:00
|
|
|
I_PAUSE(1, 5),
|
2020-02-19 14:08:49 +01:00
|
|
|
I_STOP(2, 5),
|
|
|
|
|
|
|
|
I_PATTERN_SOLID(0, 6),
|
2020-02-27 18:09:41 +01:00
|
|
|
I_PATTERN_CHECKERED(1, 6),
|
2020-02-19 14:08:49 +01:00
|
|
|
I_PATTERN_CHECKERED_INVERSED(2, 6),
|
|
|
|
I_PATTERN_CHANCE_25(3, 6),
|
2020-03-09 01:06:34 +01:00
|
|
|
|
2020-02-19 14:08:49 +01:00
|
|
|
I_PATTERN_CHANCE_50(0, 7),
|
2020-02-27 18:09:41 +01:00
|
|
|
I_PATTERN_CHANCE_75(1, 7),
|
2020-02-19 14:08:49 +01:00
|
|
|
I_FOLLOW_DIAGONAL(2, 7),
|
|
|
|
I_FOLLOW_MATERIAL(3, 7),
|
2020-03-09 01:06:34 +01:00
|
|
|
|
2019-08-26 20:17:16 +02:00
|
|
|
;
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
public static final int FONT_COLOR = 0x575F7A;
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
public final ResourceLocation location;
|
|
|
|
public int width, height;
|
|
|
|
public int startX, startY;
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-07-19 17:50:23 +02:00
|
|
|
private ScreenResources(String location, int width, int height) {
|
2019-07-11 09:03:08 +02:00
|
|
|
this(location, 0, 0, width, height);
|
|
|
|
}
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2019-10-06 21:49:44 +02:00
|
|
|
private ScreenResources(int startX, int startY) {
|
2020-02-19 14:08:49 +01:00
|
|
|
this("icons.png", startX * 16, startY * 16, 16, 16);
|
2019-10-06 21:49:44 +02:00
|
|
|
}
|
|
|
|
|
2019-07-19 17:50:23 +02:00
|
|
|
private ScreenResources(String location, int startX, int startY, int width, int height) {
|
2019-07-11 09:03:08 +02:00
|
|
|
this.location = new ResourceLocation(Create.ID, "textures/gui/" + location);
|
2019-10-05 19:00:43 +02:00
|
|
|
this.width = width;
|
|
|
|
this.height = height;
|
|
|
|
this.startX = startX;
|
|
|
|
this.startY = startY;
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2020-03-09 01:06:34 +01:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-08-26 20:17:16 +02:00
|
|
|
public void bind() {
|
2019-07-11 09:03:08 +02:00
|
|
|
Minecraft.getInstance().getTextureManager().bindTexture(location);
|
2019-08-26 20:17:16 +02:00
|
|
|
}
|
2019-10-05 19:00:43 +02:00
|
|
|
|
2020-03-09 01:06:34 +01:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-12-13 20:52:42 +01:00
|
|
|
public void draw(AbstractGui screen, int x, int y) {
|
2019-08-26 20:17:16 +02:00
|
|
|
bind();
|
2019-12-13 20:52:42 +01:00
|
|
|
screen.blit(x, y, startX, startY, width, height);
|
|
|
|
}
|
|
|
|
|
2020-03-09 01:06:34 +01:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-12-13 20:52:42 +01:00
|
|
|
public void draw(int x, int y) {
|
2020-03-09 01:06:34 +01:00
|
|
|
draw(new Screen(null) {
|
|
|
|
}, x, y);
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|