void ManagerInput_FireNewInput(object sender, MyEventArgs.NewInputEventArgs e)
 {
     if (e.Input == Input.Enter)
     {
         ManagerScreen.LoadNewScreen(new ScreenWorld(ManagerScreen));
     }
 }
 public ScreenOverworldMap(ManagerScreen managerScreen, ManagerPlayer managerPlayer, Vector2 cameraPosition) : base(managerScreen)
 {
     _managerPlayer       = managerPlayer;
     _cameraPosition      = cameraPosition;
     _cursorPosition      = _cameraPosition;
     _cursorCounter       = 0;
     _overworldMapObjects = new OverworldMapObjects();
 }
        void ManagerInput_FireNewInput(object sender, MyEventArgs.NewInputEventArgs e)
        {
            if (e.Input == Input.Select)
            {
                ManagerScreen.GoBackOneScreen();
            }

            switch (e.Input)
            {
            case Input.Left:
                if (_cursorPosition.X - 1 < 0)
                {
                    return;
                }
                if (!_managerPlayer.TileExplored((int)_cursorPosition.X - 1, (int)_cursorPosition.Y))
                {
                    return;
                }
                _cursorPosition = new Vector2(_cursorPosition.X - 1, _cursorPosition.Y);
                break;

            case Input.Right:
                if (_cursorPosition.X + 1 > 15)
                {
                    return;
                }
                if (!_managerPlayer.TileExplored((int)_cursorPosition.X + 1, (int)_cursorPosition.Y))
                {
                    return;
                }
                _cursorPosition = new Vector2(_cursorPosition.X + 1, _cursorPosition.Y);
                break;

            case Input.Up:
                if (_cursorPosition.Y - 1 < 0)
                {
                    return;
                }
                if (!_managerPlayer.TileExplored((int)_cursorPosition.X, (int)_cursorPosition.Y - 1))
                {
                    return;
                }
                _cursorPosition = new Vector2(_cursorPosition.X, _cursorPosition.Y - 1);
                break;

            case Input.Down:
                if (_cursorPosition.Y + 1 > 15)
                {
                    return;
                }
                if (!_managerPlayer.TileExplored((int)_cursorPosition.X, (int)_cursorPosition.Y + 1))
                {
                    return;
                }
                _cursorPosition = new Vector2(_cursorPosition.X, _cursorPosition.Y + 1);
                break;
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            _managerScreen = new ManagerScreen(Content);
            //_managerScreen.LoadNewScreen(new ScreenWorld(_managerScreen));
            _managerScreen.LoadNewScreen(new ScreenStart(_managerScreen));
        }
Exemplo n.º 5
0
 public ScreenWorld(ManagerScreen managerScreen) : base(managerScreen)
 {
     _managerCamera = new ManagerCamera();
     _managerMap    = new ManagerMap("newmap", _managerCamera);
     _entities      = new Entities();
     _managerEvents = new ManagerEvents();
     _managerPlayer = new ManagerPlayer();
     //uglyyyyyyy
     FactoryDeathAnimation.Initailize(_managerCamera);
 }
 public ScreenMainMenu(ManagerScreen managerScreen, Stats stats, Equipment equipment) : base(managerScreen)
 {
     _stats     = stats;
     _equipment = equipment;
     if (stats == null)
     {
         managerScreen.GoBackOneScreen();
     }
     _playerStatsGui  = new PlayerStatsGui(WindowPosition.Up);
     _cursorPosition  = new Vector2(0, 0);
     _selectAlpha     = 255;
     _instrumentColor = 255;
 }
Exemplo n.º 7
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     ManagerContent.Initialize(Content);
     spriteBatch    = new SpriteBatch(GraphicsDevice);
     _managerScreen = new ManagerScreen(Content);
     _managerWindow = new ManagerWindow();
     _managerLists  = new ManagerLists();
     _managerLists.Initialize();
     //_managerScreen.LoadNewScreen(new ScreenWorld(_managerScreen));
     _managerScreen.LoadNewScreen(new ScreenStart(_managerScreen), false);
     // TODO: use this.Content to load your game content here
 }
