package cn.forevermc.launcher.view;

import cn.forevermc.launcher.util.Resources;
import cn.forevermc.launcher.view.components.RootLayout;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import com.imyeyu.fx.ui.TimiFXUI;
import com.imyeyu.inject.annotation.Inject;

/**
 * 主视图
 *
 * @author 夜雨
 * @since 2022-11-18 15:36
 */
public abstract class ViewMain extends Application implements TimiFXUI {

	@Inject
	private RootLayout root;

	@Override
	public void start(Stage stage) {
		Scene scene = new Scene(root);
		scene.getStylesheets().addAll(CSS_FONT, CSS_STYLE, "style.css");
		stage.setScene(scene);
		stage.getIcons().add(Resources.ICON);
		stage.setTitle("Forever MC");
		stage.setMinWidth(870);
		stage.setMinHeight(519);
		stage.setWidth(870);
		stage.setHeight(519);
	}
}
