New Candy Lib: Widget Candy for Corona

Just purchased Wiget candy and particle candy. Looking forward to integrating wiget candy into may app to clean up the interface over the next week or two.

I would love to see a ScrollView Widget from you guys. There are issues that I’ve run into with both v1 and v2 scrollview widgets from Corona. Having one that is integrated with wiget candy would be outstanding. It’s could be contained by a border that could be sized as needed based on device display area, and easily located on the screen allowing for custom ui’s by the user, or at least allow us to code a few ui arrangement options.

I don’t think I need particle candy for my current app, but I couldn’t pass up the 50% off :wink:

Thanks again
T [import]uid: 170004 topic_id: 25953 reply_id: 144789[/import]

I just noticed I somehow have a double post separated by like 8 hrs…  Not sure how that happened but sorry about it anyway.  ;)

I have a problem I’m trying to work around that involves a narrow window and the caption text being cut short, or, If I make it as narrow as I want to, the caption doesn’t appear at all.

I want to use the window for displaying details for the player, like movement points and resources.  The label was meant to be the turn count.

Can someone tell me what I need to hack to make this work?  For instance, if I have the window at 18% width, the caption text says “T…” instead of “TURN: X”.

It won’t display the whole caption until I put width up to around 30%, and that is just a huge waste of space.

Any suggestions would be great,

Thanks

I just noticed I somehow have a double post separated by like 8 hrs…  Not sure how that happened but sorry about it anyway.  ;)

I have a problem I’m trying to work around that involves a narrow window and the caption text being cut short, or, If I make it as narrow as I want to, the caption doesn’t appear at all.

I want to use the window for displaying details for the player, like movement points and resources.  The label was meant to be the turn count.

Can someone tell me what I need to hack to make this work?  For instance, if I have the window at 18% width, the caption text says “T…” instead of “TURN: X”.

It won’t display the whole caption until I put width up to around 30%, and that is just a huge waste of space.

Any suggestions would be great,

Thanks

Hello

I have written a small bakery utility app for iOS and Android: http://www.fearby.com/products/recent-apps/bakery-apps-for-industry/

I have a small issue with Android, some users report that text is entered backwards.  I checked this thread and they said to disable input and use a native input?

Q1) Does anyone have some sample code for achieving this on android?

Do I need to modify the widget_candy.lua: V._CreateInput = function(Widget) fucntion to get it to redirect to a native box?

I have loads of textboxes and was hoping for a fix from widget candy.

Hello

I have written a small bakery utility app for iOS and Android: http://www.fearby.com/products/recent-apps/bakery-apps-for-industry/

I have a small issue with Android, some users report that text is entered backwards.  I checked this thread and they said to disable input and use a native input?

Q1) Does anyone have some sample code for achieving this on android?

Do I need to modify the widget_candy.lua: V._CreateInput = function(Widget) fucntion to get it to redirect to a native box?

I have loads of textboxes and was hoping for a fix from widget candy.

FearTec,

Did you ever get an answer?  I would be interested in a solution as well.

I don’t have backwards text, but the input area is cutting off half the text as it is entered.

I am also wondering if it is possible to enter the text directly into the text field that the user taps, instead of displaying a text field on the top of the screen.

thanks,

No reply yet, I’m still getting reverse text inout on Android.

FearTec,

Did you ever get an answer?  I would be interested in a solution as well.

I don’t have backwards text, but the input area is cutting off half the text as it is entered.

I am also wondering if it is possible to enter the text directly into the text field that the user taps, instead of displaying a text field on the top of the screen.

thanks,

No reply yet, I’m still getting reverse text inout on Android.

Quick question (apologies if it’s been answered).

Is some of the documentation incomplete? Is there an updated version somewhere that I’m missing?

I’m using this for example:

http://www.x-pressive.com/WidgetCandy_Corona/reference.html#WG1

And I want to set the title for my window… it doesn’t seem to be a Property?

I took a few guesses and managed to set “caption”, but it’s left-aligned. So now I’m wondering if there’s caption alignment properties?

Not sure if I’m missing something, or the documentation is.

EDIT: All good - found the answer in some code further up on this page. Where do those additional properties come from though - i.e. where are they documented? textAlign = “center”

Automated Widget Layout  
Widget Candy comes with a powerful, automated layout system to arrange your widgets automatically inside a window widget, for example. There is no need to fiddle with widget coordinates, Widget Candy will do this for you. Each widget’s position, as well as it’s width and height, can be set to percentage values (which are either referring to the screen size or a parent window’s size). Additionally, automatic widget alignment allows you to use “left”, “center” or “right” as a widget’s x-position, for example to automatically place it on the left or right border of the screen (or a parent window) or to center it for you. You even don’t need to specify any coords at all for your widgets, simply place them inside a window widget and let Widget Candy layout them automatically for you. Layouting an interface has never been easier! 

How does this work exactly? Does it happen automatically, or is it something that needs to be turned on?

I create a window. The an input field (just setting x to center, no y value), then another input field (again just setting x to center). When I run this, it places one on top of the other. I assumed this auto layout of items added to the window would automatically place one after the other in the order that they’re created. Is that not how it works?

Search http://x-pressive.com/WidgetCandy_Corona/reference.html#C0 for AUTOMATED WIDGET LAYOUT detailed answers exist on that page for all your questions. I feel responsible since I pushed you to WC from the other forum :slight_smile: But the documentation on this page is very comprehensive you could definitely find all you need by reading there. 

Okay - got things working now. Don’t worry - I’m already loving this Widget Candy thing :)  Definitely a lot happier now with the results that I’m getting.

Any thoughts on how to easily add scrolling to a Window is its content exceeds its size?

The Widget Candy demo is quite useful to figure out things like this. The following is from main.lua where the list of demo items scroll is listed : 

_G.GUI.NewList(

    {

    x                 = “center”,               

    y                 = “center”,               

    width             = “80%”,                  

    height            = “90%”,          

    scale             = _G.GUIScale,

    parentGroup       = nil,                    

    theme             = “theme_1”,              

    name              = “LST_MAIN”,             

    caption           = “WIDGET CANDY SAMPLES:”,   

    list              = ListData,               

    allowDelete       = false, 

    readyCaption      = “Quit Editing”,   

    scrollbar         = “onScroll”,

    border            = {“shadow”, 8,8, 64},

    onSelect          = function(EventData) _G.LoadSample(EventData) end,

    } )

    scrollbar         = “onScroll”,          - should be what you need. Hope this helps.

That’s for scrolling a List though, right? Where that behaviour is built-in.

What I wanted to do is create a Window full of controls (using auto-layout) and have a scrollbar to get to the controls that are “below” the bottom edge of the Window.

You are right. I’m sorry for misunderstanding your question. Don’t have an answer but I’m sure its possible. 

No - all good. I could have done better than a single sentence to explain myself :slight_smile:

So yeah - I’m thinking something like a UIScrollView, so the Window automatically adds scrollbars if its contents exceeds what can currently be displayed. For example, you have a 300x300 Window with 50 buttons in it, one on top of the other, so maybe only 3 or 4 can be seen at any given time.

Maybe it’s something the Widget Candy creators might add at some point… nudge, nudge.

Suggest you send a note in to them. I have found them very responsive on email. Not sure if they spend much time on this forum. All the best. 

Done! Hopefully a future feature.

If it turns out it can be done currently, I’ll post back.