コード例 #1
0
        public override void Update()
        {
            base.Update();

            switch (LabelPosition)
            {
            case LabelPosition.Left:
                labelControl.X = this.X - 2 - labelControl.Width;
                labelControl.Y = this.Y + (this.Height - labelControl.Height) / 2;
                break;

            case LabelPosition.Right:
                labelControl.X = this.X + 4 + (this.Width);
                labelControl.Y = this.Y + (this.Height - labelControl.Height) / 2;
                break;

            case LabelPosition.Top:
                labelControl.X = this.X + 2;
                labelControl.Y = this.Y - 2 - labelControl.Height;
                break;

            case LabelPosition.Bottom:
                labelControl.X = this.X + 2;
                labelControl.Y = this.Y + 2 + (this.Height);
                break;
            }

            labelControl.Update();
        }
コード例 #2
0
ファイル: GuiFadingImage.cs プロジェクト: bsimser/CoM
 public override void Update()
 {
     base.Update();
     updateFadeout();
     Image.Update();
     Label.Update();
     age    += Time.deltaTime;
     Visible = (age >= 0);
 }