Exemplo n.º 8
0
 public static void Postfix(MenuScreen __instance)
 {
     if (HarmonyPatchInfo.ModInfoFile == "modInfo.json")
     {
         if (__instance is ModManagerManualInstructionScreen screen)
         {
             screen.ContinueButton.GetComponentInChildren <TextMeshProUGUI>(true)
             .text = "Manage Harmony mods";
             screen.OpenManualFolderButton.GetComponentInChildren <TextMeshProUGUI>(true).text =
                 "Skip Harmony manager";
             MonoBehaviour.Destroy(screen.GetComponentInChildren <RawImage>());
             var texts = screen.GetComponentsInChildren <TextMeshProUGUI>(true);
             texts[1].text =
                 "Click this button if you'd like to skip the Harmony mod manager and load the Harmony mods that according to the previous configuration!";
             texts[5].text =
                 "Or click this button if you'd like to select which Harmony mods should be enabled or disabled!";
             texts[5].transform.localPosition = new Vector3(texts[5].transform.localPosition.x + 190,
                                                            texts[5].transform.localPosition.y - 90, texts[5].transform.localPosition.z);
             if (Tweaks.settings.AutoSkipFinalizeScreen || (AllowAutoContinue && PlayerSettingsManager.Instance.PlayerSettings.UseModsAlways))
             {
                 screen.OpenManualFolderButton.OnInteract();
             }
         }
     }
     else if (ManualButtonPatch.AutoCloseManager && __instance is ModManagerManualInstructionScreen ManualScreen)
     {
         ManualScreen.ContinueButton.OnInteract();
     }
     else if (__instance is ModManagerMainMenuScreen MenuScreen)
     {
         MenuScreen.SteamWorkshopBrowserButton.gameObject.SetActive(false);
         MenuScreen.GetComponentInChildren <TextMeshProUGUI>().text = "Harmony Mod Manager";
         var image = MenuScreen.GetComponentInChildren <RawImage>();
         image.texture = HarmonyPatchInfo.HarmonyTexture;
         image.transform.localScale = new Vector3(image.transform.localScale.x + 1,
                                                  image.transform.localScale.y, image.transform.localScale.z);
         MenuScreen.ManageModsButton.GetComponentInChildren <TextMeshProUGUI>(true).text =
             "Manage Harmony mods";
         if (ManualButtonPatch.AutoCloseManager)
         {
             MenuScreen.ReturnToGameButton.OnInteract();
         }
     }
     else if (__instance is ManageModsScreen ManagerScreen)
     {
         ManagerScreen.GetComponentInChildren <TextMeshProUGUI>().text = "Manage installed Harmony mods";
     }
 }
 public ScreenStart(ManagerScreen managerScreen) : base(managerScreen)
 {
 }
        void ManagerInput_FireNewInput(object sender, MyEventArgs.NewInputEventArgs e)
        {
            switch (e.Input)
            {
            case Input.Left:
                _cursorPosition.X--;
                if (_cursorPosition.X < 0)
                {
                    _cursorPosition.X = 1;
                    _cursorPosition.Y--;
                    if (_cursorPosition.Y < 0)
                    {
                        _cursorPosition.Y = 7;
                    }
                }
                break;

            case Input.Right:
                _cursorPosition.X++;
                if (_cursorPosition.X > 1)
                {
                    _cursorPosition.X = 0;
                    _cursorPosition.Y++;
                    if (_cursorPosition.Y > 7)
                    {
                        _cursorPosition.Y = 0;
                    }
                }
                break;

            case Input.Down:
                _cursorPosition.Y++;
                if (_cursorPosition.Y > 7)
                {
                    _cursorPosition.X = 0;
                    _cursorPosition.Y = 0;
                }
                break;

            case Input.Up:
                _cursorPosition.Y--;
                if (_cursorPosition.Y < 0)
                {
                    _cursorPosition.X = 1;
                    _cursorPosition.Y = 7;
                }
                break;

            case Input.Select:
                ManagerScreen.GoBackOneScreen();
                break;

            case Input.A:
                _equipment.SwitchEquipment(ItemSlot.A, _cursorPosition);
                break;

            case Input.S:
                _equipment.SwitchEquipment(ItemSlot.B, _cursorPosition);
                break;
            }
        }
