Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture Update #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class RequesterScreen extends AbstractRequesterScreen<RequesterMenu> {

private static final ResourceLocation TEXTURE = Utils.getRL(String.format("textures/gui/%s.png", MERequester.REQUESTER_ID));
private static final Rect2i FOOTER_BBOX = new Rect2i(0, 114, GUI_WIDTH, GUI_FOOTER_HEIGHT);
private static final Rect2i FOOTER_BBOX = new Rect2i(0, 114, GUI_WIDTH, GUI_FOOTER_HEIGHT + 2);
private static final int MAX_ROW_COUNT = 10;

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class RequesterTerminalScreen<T extends RequesterTerminalMenu> extends AbstractRequesterScreen<T> {

private static final ResourceLocation TEXTURE = Utils.getRL(String.format("textures/gui/%s.png", MERequester.TERMINAL_ID));
private static final Rect2i FOOTER_BBOX = new Rect2i(0, 133, GUI_WIDTH, GUI_FOOTER_HEIGHT);
private static final Rect2i FOOTER_BBOX = new Rect2i(0, 133, GUI_WIDTH, GUI_FOOTER_HEIGHT + 2);

private final HashMap<Long, RequesterReference> byId = new HashMap<>();
private final HashMultimap<String, RequesterReference> byName = HashMultimap.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public abstract class AbstractRequesterScreen<M extends AbstractRequesterMenu> e
private static final int GUI_PADDING_X = 8;
private static final int GUI_PADDING_Y = 6;
protected static final int GUI_HEADER_HEIGHT = 19;
protected static final int GUI_FOOTER_HEIGHT = 98;
protected static final int GUI_FOOTER_HEIGHT = 100;

private static final int TEXT_MARGIN_X = 2;
private static final int TEXT_MAX_WIDTH = 156;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ public class StateBox extends AECheckbox implements ITooltip {
@Override
public void renderWidget(GuiGraphics guiGraphics, int mX, int mY, float partial) {
Blitter icon;
if (isFocused() || isMouseOver(mX, mY)) {
if (isMouseOver(mX, mY) && !isFocused()) {
icon = isSelected() ? CHECKED_FOCUS : UNCHECKED_FOCUS;
} else {
icon = isSelected() ? CHECKED : UNCHECKED;
}
if (!isMouseOver(mX, mY)) {
setFocused(false);
}
var opacity = isActive() ? 1 : 0.5f;
icon.dest(getX(), getY()).opacity(opacity).blit(guiGraphics);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class SubmitButton extends AECheckbox implements ITooltip {
@Override
public void renderWidget(GuiGraphics guiGraphics, int mX, int mY, float partial) {
Blitter icon = isFocused() || isMouseOver(mX, mY) ? FOCUSED : UNFOCUSED;
if (!isMouseOver(mX, mY)) {
setFocused(false);
}
var opacity = isActive() ? 1 : 0.5f;
icon.dest(getX(), getY()).opacity(opacity).blit(guiGraphics);
}
Expand Down
22 changes: 12 additions & 10 deletions src/main/resources/assets/merequester/models/block/requester.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@
"credit": "Made with Blockbench by Almost Reliable",
"parent": "block/orientable",
"textures": {
"particle": "ae2:block/inscriber",
"wall": "ae2:block/inscriber",
"face": "merequester:block/requester"
"face": "merequester:block/requester",
"top": "ae2:block/generics/top",
"back": "ae2:block/generics/back",
"bottom": "ae2:block/generics/bottom",
"side": "ae2:block/generics/side"
},
"elements": [
{
"name": "machine_frame",
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"east": {"uv": [0, 0, 16, 16], "texture": "#wall"},
"south": {"uv": [0, 0, 16, 16], "texture": "#wall"},
"west": {"uv": [0, 0, 16, 16], "texture": "#wall"},
"up": {"uv": [0, 0, 16, 16], "texture": "#wall"},
"down": {"uv": [0, 0, 16, 16], "texture": "#wall"}
"east": {"uv": [16, 0, 0, 16], "texture": "#side"},
"south": {"uv": [0, 0, 16, 16], "texture": "#back"},
"west": {"uv": [0, 0, 16, 16], "texture": "#side"},
"up": {"uv": [0, 0, 16, 16], "texture": "#top"},
"down": {"uv": [0, 0, 16, 16], "texture": "#bottom"}
}
},
{
"from": [0, 0, 0],
"to": [16, 4, 1],
"faces": {
"north": {"uv": [0, 12, 16, 16], "texture": "#face"},
"up": {"uv": [0, 12, 16, 13], "texture": "#face"}
"up": {"uv": [16, 12, 0, 13], "texture": "#face"}
}
},
{
Expand Down Expand Up @@ -55,7 +57,7 @@
"to": [12, 16, 1],
"faces": {
"north": {"uv": [4, 0, 12, 4], "texture": "#face"},
"down": {"uv": [4, 3, 12, 4], "texture": "#face"}
"down": {"uv": [12, 3, 4, 4], "texture": "#face"}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"parent": "merequester:block/requester",
"textures": {
"wall": "merequester:block/wall_active",
"face": "merequester:block/requester_active"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"animation": {
"interpolate": true,
"frametime": 6
"frames": [
{"index": 0, "time": 16},
{"index": 1, "time": 2}
]
}
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.