Пример #1
0
        public override sealed void OnLevelLoaded(LoadMode mode)
        {
            _mode = mode;

            // Don't load in asset and map editor
            if (mode != LoadMode.LoadGame && mode != LoadMode.NewGame)
                return;

            try
            {
                ModLogger.Debug("Creating main window");

                // Get a handle to the main game view
                UIView aView = UIView.GetAView();

                // Create the gameobject and attach a mainwindow instance
                GameObject goMainWindow = new GameObject(WorkshopMonitorMainWindowGameObjectName);
                _mainWindow = goMainWindow.AddComponent<UIMainWindow>();
                _mainWindow.transform.parent = aView.transform;

                ModLogger.Debug("Main window created");
            }
            catch (Exception ex)
            {
                ModLogger.Error("An error occured while creating the main window");
                ModLogger.Exception(ex);
            }
        }
Пример #2
0
        public sealed override void OnLevelLoaded(LoadMode mode)
        {
            _mode = mode;

            // Don't load in asset and map editor
            if (mode != LoadMode.LoadGame && mode != LoadMode.NewGame)
            {
                return;
            }

            try
            {
                ModLogger.Debug("Creating main window");

                // Get a handle to the main game view
                UIView aView = UIView.GetAView();

                // Create the gameobject and attach a mainwindow instance
                GameObject goMainWindow = new GameObject(WorkshopMonitorMainWindowGameObjectName);
                _mainWindow = goMainWindow.AddComponent <UIMainWindow>();
                _mainWindow.transform.parent = aView.transform;

                ModLogger.Debug("Main window created");
            }
            catch (Exception ex)
            {
                ModLogger.Error("An error occured while creating the main window");
                ModLogger.Exception(ex);
            }
        }
 public void SetMainWindow(UIMainWindow mainWindow)
 {
     _mainWindow = mainWindow;
 }
 public UnsubscribeWorkshopAssetCommand(UIMainWindow mainWindow, IUIWorkshopAssetRowData workshopAssetRowData)
 {
     _mainWindow           = mainWindow;
     _workshopAssetRowData = workshopAssetRowData;
 }
Пример #5
0
 public void SetMainWindow(UIMainWindow mainWindow)
 {
     _mainWindow = mainWindow;
 }
 public UnsubscribeWorkshopAssetCommand(UIMainWindow mainWindow, IUIWorkshopAssetRowData workshopAssetRowData)
 {
     _mainWindow = mainWindow;
     _workshopAssetRowData = workshopAssetRowData;
 }