Exemplo n.º 11
0
 public Screen(ManagerScreen managerScreen)
 {
     ManagerScreen = managerScreen;
 }
Exemplo n.º 12
0
 public PlayerInput(ManagerScreen managerScreen, ManagerPlayer managerPlayer)
 {
     _managerScreen = managerScreen;
     _managerPlayer = managerPlayer;
 }
Exemplo n.º 13
0
        public MainWindow()
        {
            InitializeComponent();

            HandlerHotkey handlerHotkey = new HandlerHotkey();

            mainHotkey = new MainHotkey(this);
            mainHotkey.KeyCollection = handlerHotkey.SetupHandlers();

            string ConfigPath = @"C:\Users\oleksandr.dubyna\Documents\GIT\SE\SeScreenWindowSetter\SeScreenWindowSetter\managerScreen.json";

            FillListOfProcess();

            List <Employee> li = new List <Employee>();

            li.Add(new Employee
            {
                Id     = 1,
                age    = 23,
                name   = "Ritesh",
                gender = "M"
            });
            li.Add(new Employee
            {
                Id     = 2,
                age    = 23,
                name   = "sujit",
                gender = "M"
            });
            li.Add(new Employee
            {
                Id     = 3,
                age    = 23,
                name   = "Kabir",
                gender = "F"
            });
            li.Add(new Employee
            {
                Id     = 4,
                age    = 3,
                name   = "mantu",
                gender = "F"
            });
            li.Add(new Employee
            {
                Id     = 5,
                age    = 24,
                name   = "Kamlesh",
                gender = "M"
            });
            li.Add(new Employee
            {
                Id     = 6,
                age    = 28,
                name   = "Manoj",
                gender = "M"
            });
            li.Add(new Employee
            {
                Id     = 6,
                age    = 28,
                name   = "xxxx",
                gender = "M"
            });
            var res  = li.ToLookup(x => x.age);
            var res1 = li.OrderBy(x => x.age);
            var t    = ManagerConfig.Init(ConfigPath).
                       Bind(SetupState.InitNew).
                       Bind(ManagerState.InitFromConfig).
                       Bind(ManagerState.InitFromScreens.Curry()(ManagerScreen.Init())).
                       Bind(ManagerState.InitFlatStructure).
                       Bind(ManagerState.InitFromWindowProcesses.Curry()(ProcessManager.GetAllProcesses())).
                       Bind(ManagerState.InitParts).
                       Bind(ManagerState.SetNewCoordinates).
                       Bind(ManagerWindow.SetWindowsPositions);
            //ManagerConfig.Init(ConfigPath).
            //    Bind(ManagerScreen.Init); List<DesktopWindowsCaption>


            //BridgeConfigAndScreenInfo.
            //    Init(SetupState.Init1, ManagerScreen.Init(), ManagerConfig.Init(ConfigPath)).
            //    Aggregate(new List<RectangleWithProcesses[,]>(), SetWindowsInPositionBlock.Init).
            //    PipeForward(ManagerWindow.SetWindowsPositionsFromConfig);
        }
Exemplo n.º 14
0
 public ScreenWorld(ManagerScreen managerScreen) : base(managerScreen)
 {
     _entities      = new Entities();
     _managerCamera = new ManagerCamera();
     _managerMap    = new ManagerMap("test", _managerCamera);
 }