示例#1
0
    void Update()
    {
        // 右・左
        //float x = Input.GetAxisRaw("Horizontal");

        // 上・下
        //float y = Input.GetAxisRaw("Vertical");

        // 移動する向きを求める
        //Vector2 direction = new Vector2(x, y).normalized;

        // 移動
        //spaceship.Move(direction);

        //スマホ向けインターフェース
        //if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
        //{
        // 右・左
        float xC = CrossPlatformInputManager.GetAxisRaw("Horizontal");

        // 上・下
        float yC = CrossPlatformInputManager.GetAxisRaw("Vertical");

        // 移動する向きを求める
        Vector2 directionC = new Vector2(xC, yC);

        // 移動
        Move(directionC);
        //}
        DarkMode.DarkDamage();
    }
示例#2
0
        public SettingsWindow(
            CefBrowserHandler cefBrowserHandler,
            TooltipHelper tooltipHelper,
            Action itemViewUpdateTrigger,
            IPlayerItemDao playerItemDao,
            GDTransferFile[] modFilter,
            TransferStashService transferStashService,
            TransferStashService2 transferStashService2,
            LanguagePackPicker languagePackPicker,
            SettingsService settings, GrimDawnDetector grimDawnDetector, DarkMode darkModeToggler)
        {
            InitializeComponent();
            _controller                 = new SettingsController(settings);
            this._cefBrowserHandler     = cefBrowserHandler;
            this._tooltipHelper         = tooltipHelper;
            this._itemViewUpdateTrigger = itemViewUpdateTrigger;
            this._playerItemDao         = playerItemDao;
            this._modFilter             = modFilter;
            this._transferStashService  = transferStashService;
            this._transferStashService2 = transferStashService2;
            _languagePackPicker         = languagePackPicker;
            _settings         = settings;
            _grimDawnDetector = grimDawnDetector;
            _darkModeToggler  = darkModeToggler;

            _controller.BindCheckbox(cbMinimizeToTray);

            _controller.BindCheckbox(cbTransferAnyMod);
            _controller.BindCheckbox(cbSecureTransfers);
            _controller.BindCheckbox(cbShowRecipesAsItems);
            _controller.BindCheckbox(cbAutoUpdateModSettings);
            _controller.BindCheckbox(cbHideSkills);
            _controller.LoadDefaults();
        }
        /// <summary>
        /// Allow save every persistent configuration
        /// </summary>
        private void SaveConfigurations()
        {
            var configurations = new List <string[]>();

            configurations.Add(new string[] { nameof(DarkMode), DarkMode.ToString() });

            FileUtil.SaveFile(configurations, CONFIGURATION_FILE_NAME, CONFIGURATION_FILE_SEPARATOR);
        }
        private void DarkMode_Menu_AddItem(ContextMenu c, DarkMode mode)
        {
            MenuItem m = new MenuItem();

            m.Header = mode.GetDescription();
            m.Click += delegate
            {
                DarkModeSelect.TextDetail             = mode.GetDescription();
                Properties.Settings.Default.DarkMode2 = mode;
                Properties.Settings.Default.Save();
                DarkModeHelper.Update();
            };
            m.Style = (Style)FindResource("MenuItemStyle");
            c.Items.Add(m);
        }
示例#5
0
        private void DarkMode_Menu_AddItem(ContextMenu c, DarkMode mode)
        {
            MenuItem m = new MenuItem();

            m.Header = mode.GetDescription();
            m.Click += delegate
            {
                DarkModeSelect.TextDetail             = mode.GetDescription();
                Properties.Settings.Default.DarkMode2 = mode;
                Properties.Settings.Default.Save();
                DarkModeHelper.Update();

                if (BluetoothService.Instance.IsConnected)
                {
                    BluetoothService.Instance.SendAsync(SPPMessageBuilder.Info.GetAllData());
                }
            };
            m.Style = (Style)FindResource("MenuItemStyle");
            c.Items.Add(m);
        }
示例#6
0
        public SettingsWindow(
            CefBrowserHandler cefBrowserHandler,
            TooltipHelper tooltipHelper,
            Action itemViewUpdateTrigger,
            IPlayerItemDao playerItemDao,
            GDTransferFile[] modFilter,
            TransferStashService transferStashService,
            TransferStashService2 transferStashService2,
            LanguagePackPicker languagePackPicker,
            SettingsService settings, GrimDawnDetector grimDawnDetector, DarkMode darkModeToggler, AutomaticUpdateChecker automaticUpdateChecker)
        {
            InitializeComponent();
            _controller                 = new SettingsController(settings);
            this._cefBrowserHandler     = cefBrowserHandler;
            this._tooltipHelper         = tooltipHelper;
            this._itemViewUpdateTrigger = itemViewUpdateTrigger;
            this._playerItemDao         = playerItemDao;
            this._modFilter             = modFilter;
            this._transferStashService  = transferStashService;
            this._transferStashService2 = transferStashService2;
            _languagePackPicker         = languagePackPicker;
            _settings               = settings;
            _grimDawnDetector       = grimDawnDetector;
            _darkModeToggler        = darkModeToggler;
            _automaticUpdateChecker = automaticUpdateChecker;

            _controller.BindCheckbox(cbMinimizeToTray);

            _controller.BindCheckbox(cbTransferAnyMod);
            _controller.BindCheckbox(cbSecureTransfers);
            _controller.BindCheckbox(cbShowRecipesAsItems);
            _controller.BindCheckbox(cbHideSkills);
            _controller.LoadDefaults();

            // TODO: Write out the settingscontroller and add logic for updating showskills config

            linkCheckForUpdates.Visible = Environment.Is64BitOperatingSystem;
            pbAutomaticUpdates.Visible  = Environment.Is64BitOperatingSystem;
        }