Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Textfield Scale bug? — Gideros Forum

Textfield Scale bug?

unlyingunlying Guru
edited August 2013 in Bugs and issues
I'm doing this:
healtht:setText(hpamount.."/"..hpcap)
print("healht"..healtht:getWidth())
print("healh"..health:getWidth())
print("//"..health:getWidth()/healtht:getWidth())
healtht:setScaleX(health:getWidth()/healtht:getWidth())
healtht:setPosition(health:getX()+health:getWidth()/2-healtht:getWidth()/2,health:getY()+healtht:getHeight()*3)
print("healht"..healtht:getWidth())

and get that:
healht176.32653808594
healh180
//1.0208332900648
healht110.25

How is it possible?

Comments

  • and if in the end you print:
    print("healtht scale", healtht:getScaleX())
    what does it output?
  • healtht scale 1
  • hmm, really, after scaling it with healtht:setScaleX(health:getWidth()/healtht:getWidth()) it still shows 0?
    And are you sure your are not scaling parent sprites somehwere else?
  • unlyingunlying Guru
    edited August 2013
    it shows 1. Don't really know what to do with that. Will try to create new textfield.
Sign In or Register to comment.