Game Development Reference
In-Depth Information
Figure 11-16
.
Bitmap font label properties
Speaking of bitmap font label properties, the
Opacity
,
Color
, and
Blend
mode properties
are borrowed from the sprite properties and have the same effect. The
Label text
and
Localize
properties are the same as for TTF labels. Only the
Font file
property is new, but
it's nothing special.
Use the
Font file
property to browse and select the
gd.bmfont
file in the
Fonts
folder. If
you are using your own bitmap font, just select that. The type of font doesn't actually mat-
ter as long as the font is working.
Then enter
Hits: %i
in the
Label text
field as seen in
Figure 11-16
.
You can use any string
format specifiers, like
%i
,
%@
,
%.1f
, and so on in a label's text field. This allows you to
fill in the missing parts at runtime with little effort. Click the
Localize
check box to make
the initial string the key for the localized string and to enable the
Edit
button. Click the
Edit
button to bring up the localization dialog.
In the localization dialog, enter
Hits: %i
in the column labeled
English (en)
and enter
Treffer: %i
in the column labeled
German (de)
, or use whatever language you initially ad-
ded and enter the corresponding language string instead of the German text. Just make
sure all language strings contain the same number and types of string format specifiers. In
this case, there ought to be a
%i
in every translated language string.
Figure 11-17
shows
the result of editing the localized strings.
Search WWH ::
Custom Search