Beispiel #1
0
        public GameConfig ShowGameConfigDialog(Window parent)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }

            var window = new GameConfigWindow()
            {
                Owner = parent
            };
            bool?dialogResult = window.ShowDialog();

            if (dialogResult.GetValueOrDefault())
            {
                return(window.GameConfig);
            }
            return(null);
        }
Beispiel #2
0
    static void Init()
    {
        GameConfigWindow window = (GameConfigWindow)EditorWindow.GetWindow <GameConfigWindow>();

        window.Show();
    }