private void OnMouseClick(MouseClickEventArgs e) { MouseClickEventHandler handler = MouseClick; if (handler != null) { handler(this, e); } }
private void OnSlideAxeX(MouseClickEventArgs e) { MouseClickEventHandler handler = MouseClicking; if (handler != null) { handler(this, e); } }
public SolidButton(Vector2 minPos, float width, float height) { fontStr = "font1"; w = width; h = height; pos = minPos; rectPoly = new RectPoly(minPos, width, height); tex = ResourceManager.Resources["pixel"]; currColor = InactiveColor; MouseOver += new MouseOverEventHandler(Button_MouseOver); MouseLeftDown += new MouseClickEventHandler(SolidButton_MouseLeftDown); }
public Scene_Play() { world = new World(); klistener = new KeyListener(); world.InitBoard(); world.InitBoard(); //1回だけだと例外が発生する BoardInitializer.Init(world); Pointing = delegate(int x, int y) { world.OnFocus(x, y); }; Clicking = delegate(int Code) { world.OnClick(Code); }; klistener.OnPoint += Pointing; klistener.MouseDown += Clicking; IsRunning = true; klistener.KeyDown += delegate(int KeyCode) { if(KeyCode == DX.KEY_INPUT_ESCAPE) IsRunning = false; }; }