ImageTexture with abstracted Identifier
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package org.saturnclient.ui.elements;
|
package org.saturnclient.ui.elements;
|
||||||
|
|
||||||
|
import org.saturnclient.common.minecraft.SaturnIdentifier;
|
||||||
import org.saturnclient.ui.Element;
|
import org.saturnclient.ui.Element;
|
||||||
import org.saturnclient.ui.ElementContext;
|
import org.saturnclient.ui.ElementContext;
|
||||||
import org.saturnclient.ui.RenderScope;
|
import org.saturnclient.ui.RenderScope;
|
||||||
@@ -15,6 +16,10 @@ public class ImageTexture extends Element {
|
|||||||
this.sprite = sprite;
|
this.sprite = sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImageTexture(SaturnIdentifier sprite) {
|
||||||
|
this.sprite = (Identifier) sprite.id;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(RenderScope renderScope, ElementContext ctx) {
|
public void render(RenderScope renderScope, ElementContext ctx) {
|
||||||
if (sprite.toString().endsWith(".svg")) {
|
if (sprite.toString().endsWith(".svg")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user