protected override void OnAttach() { base.OnAttach(); down = false; BackTexture = UpTexture; MouseDown += new MouseButtonDelegate(EItemControl_MouseDown); MouseUp += new MouseButtonDelegate(EItemControl_MouseUp); }
protected override void OnAttach() { base.OnAttach(); down = false; BackTexture = UpTexture; modetxt.Position = ModePosition; aptxt.Position = APPosition; modetxt.AutoSize = aptxt.AutoSize = true; bg.HorizontalAlign = HorizontalAlign.Center; bg.VerticalAlign = VerticalAlign.Center; Controls.Add(bg); Controls.Add(aptxt); Controls.Add(modetxt); MouseDown += new MouseButtonDelegate(EItemControl_MouseDown); MouseUp += new MouseButtonDelegate(EItemControl_MouseUp); }
/// <summary>Subscribes the detector to all input devices</summary> private void subscribeAllEvents() { // Subscribe to all chat pads for (PlayerIndex index = PlayerIndex.One; index <= PlayerIndex.Four; ++index) { var reporter = new KeyReporter(this.detectedDelegate, (ExtendedPlayerIndex)index); var method = new KeyDelegate(reporter.KeyPressed); this.inputService.GetKeyboard(index).KeyPressed += method; this.subscribedKeyReporters.Push(method); } // Subscribe to the main PC keyboard { var reporter = new KeyReporter(this.detectedDelegate, null); var method = new KeyDelegate(reporter.KeyPressed); this.inputService.GetKeyboard().KeyPressed += method; this.subscribedKeyReporters.Push(method); } // Subscribe to the main PC mouse { var reporter = new MouseButtonReporter(this.detectedDelegate, null); var method = new MouseButtonDelegate(reporter.MouseButtonPressed); this.inputService.GetMouse().MouseButtonPressed += method; this.subscribedMouseReporters.Push(method); } // Subscribe to all game pads for ( ExtendedPlayerIndex index = ExtendedPlayerIndex.One; index <= ExtendedPlayerIndex.Eight; ++index ) { var reporter = new GamePadButtonReporter(this.detectedDelegate, index); var method = new GamePadButtonDelegate(reporter.ButtonPressed); this.inputService.GetGamePad(index).ButtonPressed += method; this.subscribedGamePadReporters.Push(method); } }
protected override void OnAttach() { base.OnAttach(); MouseDown += new MouseButtonDelegate(ESwitch_MouseDown); }
public static extern MouseButtonDelegate SetMouseButtonPosCallback(WindowHandle window, MouseButtonDelegate callback);
public static extern MouseButtonDelegate SetMouseButtonPosCallback(IntPtr window, MouseButtonDelegate callback);