示例#1
0
        public CombatView(Widget parent) : base(parent)
        {
            relations = new LinkedList <CombatRelation>();

            avatar        = new AvatarView(this);
            avatar.Click += OnCurrentAvatarClick;
            avatar.Move(-avatar.Width, 0);

            btnGive = new GiveButton(this);
            btnGive.Move(-avatar.Width - btnGive.Width - 5, 0);
            btnGive.Click += OnCurrentGiveButtonClick;
        }
示例#2
0
        public CombatRelation(Widget parent, int id)
            : base(parent)
        {
            this.id = id;
            Size    = background.Size;

            avatar = new AvatarView(this);
            avatar.Resize(27, 27);
            avatar.Move(25, (Height - avatar.Height) / 2);
            avatar.Click += OnAvatarClick;

            button = new GiveButton(this);
            button.Resize(15, 15);
            button.Move(5, 4);
            button.Click += OnButtonClick;

            label = new Label(this, Fonts.Default);
            label.Move(65, 10);
        }