package net.baraban4ik.leveling.gui;
import io.wispforest.owo.ui.base.BaseOwoScreen;
import io.wispforest.owo.ui.base.BaseUIModelScreen;
import io.wispforest.owo.ui.component.LabelComponent;
import io.wispforest.owo.ui.container.FlowLayout;
import io.wispforest.owo.ui.core.OwoUIAdapter;
import net.baraban4ik.leveling.interfaces.StatsContainer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.text.Text;
import org.jetbrains.annotations.NotNull;
public class LevelingScreen extends BaseUIModelScreen<FlowLayout> {
protected LevelingScreen(Class<FlowLayout> rootComponentClass, DataSource source) {
super(rootComponentClass, DataSource.file("leveling_gui_model.xml"));
}
@Override
protected void build(FlowLayout rootComponent) {
StatsContainer Stats = (StatsContainer) MinecraftClient.getInstance().getSession();
rootComponent.childById(LabelComponent.class, "test-label").text(Text.of(Float.toString(Stats.getStats("Level"))));
}
}