Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Change size of button and set position for button — Gideros Forum

Change size of button and set position for button

omeromer Member
edited September 2012 in Game & application design
Is is possible to change size of button and set position for button on scene controller for e-book template?
Tagged:

Comments

  • talistalis Guru
    Accepted Answer
    of course button is actually a sprite object. So you will just code as:
     
    --and your button will be scaled.
    yourbuttonvariable:setScale(x,y)
     
    --If you want to scale only in x coordinate then
    yourbuttonvariable:setScaleX(x)
     
    --If you want to scale only in y coordinate then
    yourbuttonvariable:setScaleY(x)
     
    --Or for setting position 
    yourbuttonvariable:setPosition(x,y)
     
    --If you want to change only x position
    yourbuttonvariable:setX(x)
     
    --If you want to change only Y position
    yourbuttonvariable:setX(y)
  • Thanks for your kindly answer.
Sign In or Register to comment.