Ejemplo n.º 1
0
 public void Monitoring(FieldInfo ConfigField, TaiwuLabel Label, UnityUIKit.GameObjects.Button bt)
 {
     Monitored = !Monitored;
     if (Monitored)
     {
         HotkeyField = ConfigField;
         ValueLabel  = Label;
         Button      = bt;
         bt.Text     = "请按下按键";
     }
     else
     {
         Monitored   = false;
         KeyCodes    = new Dictionary <KeyCode, bool>();
         FinalKey    = KeyCode.None;
         Button.Text = "修改快捷键";
     }
 }
Ejemplo n.º 2
0
        public override void Create(bool active)
        {
            Group.Direction       = UnityUIKit.Core.Direction.Horizontal;
            Element.PreferredSize = new List <float>
            {
                0, 75
            };

            var lable = new TaiwuLabel
            {
                Name        = $"Label,{Item[999]}",
                Text        = "<color=#B97D4BFF>" + DateFile.instance.GetItemDate(int.Parse(Item[999]), 0) + "</color>",
                UseBoldFont = true,
                Element     =
                {
                    PreferredSize = { 0, 50 }
                }
            };

            Children.Add(lable);

            Children.Add(new TaiwuButton
            {
                Name        = "Add",
                Text        = "添加",
                UseBoldFont = true,
                UseOutline  = true,
                Element     =
                {
                    PreferredSize = { 75, 50 }
                },
                FontColor = Color.white,
                OnClick   = AddItem
            });

            base.Create(active);

            lable.GameObject.tag = "ActorItem";
            lable.Get <PointerEnter>();
        }