Skip to content

Commit

Permalink
fabric for now
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfudge committed May 19, 2024
1 parent 6c50c10 commit a03fbc3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mojang.blaze3d.systems.RenderSystem;
import fudge.notenoughcrashes.NotEnoughCrashes;
import fudge.notenoughcrashes.platform.NecPlatform;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand Down Expand Up @@ -320,7 +321,7 @@ public void fillList() {
info.index = 0;
list.clear();
fillList();
}), true).texture(new Identifier("midnightlib","icon/reset"), 12, 12).dimension(40, 20).build();
}), true).texture(new Identifier(NotEnoughCrashes.MOD_ID,"icon/reset"), 12, 12).dimension(40, 20).build();
resetButton.setPosition(width - 205, 0);

if (info.widget instanceof Map.Entry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void init() {
@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context, mouseX, mouseY, delta);
super.render(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.crashscreen.title"), width / 2, height / 4 - 40, 0xFFFFFF);

int textColor = 0xD0D0D0;
Expand All @@ -70,7 +71,6 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) {
context.drawTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.crashscreen.paragraph3.line3"), x, y += 9, textColor);
context.drawTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.crashscreen.paragraph3.line4"), x, y + 9, textColor);

super.render(context, mouseX, mouseY, delta);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextWidget;
import net.minecraft.text.Text;
import net.minecraft.util.crash.CrashReport;

Expand Down Expand Up @@ -32,11 +33,13 @@ public void init() {
}).dimensions(width / 2 - 155, height / 4 + 120 + 12, 150, 20).build();

addDrawableChild(exitButton);

}

@Override
public void render(DrawContext context, int mouseX, int i, float f) {
renderBackground(context, mouseX, i, f);
super.render(context, mouseX, i, f);
context.drawCenteredTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.initerrorscreen.title"), width / 2, height / 4 - 40, 0xFFFFFF);

context.drawTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.initerrorscreen.summary"), x, y, TEXT_COLOR);
Expand All @@ -53,7 +56,6 @@ public void render(DrawContext context, int mouseX, int i, float f) {
context.drawTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.initerrorscreen.paragraph3.line3"), x, y + 90, TEXT_COLOR);
context.drawTextWithShadow(textRenderer, NecLocalization.localize("notenoughcrashes.initerrorscreen.paragraph3.line4"), x, y + 99, TEXT_COLOR);

super.render(context, mouseX, i, f);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ protected void drawFileNameString(DrawContext context, int y) {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
for (Widget widget : widgets) widget.draw(context);
super.render(context, mouseX, mouseY, delta);
for (Widget widget : widgets) widget.draw(context);
}

}

0 comments on commit a03fbc3

Please sign in to comment.