Just confirmed, what I described above ALSO works with UI buttons (haven’t done it with labels yet, but I’m 100% sure it works). On my iPod touch 4, my UI button text now looks EXTREMELY sharp. Here’s how to modify ui.lua:
Find this line:
[blockcode]
if ( params.size and type(params.size) == “number” ) then size=params.size else size=20 end
if ( params.font ) then font=params.font else font=native.systemFontBold end
if ( params.textColor ) then textColor=params.textColor else textColor={ 255, 255, 255, 255 } end
[/blockcode]
Immediately under those lines, add this:
[blockcode]
size = size * 2
[/blockcode]
Then, very shortly below that, look for this IF statement:
[blockcode]
if ( params.emboss ) then
[/blockcode]
And right before the “end” of that block, add this:
[blockcode]
labelHighlight.xScale = .5; labelHighlight.yScale = .5
labelShadow.xScale = .5; labelShadow.yScale = .5
[/blockcode]
And lastly, find these lines (should be immediately after the section above):
[blockcode]
labelText = display.newText( newText, 0, 0, font, size )
labelText:setTextColor( textColor[1], textColor[2], textColor[3], textColor[4] )
button:insert( labelText, true )
labelText.y = labelText.y + offset
self.text = labelText
[/blockcode]
And immediately below that, add this:
[blockcode]
labelText.xScale = .5; labelText.yScale = .5
[/blockcode]
And that’s it! Once you make those modifications to ui.lua, your ui button text will be extremely sharp on the iPhone4/iPod touch 4 retina display.
You can find the ui label section in ui.lua and do the same modifications and your ui labels will look great as well.
To Ansca: Request to make those modifications to ui.lua standard in future releases! The difference between blurry button text and the sharp button text is like night/day.
Hope that helps!
[import]uid: 7849 topic_id: 2209 reply_id: 8454[/import]