custom font - decimals
Hi, I tried searching for a solution but could not find any..
I have a number - 97.5347
It is an integer..
I have a custom font numbers in place for the 97
BUT how can I make a custom font rule for my .5347
Hope you understand, thanks
I have a number - 97.5347
It is an integer..
I have a custom font numbers in place for the 97
BUT how can I make a custom font rule for my .5347
Hope you understand, thanks
Sydney Swans 2014!!
Best Answer
-
MotherHoose Posts: 2,456
game.score is a real type attribute
add attribute … Index type … name: whole#
… changeAttribute: game.whole# To. floor(game.score)
add attribute … real type … name: decimal#
… changeAttribute: game.decimal# To: game.score - game.whole#
add attribute … Index type … name: convertDecimal#
… changeAttribute: game.convertDecimal# To: game.decimal#*10000
in your display of score:
implement customFonts
for the two place in whole#
add a decimal point place with customFont
then implement the customFonts for the numbers in convertDecimal#
think of this as displaying 2 different numbers separated by a period … in a customFontMH
Answers
The way I did this was make an extra atribute and have a change atribute somewhere that does 97.5347 x 10000 then you get 975347. Make this number into custom fonts. (I guess you already know how from what you wrote). Then haven an extra actor for the dot.
Lump Apps and My Assets
Hi thanks, i understand
accidently pressed rejectt..
Sydney Swans 2014!!
thanks,,,
Sydney Swans 2014!!
Ace