In the TabBar sample, how were the tab bar buttons created? Specifically the highlighted ones?
Thanks [import]uid: 6981 topic_id: 2096 reply_id: 302096[/import]
In the TabBar sample, how were the tab bar buttons created? Specifically the highlighted ones?
Thanks [import]uid: 6981 topic_id: 2096 reply_id: 302096[/import]
The TabBar sample uses two images per tab. For Xcode projects you create a transparent image and the OS takes care of dimming out the image. In Corona, you can duplicate the process by creating a normal image (when selected) and one that has dimmed out (alpha channel reduced). You can create the images in Photoshop or a similar program.
It looks the highlighted images were created with a gradient mask.
-Tom [import]uid: 7559 topic_id: 2096 reply_id: 6259[/import]
Thanks Tom.
Anyone have a specific guide on how to make them? The overlay images precisely. I tried making the effect but could not get it right.
Thanks again [import]uid: 6981 topic_id: 2096 reply_id: 6273[/import]
Take a look at the tab bar example in the PSD file you can download here as it is how I learned to “do” the effect. You can right click the icon layer and go to “Copy Layer Style” and then paste it to your own icon / tab bar designs.
http://www.teehanlax.com/blog/2010/06/14/iphone-gui-psd-v4/ [import]uid: 4621 topic_id: 2096 reply_id: 6292[/import]
Hi @Zack,
I have the most up-to-date tab bar code posted on bitbucket. The source also includes the Photoshop file I used to create the graphics for the tab bar. Take a look in the assets folder:
http://bitbucket.org/gilbert/view-controller-library/src/e39e0979c691
There’s one source file:
* GUI.psd - use this file to create your default and over images
And there’s two other files that show how you should flatten GUI.psd before cropping. It’s important to put guides in your GUI.psd file so that when you create the two flattened files, you can use them for cropping. The default and over images should be exactly the same size (as will any other buttons.)
* GUI_flattened.psd
* GUI_flattened_over.psd
And for a great resource for iPhone icons check out: http://glyphish.com/
-Gilbert [import]uid: 5917 topic_id: 2096 reply_id: 6357[/import]
Hi Gilbert,
I’m using your great library as a starting point to aid my development of my first app (more of a general purpose data handling app - than a game).
A couple of comments then a question…
* I added a 4th tab, and it was easy just to add another set of images and screenX.lua to get it going.
* Ive added a lot of display objects and everything was ok with GC and switching screens until I added alerts, buttons, button events, and native keyboard entry. Since then I can switch back and forth (between the screens) a couple of times before the corona emulator, or the iphone emulator in the sdk dumps core. Additionally, before I found the console log/iphone emulator - I was trying to debug using alert boxes and after a couple of invocations all keyboard events got stuck going to the same alert handler (Strange eh?)
* sometimes in the iphone emulator, the native keyboard balloon boxes would not be removed between screen switches (and was usually a pre-cursor to a crash)
q1) I am adding event listeners to the display group, and in the cleanup function I remove them.
Since Ive done this, it crashes still ocur, but not as quickly. Is this appropriate? Should I do it differently? It looks like this… in screen#.lua new function.
local FileField = native.newTextField( 20, 180, 250, 30, fieldHandler2 )
FileField.font = native.newFont( native.systemFontBold, inputFontSize )
FileField.text=fFileField
g:insert(FileField)
local FileLabel = display.newText( “File”, 275, 190, native.systemFontBold, 16 )
FileLabel:setTextColor( 255, 255, 255, 255 )
g:insert(FileLabel)
buttonTest.x=106; buttonTest.y=300
g:insert(buttonTest)
buttonSet.x=212; buttonSet.y=300
g:insert(buttonSet)
g:addEventListener(“b1”,buttonHandler1)
g:addEventListener(“b2”,buttonHandler2)
g:addEventListener(“f1”,fieldHandler1)
g:addEventListener(“f2”,fieldHandler2)
g:addEventListener(“ok”,onComplete)
end
[import]uid: 9070 topic_id: 2096 reply_id: 6383[/import]
You might need to “nil” all of your variables in the cleanup function just to be completely sure that all of the objects have been removed.
You can either just nil them in the cleanUp function one by one by naming them all, e.g.:
FileField:removeSelf()FileField:nilFileLabel:removeSelf()FileLabel:nil[/code]Or if they're all in the "g" group, then you can try iterating over g's children in the cleanUp function:for i=g.numChildren,1,-1 do g[i]:removeSelf() g[i] = nilend[/code]Here's more info about nil'ing objects and cleaning up properly:http://developer.anscamobile.com/content/application-programming-guide-graphics-and-drawing#Removing_Objects_Properly [import]uid: 5917 topic_id: 2096 reply_id: 6408[/import]