Exemplo n.º 1
0
 public static GameObject CreateLTextClickable(Vector3 position, string text, Transform parentTransform, ClickDelegate clickD)
 {
     textMeshLPrefab = textMeshLPrefab ?? (GameObject)Resources.Load("TextMeshL");
     GameObject gob = CreateText(position, text, textMeshLPrefab, parentTransform);
     Text t = gob.AddComponent<Text>();
     t.clickDelegate = clickD;
     return gob;
 }
Exemplo n.º 2
0
 private static int add_Click(Control Instance,IntPtr l)
 {
     ClickDelegate d = new ClickDelegate(3,l);
           Instance.Click += d.Call;
           int id = LuaManager.Instance.PushStackObject(d);
           LuaApi.lua_pushnumber(l,id);
           return 1;
 }
 public Merchandise(string name, Vector2 position, ItemType category, ClickDelegate clickDelegate)
     : base(c_merchandiseTexturePrefix + name, position)
 {
     Name = name;
     Category = category;
     Value = 0;
     onClick = clickDelegate;
     _clickable = true;
     _clickArea = new Rectangle((int)position.X, (int)position.Y, _width, _height);
 }
Exemplo n.º 4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            _collectionDataSource = new CollectionDataSource(this);
            _cd = new ClickDelegate(this);

            this.View.BackgroundColor = UIColor.FromPatternImage(Images.Background);

            CollectionView = new CollectionViewBinding.PSCollectionView(this.View.Bounds);
            CollectionView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            CollectionView.NumColsLandscape = 4;
            CollectionView.NumColsPortrait = 4;
            CollectionView.BackgroundColor = UIColor.Clear;
            CollectionView.PSCollectionViewDataSourceDelegate = _collectionDataSource;
            CollectionView.PSCollectionViewDelegate = _cd;

            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                CollectionView.NumColsPortrait = CollectionView.NumColsLandscape = 5;
            }

            this.View.AddSubview(CollectionView);
        }
Exemplo n.º 5
0
 public static void RemoveMouseDelegate()
 {
     clickDelegate = null;
 }
Exemplo n.º 6
0
//        public static void Main()
//
//        {
//            _hookID = SetHook(_proc);
//
//            Application.Run();
//
//            UnhookWindowsHookEx(_hookID);
//        }

        public static void SetMouseDelegate(ClickDelegate click)
        {
            clickDelegate += click;
        }
Exemplo n.º 7
0
 private static extern int AcquireComm(int comm, int handle, ClickDelegate cd);
Exemplo n.º 8
0
 private void decSens_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(decSens_Click);
     clickTimer.Start();
 }
Exemplo n.º 9
0
 private void incSipThreshold_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(incSipThreshold_Click);
     clickTimer.Start();
 }
Exemplo n.º 10
0
 private void incDeadzone_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(incDeadzone_Click);
     clickTimer.Start();
 }
Exemplo n.º 11
0
 private void incRightGain_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(incRightGain_Click);
     clickTimer.Start();
 }
Exemplo n.º 12
0
 public TweetView(Tweet t, ClickDelegate userDel, TweetDelegate tweetDel)
 {
     tweet             = t;
     userClickDelegate = userDel;
     tweetDelegate     = tweetDel;
 }
Exemplo n.º 13
0
            //

            //!!!!impl Image

            //public Item( string text, Component_Image image, ClickDelegate click )
            //{
            //	Text = text;
            //	Image = image;
            //	Click = click;
            //}

            public Item(string text, ClickDelegate click)
            //	: this( text, null, click )
            {
                Text  = text;
                Click = click;
            }
Exemplo n.º 14
0
 public void SetOnClickCallback(ClickDelegate methodToCall)
 {
     _button.onClick.AddListener(() => methodToCall(this));
 }
Exemplo n.º 15
0
 public void UnregisterButtonOnClick(ClickDelegate methodToCall)
 {
     _button.onClick.RemoveListener(() => methodToCall(this));
 }
Exemplo n.º 16
0
 public void RegisterButtonOnClick(ClickDelegate methodToCall)
 {
     _button.onClick.AddListener(() => methodToCall(this));
 }
Exemplo n.º 17
0
 public void AddItem(Texture2D icon, string iconText, ClickDelegate clickEvent)
 {
     HamburgerItems.Add(new ContextMenuItem(icon, iconText, clickEvent));
 }
Exemplo n.º 18
0
 public void SetClickHandler(ClickDelegate onClickFn)
 {
     this.onClickFn = onClickFn;
 }
Exemplo n.º 19
0
 public ClickLayer(float zIndex, ClickDelegate checkClick)
 {
     this.zIndex = zIndex;
     this.checkClick = checkClick;
 }
Exemplo n.º 20
0
 private void decStrongPuffThreshold_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(decStrongPuffThreshold_Click);
     clickTimer.Start();
 }
Exemplo n.º 21
0
 public TestSAButton(ClickDelegate clickDel)
     : base(init_resource, init_sourceRectangles, init_position, clickDel)
 {
 }//记住,在基类中已经注册了
Exemplo n.º 22
0
 public ConversationView(Conversation c, ClickDelegate del)
 {
     conversation  = c;
     clickDelegate = del;
 }
Exemplo n.º 23
0
 private void incHoldThreshold_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(incHoldThreshold_Click);
     clickTimer.Start();
 }
Exemplo n.º 24
0
 public UserMessageView(UserMessage m, ClickDelegate del)
 {
     message       = m;
     clickDelegate = del;
 }
Exemplo n.º 25
0
 private void decSpeedY_MouseHover(object sender, EventArgs e)
 {
     functionPointer = new ClickDelegate(decSpeedY_Click);
     clickTimer.Start();
 }
Exemplo n.º 26
0
 public void RegistClickDelegate(ClickDelegate clickDel)
 {
     m_clickDelegate += clickDel;
 }
Exemplo n.º 27
0
 public void UnRegistClickDelegate(ClickDelegate clickDel)
 {
     m_clickDelegate -= clickDel;
 }
Exemplo n.º 28
0
 public void Init(string caption, Sprite image = null, ClickDelegate callBack = null)
 {
     textField.text = caption;
     this.callBack  = callBack;
     GetComponent <Image>().sprite = image;
 }