Merge BitmapFont and UI skin in single Atlas?

If I have a UI with a .atlas and a BitmapFont with a .atlas is there a simple way to combine these into one or do I have to merge them myself in a image file and manually offset all the elements in the combined .atlas to the correct position? It is doable manually but kinda tedious, and if there is a slight calculation error one might have to redo every position and/or size.

Answers


Yes you can! Just let TexturePacker do the packing work for you:

  1. Put the BitmapFont's .png file in the same folder where TexturePacker reads your images to pack. The same folder where all the other images are
  2. Put the BitmapFont's .fnt file in the same folder where your skin's .atlas file is (usually in the assets folder inside android project)
  3. Refresh the assets folder in eclipse (just in case..)
  4. Now you can use the Bitmap font in the styles.json, like for example:

    com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: somefont.fnt } }


Need Your Help

SQL Server convert varchar into datetime to select date range

sql-server datetime

I need to select a date range from a MSSQL database but the s.ended field has not been set up as a datetime field. It has been set up as a varchar and the format for the date stored is d/m/Y.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.