package com.github.czyzby.views;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.github.czyzby.Core;
import com.github.czyzby.lml.annotation.LmlAction;
import com.github.czyzby.lml.annotation.LmlActor;
import com.github.czyzby.lml.parser.impl.AbstractLmlView;
public class FirstView extends AbstractLmlView {
@LmlActor("random") private Label result;
public FirstView() {
super(Core.newStage());
}
@LmlAction("roll")
public void rollNumber() {
result.setText(String.valueOf((int) (MathUtils.random() * 1000)));
}
@Override
public FileHandle getTemplateFile() {
return Gdx.files.internal("views/first.lml");
}
@Override
public String getViewId() {
return "first";
}
}