Пример #1
0
        public Text(string fontName, string text, Vector2 position)
            : this()
        {
            Vector2 screenSize = new Vector2(ParentScreen.ParentGame.ScreenWidth, ParentScreen.ParentGame.ScreenHeight);
            Settings = new TextSettings();
            Settings.FontName = fontName;
            Settings.Text = text;
            Settings.Position = (position - screenSize * 0.5f) / screenSize.Y;

            ApplySettings(Settings);
        }
Пример #2
0
        public Text(string fontName, string text, Vector2 position)
            : this()
        {
            Vector2 screenSize = new Vector2(ParentScreen.ParentGame.ScreenWidth, ParentScreen.ParentGame.ScreenHeight);

            Settings          = new TextSettings();
            Settings.FontName = fontName;
            Settings.Text     = text;
            Settings.Position = (position - screenSize * 0.5f) / screenSize.Y;

            ApplySettings(Settings);
        }
Пример #3
0
 public override void ApplySettings(EntitySettings settings)
 {
     base.ApplySettings(settings);
     this.Settings = CastSettings<TextSettings>(settings);
     HandleSettingsChanged();
 }
Пример #4
0
 public override void ApplySettings(EntitySettings settings)
 {
     base.ApplySettings(settings);
     this.Settings = CastSettings <TextSettings>(settings);
     HandleSettingsChanged();
 }