package dev.bytevibe.hyperpoint.Utils;

import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import javafx.scene.control.TextInputDialog;

// 提示输入框,按钮设置为中文
public class MyTextInputDialog extends TextInputDialog {
    private static ButtonType confirm = new ButtonType("确定", ButtonBar.ButtonData.OK_DONE);
    private static ButtonType cancel  = new ButtonType("取消", ButtonBar.ButtonData.CANCEL_CLOSE);

    public MyTextInputDialog(String defaultValue) {
        super(defaultValue);
        getDialogPane().getButtonTypes().setAll(confirm, cancel);
    }

    public static ButtonType isOK() {
        return confirm;
    }
}