custom font - decimals

stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
edited May 2012 in Working with GS (Mac)
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

Sydney Swans 2014!!

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    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 customFont

    image MH

Answers

  • LumpAppsLumpApps Member Posts: 2,881
    Hi,
    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.
  • stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
    edited May 2012
    Hi,
    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.

    Hi thanks, i understand

    accidently pressed rejectt..

    Sydney Swans 2014!!

  • stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
    Hi, would there be another way because I want to post a score that is under 100..

    thanks,,,

    Sydney Swans 2014!!

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    @brendanzh926 - He just showed you how to do it under 100 - Play around with what he said for a while.

    Ace
Sign In or Register to comment.