Esempio n. 1
0
 /// <summary>
 /// A method that creates an AssetSpriteFont from a spritefont project file and registers it on the AssetManager.
 /// </summary>
 /// <param name="label">The label the asset is to be given.</param>
 /// <param name="fileName">The filename of the spritefont file in the project this asset will be associated with.</param>
 /// <returns>A pointer to the created asset.</returns>
 public static AssetSpriteFont CreateAssetSpriteFont(String label, String fileName)
 {
     SpriteFont font = content.Load<SpriteFont>(fileName);
     AssetSpriteFont asset = new AssetSpriteFont(label, font);
     fonts.Add(asset);
     return asset;
 }
Esempio n. 2
0
        /// <summary>
        /// A method that creates an AssetSpriteFont from a spritefont project file and registers it on the AssetManager.
        /// </summary>
        /// <param name="label">The label the asset is to be given.</param>
        /// <param name="fileName">The filename of the spritefont file in the project this asset will be associated with.</param>
        /// <returns>A pointer to the created asset.</returns>
        public static AssetSpriteFont CreateAssetSpriteFont(String label, String fileName)
        {
            SpriteFont      font  = content.Load <SpriteFont>(fileName);
            AssetSpriteFont asset = new AssetSpriteFont(label, font);

            fonts.Add(asset);
            return(asset);
        }
Esempio n. 3
0
 public DrawableText(AssetSpriteFont font, GameObject parent, String text, Color color)
 {
     this.font   = font;
     this.parent = parent;
     this.text   = text;
     this.filter = color;
     scale       = Vector2.One;
 }
Esempio n. 4
0
 public DrawableText(AssetSpriteFont font, GameObject parent, String text, Color color)
 {
     this.font = font;
     this.parent = parent;
     this.text = text;
     this.filter = color;
     scale = Vector2.One;
 }
Esempio n. 5
0
                public DefaultEntry(GameManager manager, String text)
                    : base(manager.world)
                {
                    this.manager = manager;

                    AssetSpriteFont font = AssetManager.getAssetSpriteFont("menuHeaderFont");

                    texture       = new DrawableText(font, this, text, Color.Gray);
                    texture.layer = 0.5f;
                }
Esempio n. 6
0
 public DrawCallSpriteFontText(AssetSpriteFont font, String text, Color filter, Vector2 position, float rotation, float layer, Vector2 scale)
 {
     this.font     = font;
     this.text     = text;
     this.filter   = filter;
     this.position = position;
     this.rotation = rotation;
     this.layer    = layer;
     this.scale    = scale;
 }
Esempio n. 7
0
        public LandLoadPreviewer(World world, Land loadingLand)
            : base(world)
        {
            this.loadingLand = loadingLand;

            AssetSpriteFont font = AssetManager.CreateAssetSpriteFont("landLoaderFont", "defaultFont");

            statusText = new DrawableText(font, this, "", Color.White);

            statusBar          = new DrawableTexture("whiteSquare", this);
            statusBar.size     = new Vector2(20f, 10f);
            statusBar.position = new Vector2(0f, 30f);
        }
Esempio n. 8
0
 public DrawCallSpriteFontText(AssetSpriteFont font, String text, Color filter, Vector2 position, float rotation, float layer, Vector2 scale)
 {
     this.font = font;
     this.text = text;
     this.filter = filter;
     this.position = position;
     this.rotation = rotation;
     this.layer = layer;
     this.scale = scale;
 }