Widgets: Button offset?

I’m creating some buttons that are misaligned because the default and over images are different dimensions (i.e. the over state has a large glow that expands beyond the default states borders). There are three solutions I can think of:

  1. Make the default state images the same size as the over state so their contents are in the same place. I’d rather not do this because it’ll eat up disk space/texture memory, and because it might mess up the hit area of the button.

  2. Center align the button images. Is there a way to specify the reference point for button state images?

  3. Provide an offset for each image. Is there any way to specify an offset for individual button state images?
    Any other ideas? [import]uid: 120 topic_id: 22872 reply_id: 322872[/import]

Well, a little experimenting shows that you can access the default and over states after creation:

  
local myButton = widget.newButton{  
 id = 1,  
 left = 0,  
 top = 0,  
 onRelease = buttonHandler,  
 default="Assets/Keypad\_Key\_Default.png",  
 over = "Assets/Keypad\_Key\_Over.png"  
}  
  
--offset over state  
myButton[2].x = -15  
myButton[2].y = -15  
  

I’ll leave this thread up in case anyone else runs into this problem. [import]uid: 120 topic_id: 22872 reply_id: 91372[/import]