1
0
Fork 0

chore(deps): update

This commit is contained in:
ineanto 2025-09-06 11:00:05 +02:00
parent 5ab4824a42
commit 7918072e1e
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84
6 changed files with 96 additions and 15 deletions

View file

@ -0,0 +1,13 @@
package xyz.ineanto.dragon.assets
data class Asset(
private val qualifier: String,
val name: String,
var path: String = "assets/${qualifier}/${name}.png"
) {
class Icons {
companion object {
val DENY: Asset = Asset("icon", "deny")
}
}
}

View file

@ -0,0 +1,70 @@
package xyz.ineanto.dragon.inventory
import net.kyori.adventure.key.Key
import net.kyori.adventure.text.Component
import net.kyori.adventure.text.format.NamedTextColor
import net.kyori.adventure.text.format.TextDecoration
import ru.brikster.glyphs.compile.GlyphCompiler
import ru.brikster.glyphs.glyph.Glyph
import ru.brikster.glyphs.glyph.GlyphComponentBuilder
import ru.brikster.glyphs.glyph.GlyphComponentBuilder.PositionType
import ru.brikster.glyphs.glyph.image.ImageGlyph
import ru.brikster.glyphs.glyph.image.TextureProperties
import ru.brikster.glyphs.glyph.space.mojang.MojangSpacesGlyph
import ru.brikster.glyphs.resources.GlyphResources
import team.unnamed.creative.texture.Texture
class TeamSelectionScreen {
fun show() {
// Glyphs objects
var spaces = MojangSpacesGlyph.create()
var guiBackground = ImageGlyph.of(
Key.key(Glyph.DEFAULT_NAMESPACE, "gui/gui_background"),
Texture.of(
Key.key(Glyph.DEFAULT_NAMESPACE, "gui/gui_background"),
GlyphResources.resourceFromJar("gui_background.png")
),
TextureProperties(/* height */ 256, /* ascent */ 19)
)
var exampleButton = ImageGlyph.of(
Key.key(Glyph.DEFAULT_NAMESPACE, "gui/example_button"),
Texture.of(
Key.key(Glyph.DEFAULT_NAMESPACE, "gui/example_button"),
GlyphResources.resourceFromJar("example_button.png")
),
TextureProperties(/* height */ 22, /* ascent */ -56
)
)
var font = GlyphResources.minecraftFontGlyphCollection(
listOf(
TextureProperties(/* height */ 12, /* ascent */ -6),
TextureProperties(/* height */ 8, /* ascent */ -24
),
TextureProperties(/* height */ 8, /* ascent */-36)
)
);
val resources = GlyphCompiler.instance()
.compile(spaces, guiBackground, exampleButton, font);
resources.addAll(GlyphResources.blankSlotResources());
//createResourcepack(resources)
val title = GlyphComponentBuilder.gui(spaces)
.append(guiBackground)
.append(/* position */ 131, exampleButton)
.append(/* position */ 16, font.translate(/* height */ 12, /* ascent */ -6, "Example text"))
.append(/* position */ 16, font.translate(/* height */ 8, /* ascent */ -24, "Hello "))
.append(PositionType.RELATIVE, font.translate(/* height */ 8, /* ascent */ -24, "world..."))
.append(
PositionType.ABSOLUTE, /* position */
16,
font.translate(/* height */ 8, /* ascent */ -36, "Hello world...", NamedTextColor.LIGHT_PURPLE)
)
.build()
.append(Component.text("Test menu with glyphs", NamedTextColor.DARK_GRAY, TextDecoration.UNDERLINED))
}
}