ImageTexture with abstracted Identifier

This commit is contained in:
2026-03-05 23:46:32 +01:00
parent e8671640e3
commit 9bf04639b3
@@ -1,5 +1,6 @@
package org.saturnclient.ui.elements;
import org.saturnclient.common.minecraft.SaturnIdentifier;
import org.saturnclient.ui.Element;
import org.saturnclient.ui.ElementContext;
import org.saturnclient.ui.RenderScope;
@@ -15,6 +16,10 @@ public class ImageTexture extends Element {
this.sprite = sprite;
}
public ImageTexture(SaturnIdentifier sprite) {
this.sprite = (Identifier) sprite.id;
}
@Override
public void render(RenderScope renderScope, ElementContext ctx) {
if (sprite.toString().endsWith(".svg")) {