commit
432ad97d2a
@ -20,11 +20,11 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
include modApi("me.shedaniel.cloth:cloth-config-fabric:12.0.109") {
|
||||
include modApi("me.shedaniel.cloth:cloth-config-fabric:13.0.121") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
modApi("com.terraformersmc:modmenu:8.0.0-beta.2")
|
||||
modCompileOnly("com.terraformersmc:modmenu:9.0.0")
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
@ -2,13 +2,13 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.20.2
|
||||
yarn_mappings=1.20.2+build.1
|
||||
loader_version=0.14.22
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.1
|
||||
loader_version=0.15.0
|
||||
# Mod Properties
|
||||
mod_version=1.3.0
|
||||
maven_group=semmiedev
|
||||
archives_base_name=disc_jockey
|
||||
# Dependencies
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_version=0.89.1+1.20.2
|
||||
fabric_version=0.91.1+1.20.4
|
||||
|
@ -1,5 +1,6 @@
|
||||
package semmiedev.disc_jockey.gui;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
|
||||
@ -10,13 +11,9 @@ import semmiedev.disc_jockey.Main;
|
||||
import semmiedev.disc_jockey.Song;
|
||||
|
||||
public class SongListWidget extends EntryListWidget<SongListWidget.SongEntry> {
|
||||
public SongListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) {
|
||||
super(client, width, height, top, bottom, itemHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendNarrations(NarrationMessageBuilder builder) {
|
||||
// Who cares
|
||||
public SongListWidget(MinecraftClient client, int width, int height, int top, int itemHeight) {
|
||||
super(client, width, height, top, itemHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -37,6 +34,11 @@ public class SongListWidget extends EntryListWidget<SongListWidget.SongEntry> {
|
||||
super.setSelected(entry);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendClickableNarrations(NarrationMessageBuilder builder) {
|
||||
// Who cares
|
||||
}
|
||||
|
||||
// TODO: 6/2/2022 Add a delete icon
|
||||
public static class SongEntry extends Entry<SongEntry> {
|
||||
private static final Identifier ICONS = new Identifier(Main.MOD_ID, "textures/gui/icons.png");
|
||||
@ -61,17 +63,13 @@ public class SongListWidget extends EntryListWidget<SongListWidget.SongEntry> {
|
||||
this.x = x; this.y = y; this.entryWidth = entryWidth; this.entryHeight = entryHeight;
|
||||
|
||||
if (selected) {
|
||||
//fill(matrices, x, y, x + entryWidth, y + entryHeight, 0xFFFFFF);
|
||||
context.fill(x, y, x + entryWidth, y + entryHeight, 0xFFFFFF);
|
||||
//fill(matrices, x + 1, y + 1, x + entryWidth - 1, y + entryHeight - 1, 0x000000);
|
||||
context.fill(x + 1, y + 1, x + entryWidth - 1, y + entryHeight - 1, 0x000000);
|
||||
}
|
||||
|
||||
//drawCenteredTextWithShadow(matrices, client.textRenderer, song.displayName, x + entryWidth / 2, y + 5, selected ? 0xFFFFFF : 0x808080);
|
||||
context.drawCenteredTextWithShadow(client.textRenderer, song.displayName, x + entryWidth / 2, y + 5, selected ? 0xFFFFFF : 0x808080);
|
||||
|
||||
//RenderSystem.setShaderTexture(0, ICONS);
|
||||
//drawTexture(matrices, x + 2, y + 2, (favorite ? 26 : 0) + (isOverFavoriteButton(mouseX, mouseY) ? 13 : 0), 0, 13, 12, 52, 12);
|
||||
RenderSystem.setShaderTexture(0, ICONS);
|
||||
context.drawTexture(ICONS, x + 2, y + 2, (favorite ? 26 : 0) + (isOverFavoriteButton(mouseX, mouseY) ? 13 : 0), 0, 13, 12, 52, 12);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class DiscJockeyScreen extends Screen {
|
||||
@Override
|
||||
protected void init() {
|
||||
shouldFilter = true;
|
||||
songListWidget = new SongListWidget(client, width, height, 32, height - 64, 20);
|
||||
songListWidget = new SongListWidget(client, width, height - 64 - 32, 32, 20);
|
||||
addDrawableChild(songListWidget);
|
||||
for (int i = 0; i < SongLoader.SONGS.size(); i++) {
|
||||
Song song = SongLoader.SONGS.get(i);
|
||||
@ -130,11 +130,10 @@ public class DiscJockeyScreen extends Screen {
|
||||
|
||||
@Override
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
renderBackgroundTexture(context);
|
||||
super.render(context, mouseX, mouseY, delta);
|
||||
|
||||
//drawCenteredTextWithShadow(matrices, textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFF);
|
||||
context.drawCenteredTextWithShadow(textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFF);
|
||||
//drawCenteredTextWithShadow(matrices, textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFF);
|
||||
context.drawCenteredTextWithShadow(textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFF);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user