Exemplo n.º 1
0
        private void OnMouseClick(MouseClickEventArgs e)
        {
            MouseClickEventHandler handler = MouseClick;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 2
0
        private void OnSlideAxeX(MouseClickEventArgs e)
        {
            MouseClickEventHandler handler = MouseClicking;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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; };
        }