Codesnippets > Userlibs [ *.gbal]


<< < (2/2)

Current version: 1.05

Field: fixed

IconCircle and List can be used with any mouse button now.

New FUNCTIONs: fnLoadXF(), fnXF(), fnReadXF()

XFont reduces the distance between the letters


1. Create a font bitmap with GLBs Font Creator
   NOTE: It must have 256 characters
              The background color must be black (RGB(0,0,0))

2. Start XFont Creator
   (double click on the red "XF" icon in the main directory)

3. Load the Font

4. Type in the name of this font (without file format)
   It will be copied into the "...Media/GFX" directory
   together with a .txt file (which holds the width of the letters).

5. Load the font with fnLoadXF(name$, LOADANIM index GFX)
   NOTE: the first XFont you load has the index 0
              the second 1 etc.
             The LOADANIM index is not relevant when you use the font.

6. Use it with: fnXF(Text$, x, y, index) to print a single line
   If you want to draw a .txt file, use:
   fnReadXF(.txt file$, x, y, index, y space between lines)

NOTE: Characters with a vertical gap inside like the " symbol
      could be problematic, because the creator only counts the
      non-transparent pixels as size (width).
      Since I use the outline option in GLBs Font Creator and
      donĀ“t generate big fonts, I left it this way.
      But if you need to fix this for your own, rewrite the size
      in the corresponding .txt file.

Somehow I have problems with the transparent color when I use the .png
format. If you have the same problem, replace the pink color via masking
with the transparent Alpha.
You can use "Allegro Sprite Editor" for this.

it's a very interesting graphical interface. I had already tested it long ago.

 :good: Work!

ps : indeed, the cursor in the demo is not transparent.
you should use PNG with an alpha channel, the contours would be more nice (and no problems with transparency)


[0] Message Index

[*] Previous page

Go to full version