Widgets

I’ve been wondering how G2 can be applied to widgets? Is there a trick with groups or masks so that you could get something like marching ants around a button? That would be very useful.

Most widgets are some form of display.newGroup or display.container.   These objects are not something that can be stroked or filled, as they are containers.  Therefore, I don’t see a way to apply filters to them.  

We do have the source code for Widgets on our Github repository (http://github.com/coronalabs) and you could build a way to pass in some thing to buttons for instance that would let you specify a stroke on a 2 frame graphics button.

Rob

I’m not using marchingAnts, but have messed around with the effects somewhat.

In using two image widget.newButton() objects, I do know you can currently get a little something something going on if you do this

[lua]

    myButton._view.fill.effect = “filter.pixelate”

[/lua]

Of course: undocumented, unsupported :wink:

Well, one thing I’d like to see is a nice page curl implementation on a scrollView using G2 capabilities. Also look at how slideLeft works on IOS mail app. Existing row data slides left revealing buttons. I have a feeling this could also be simulated using G2 capabilities. Just 2 things off the top of my head for how Widgets could benefit from G2. 

Edit : How about blurred glass look for tabBars and TitleBar areas etc? I think the storyBoard overlays also could use the blurred glass treatment. 

For the blurred glass look, perhaps information in this blog post could inspire you:

http://www.coronalabs.com/blog/2013/09/20/graphics-ios-7-translucent-glass-effect/

Nice. It certainly will work for settings screens etc but not so much for tabBar and titleBar where Apple recommendation is to have content live behind them. In other words, today we typically size our tableView to be just tall enough to fit nicely between a tabBar and a titleBar. If we are to follow the Apple guidance then the tableView has to be full screen height and the blurred tabBar and a titleBar has to reveal some of the content you are scrolling behind the tabBar and a titleBar. Mind you I did not see this in all Apple apps even so I think its an optional look & feel thing. I would be more than happy not to have this but all other widget bugs fixed. Definitely a nice to have! :slight_smile:

Why not just make the graphic you’re putting in the bars partially transparent?  You could do the frosted look in Photoshop and just have it be a fixed look.  And as you said, most people are not doing it.  Event Apple’s tabBar’s seem to be opaque.

Rob

I’ll forget about this for now and focus on bigger issues at hand. Good discussion about what G2 could bring to the table for the widgets though… 

Most widgets are some form of display.newGroup or display.container.   These objects are not something that can be stroked or filled, as they are containers.  Therefore, I don’t see a way to apply filters to them.  

We do have the source code for Widgets on our Github repository (http://github.com/coronalabs) and you could build a way to pass in some thing to buttons for instance that would let you specify a stroke on a 2 frame graphics button.

Rob

I’m not using marchingAnts, but have messed around with the effects somewhat.

In using two image widget.newButton() objects, I do know you can currently get a little something something going on if you do this

[lua]

    myButton._view.fill.effect = “filter.pixelate”

[/lua]

Of course: undocumented, unsupported :wink:

Well, one thing I’d like to see is a nice page curl implementation on a scrollView using G2 capabilities. Also look at how slideLeft works on IOS mail app. Existing row data slides left revealing buttons. I have a feeling this could also be simulated using G2 capabilities. Just 2 things off the top of my head for how Widgets could benefit from G2. 

Edit : How about blurred glass look for tabBars and TitleBar areas etc? I think the storyBoard overlays also could use the blurred glass treatment. 

For the blurred glass look, perhaps information in this blog post could inspire you:

http://www.coronalabs.com/blog/2013/09/20/graphics-ios-7-translucent-glass-effect/

Nice. It certainly will work for settings screens etc but not so much for tabBar and titleBar where Apple recommendation is to have content live behind them. In other words, today we typically size our tableView to be just tall enough to fit nicely between a tabBar and a titleBar. If we are to follow the Apple guidance then the tableView has to be full screen height and the blurred tabBar and a titleBar has to reveal some of the content you are scrolling behind the tabBar and a titleBar. Mind you I did not see this in all Apple apps even so I think its an optional look & feel thing. I would be more than happy not to have this but all other widget bugs fixed. Definitely a nice to have! :slight_smile:

Why not just make the graphic you’re putting in the bars partially transparent?  You could do the frosted look in Photoshop and just have it be a fixed look.  And as you said, most people are not doing it.  Event Apple’s tabBar’s seem to be opaque.

Rob

I’ll forget about this for now and focus on bigger issues at hand. Good discussion about what G2 could bring to the table for the widgets though…