void Start() { if (mouseSettings == null) { mouseSettings = GameObject.FindGameObjectWithTag("GameManager").GetComponent <CyberBullet.GameManager.MouseSettings>(); } }
private SettingsSubsection createSectionFor(InputHandler handler) { SettingsSubsection section; switch (handler) { // ReSharper disable once SuspiciousTypeConversion.Global (net standard fuckery) case ITabletHandler th: section = new TabletSettings(th); break; case MouseHandler mh: section = new MouseSettings(mh); break; // whitelist the handlers which should be displayed to avoid any weird cases of users touching settings they shouldn't. case JoystickHandler _: case MidiHandler _: section = new HandlerSection(handler); break; default: return(null); } return(section); }
public ApplicationSettings() { ActionCenter = new ActionCenterSettings(); Audio = new AudioSettings(); Browser = new BrowserSettings(); Keyboard = new KeyboardSettings(); Mouse = new MouseSettings(); Service = new ServiceSettings(); Taskbar = new TaskbarSettings(); }
private void OnOK(EventArgs e) { // General GeneralSettings general = this.configuration.General; general.MinimizeOnRecord = this.chkMinimizeOnRecord.Checked; general.HideFromTaskbar = this.chkHideFromTaskbar.Checked; general.OutputDirectory = this.txtOutputDirectory.Text; // Keys HotKeySettings hotKeys = this.configuration.HotKeys; hotKeys.Cancel = this.hkCancel.Value; hotKeys.Global = this.chkGlobalHotKeys.Checked; hotKeys.Pause = this.hkPause.Value; hotKeys.Record = this.hkRecord.Value; hotKeys.Stop = this.hkStop.Value; // Mouse MouseSettings mouse = this.configuration.Mouse; mouse.HighlightCursor = this.chkHighlighCursor.Checked; mouse.HighlightCursorColor = this.cursorHighlightOptions.Color; mouse.HighlightCursorRadious = this.cursorHighlightOptions.Radious; mouse.RecordCursor = this.chkRecordCursor.Checked; // Sound SoundSettings sound = this.configuration.Sound; SoundDevice selectedSoundDevice = this.soundDeviceSelector.SoundDevice; sound.DeviceId = selectedSoundDevice != null ? selectedSoundDevice.Id : null; sound.Format = this.cmbSoundFormat.SelectedItem as SoundFormat; // Tracking // this.configuration.Tracking = this.trackerSelector.TrackingSettings; // Video VideoSettings video = this.configuration.Video; video.Compressor = (this.cmbCompressor.SelectedItem as Avi.VideoCompressor).FccHandlerString; video.Fps = this.videoFps; video.Quality = this.videoQuality; // Watermark WatermarkSettings watermark = this.configuration.Watermark; watermark.Alignment = this.watermarkOptions.WatermarkAlignment; watermark.Color = this.watermarkOptions.WatermarkColor; watermark.Display = this.chkWatermark.Checked; watermark.Font = this.watermarkOptions.WatermarkFont; watermark.Margin = this.watermarkOptions.WatermarkMargin; watermark.Outline = this.watermarkOptions.WatermarkOutline; watermark.OutlineColor = this.watermarkOptions.WatermarkOutlineColor; watermark.RightToLeft = this.watermarkOptions.WatermarkRightToLeft; watermark.Text = this.watermarkOptions.WatermarkText; if (this.OK != null) { this.OK(this, e); } }
public AppSettings() { ActionCenter = new ActionCenterSettings(); Applications = new ApplicationSettings(); Audio = new AudioSettings(); Browser = new BrowserSettings(); Keyboard = new KeyboardSettings(); Mouse = new MouseSettings(); Proctoring = new ProctoringSettings(); Security = new SecuritySettings(); Server = new ServerSettings(); Service = new ServiceSettings(); Taskbar = new TaskbarSettings(); }
// Use this for initialization void Start() { poison = FindObjectOfType <RaiseLair>(); timer = FindObjectOfType <TimerCountDown>(); round = FindObjectOfType <Round>(); data = FindObjectOfType <VariableData>(); healthpack = FindObjectOfType <HealthPackSpawn>(); floorFall = FindObjectOfType <FallFloor>(); doorsFall = FindObjectsOfType <Fall>(); mouseSettings = FindObjectOfType <MouseSettings>(); doorOpen = FindObjectOfType <Door_Open>(); for (int i = 0; i < doorTexts.Length; i++) { doorTexts[i].text = "You need: " + data.GetDeurToll() + " coins to open the door"; } }
void Update() { //When user clicks if (Input.GetKeyDown(KeyCode.Mouse0)) { //Create a ray to determine where we hit in the world. Vector3 mousePos = Input.mousePosition; Ray ray = currentCamera.ScreenPointToRay(mousePos); Vector3 worldPoint = ray.GetPoint(-ray.origin.z / ray.direction.z); //Are we in hive view and thus should we place a tile? if (BeehiveManager.bm.gameState == GameState.HIVE_VIEW) { //Place tile based on position Vector3Int tilePos = BeehiveManager.bm.frameTilemap.WorldToCell(worldPoint); tilePos.z = 0; BeehiveManager.bm.ClickOnCell(tilePos); } } //Depending on our view, assign mouse settings. MouseSettings currentSettings = BeehiveManager.bm.gameState == GameState.MAP_VIEW ? mapSettings : hiveSettings; //If we've scrolled since the last frame if (Input.mouseScrollDelta.y != 0) { //Adjust our orthographic sized based on how far we scrolled, with a multiplier. float verticalDelta = Input.mouseScrollDelta.y; currentCamera.orthographicSize += verticalDelta * currentSettings.scrollSpeed; //Clamp high and low so the user doesn't go crazy with scroll amount. currentCamera.orthographicSize = Mathf.Clamp(currentCamera.orthographicSize, currentSettings.minCameraSize, currentSettings.maxCameraSize); } //Drag mode if (Input.GetKey(KeyCode.Mouse1)) { //This ensures our last mouse position is kept before we drag again, prevents glitchiness. if (Input.GetKeyDown(KeyCode.Mouse1)) { lastMousePos = Input.mousePosition; } //Normalize our delta vector so the camera doesn't go anywhere super fast. Vector3 mouseDelta = (lastMousePos - Input.mousePosition).normalized; //Offset our camera position. currentCamera.transform.position += mouseDelta * currentSettings.dragSpeed * Time.deltaTime; lastMousePos = Input.mousePosition; } }
private void OnConfigurationChanged() { // General GeneralSettings generalSettings = this.configuration.General; this.chkMinimizeOnRecord.Checked = generalSettings.MinimizeOnRecord; this.chkHideFromTaskbar.Checked = generalSettings.HideFromTaskbar; this.txtOutputDirectory.Text = generalSettings.OutputDirectory; // Hotkeys HotKeySettings hotKeys = this.configuration.HotKeys; this.chkGlobalHotKeys.Checked = hotKeys.Global; this.hkCancel.Value = hotKeys.Cancel; this.hkPause.Value = hotKeys.Pause; this.hkRecord.Value = hotKeys.Record; this.hkStop.Value = hotKeys.Stop; // Mouse MouseSettings mouse = this.configuration.Mouse; this.chkRecordCursor.Checked = mouse.RecordCursor; this.chkHighlighCursor.Checked = mouse.HighlightCursor; this.cursorHighlightOptions.Color = mouse.HighlightCursorColor; this.cursorHighlightOptions.Radious = mouse.HighlightCursorRadious; // Sound SoundSettings sound = this.configuration.Sound; SoundDevice soundDevice = null; if (!string.IsNullOrEmpty(sound.DeviceId)) { soundDevice = new SoundDevice(sound.DeviceId); } this.soundDeviceSelector.SoundDevice = soundDevice; SoundFormat soundFormat = sound.Format; if (soundFormat != null) { this.cmbSoundFormatTag.SelectedItem = soundFormat.Tag; if (soundFormat != null && !this.cmbSoundFormat.Items.Contains(soundFormat)) { this.cmbSoundFormat.Items.Add(soundFormat); } this.cmbSoundFormat.SelectedItem = soundFormat; } // Tracking // this.trackerSelector.TrackingSettings = this.configuration.Tracking; // Video VideoSettings video = this.configuration.Video; this.cmbSoundFormat.Text = video.Fps.ToString(); this.videoQuality = video.Quality; this.videoFps = video.Fps; this.cmbFps.Text = this.videoFps.ToString(); this.tbQuality.Value = this.videoQuality; // Watermark WatermarkSettings watermark = this.configuration.Watermark; this.chkWatermark.Checked = watermark.Display; this.txtWatermark.Text = watermark.Text; this.watermarkOptions.WatermarkAlignment = watermark.Alignment; this.watermarkOptions.WatermarkColor = watermark.Color; this.watermarkOptions.WatermarkFont = watermark.Font; this.watermarkOptions.WatermarkMargin = watermark.Margin; this.watermarkOptions.WatermarkOutline = watermark.Outline; this.watermarkOptions.WatermarkOutlineColor = watermark.OutlineColor; this.watermarkOptions.WatermarkRightToLeft = watermark.RightToLeft; this.watermarkOptions.WatermarkText = watermark.Text; // this.UpdateHighlightImage(); this.UpdateVideoQualityControls(); }
public MouseInterceptor(ILogger logger, MouseSettings settings) { this.logger = logger; this.settings = settings; }
private Configuration() { var properties = Properties.Settings.Default; // Read configuration section elements // General string outputDir = properties.General_OutputDirectory; if (string.IsNullOrEmpty(outputDir)) { string myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); try { outputDir = Path.Combine(myDocuments, outputDirInMyDocs); } catch (ArgumentException) { outputDir = myDocuments; } } GeneralSettings general = new GeneralSettings(); general.MinimizeOnRecord = properties.General_MinimizeOnRecord; general.HideFromTaskbar = properties.General_HideFromTaskbarIfMinimized; general.OutputDirectory = outputDir; // Hot Keys HotKeySettings hotKeys = new HotKeySettings(); hotKeys.Cancel = properties.HotKeys_Cancel; hotKeys.Global = properties.HotKeys_Global; hotKeys.Pause = properties.HotKeys_Pause; hotKeys.Record = properties.HotKeys_Record; hotKeys.Stop = properties.HotKeys_Stop; // Mouse MouseSettings mouse = new MouseSettings(); mouse.HighlightCursor = properties.Mouse_HighlightCursor; mouse.HighlightCursorColor = properties.Mouse_HighlightCursorColor; mouse.HighlightCursorRadious = properties.Mouse_HighlightCursorRadious; mouse.RecordCursor = properties.Mouse_RecordCursor; // Sound SoundSettings sound = new SoundSettings(); sound.DeviceId = properties.Sound_DeviceId; sound.Format = properties.Sound_Format; // Tracking TrackingSettings tracking = new TrackingSettings(); tracking.Bounds = properties.Tracking_Bounds; tracking.Type = properties.Tracking_Type; // Video VideoSettings video = new VideoSettings(); video.Compressor = properties.Video_Compressor; video.Fps = properties.Video_Fps; video.Quality = properties.Video_Quality; // Watermark WatermarkSettings waterMark = new WatermarkSettings(); waterMark.Alignment = properties.Watermark_Alignment; waterMark.Color = properties.Watermark_Color; waterMark.Display = properties.Watermark_Display; waterMark.Font = properties.Watermark_Font; waterMark.Margin = properties.Watermark_Margin; waterMark.Outline = properties.Watermark_Outline; waterMark.OutlineColor = properties.Watermark_OutlineColor; waterMark.RightToLeft = properties.Watermark_RightToLeft; waterMark.Text = properties.Watermark_Text; // Set properties this.General = general; this.HotKeys = hotKeys; this.Mouse = mouse; this.Sound = sound; this.Tracking = tracking; this.Video = video; this.Watermark = waterMark; }
// Use this for initialization void Awake() { playerController = GetComponent <PlayerController>(); mouseSettings = GetComponent <MouseSettings>(); }
public MouseInterceptor(ILogger logger, INativeMethods nativeMethods, MouseSettings settings) { this.logger = logger; this.nativeMethods = nativeMethods; this.settings = settings; }
// Use this for initialization void Start() { mouseSettings = FindObjectOfType <MouseSettings>(); }