New Candy Lib: Widget Candy for Corona

After using this awesome work, I just remark a little problem for french user : the accented letters like éèàçù. Impossible to see.
do you have a solution?
[import]uid: 6666 topic_id: 25953 reply_id: 105877[/import]

How do I invert the values on a vertical slider to go from the lowest values at the bottom to the highest at the top? [import]uid: 129287 topic_id: 25953 reply_id: 105879[/import]

@totla: this depends on the font you are using. Also try to save your .lua file in UTF-8 format.

@Dr.Mabuse: will be added with the next version. You can also use the slider’s textFormatter function to display the current value inverted:

[lua]textFormatter = function(value)
return _G.GUI.GetHandle(“MySlider”):get(“maxValue”)-value
end,[/lua]

[import]uid: 10504 topic_id: 25953 reply_id: 105916[/import]

this looks good,

currently I’m working on my game with storyboard, and i can’t wait to see some samples in storyboard.

now if there are new version updates do we get notified by email and get a direct download link ???

thanks [import]uid: 17701 topic_id: 25953 reply_id: 106016[/import]

Updates are announced by email, as well as in this forums. This email also includes your personal download link (please ensure that your email server does not block any messages from support -at- x-pressive.com or order -at- x-pressive.com). [import]uid: 10504 topic_id: 25953 reply_id: 106040[/import]

Thanks so much for creating this… Such a time saver.

Any chance you can add multiple lines of text to the caption of a List?

If not, is here a way to show more data in the list than just the caption?

Thanks

[import]uid: 89018 topic_id: 25953 reply_id: 106054[/import]

I have a group of four toggle buttons, and I’m trying to turn toggleState to false on any buttons which are latched when any other buttons are pushed. I am having no luck. Any thoughts? buyerToggleButtonSwitcher() is my onPress listener.

[lua] function buyerToggleButtonSwitcher (EventData)

toggleTable = {

“buyerMessages”,
“viewBuyerOffers”,
“buyerSched”,
“requestDocs”,

}

toggleVar = table.indexOf( toggleTable, EventData.name )
table.remove (toggleTable, toggleVar)

for i=1, #toggleTable do
_G.GUI.Set( toggleTable[i], {toggleState = false})
_G.GUI.GetHandle(toggleTable[i]):update()
end
end[/lua]

I guess I should add, it says in the terminal that the properties off the correct buttons are updating, but nothing happens on the screen, and I am trying to do MyWidget:update() as well, but without effect… [import]uid: 96383 topic_id: 25953 reply_id: 106163[/import]

@khincker: Just make your onPress listener like this:

For the buyerMessages button:

onPress = function( EventData ) \_G.GUI.Set( "viewBuyerOffers", { toggleState = false } ) \_G.GUI.Set( "buyerSched", { toggleState = false } ) \_G.GUI.Set( "requestDocs", { toggleState = false } ) end, [import]uid: 129287 topic_id: 25953 reply_id: 106179[/import]

Hey Dr. Mabuse, that will work for one button, but I have many. Your approach I would need separate functions for every button, and then remember to add new toggleState lines to every function whenever I create additional buttons. Plus, as I said, my way SAYS that it is working ( I get “Widgets.Set(): Updated properties of widget ‘buyerMessages’” etc. ) but nothing changes… [import]uid: 96383 topic_id: 25953 reply_id: 106184[/import]

@khincker: Strange! Just tried your example and it works at my end. I’m on Windows, using the latest stable build: 704. I didn’t need to call the update function either. [import]uid: 129287 topic_id: 25953 reply_id: 106192[/import]

Huh. Just tried your example and it doesn’t work on MY end :slight_smile: Obviously something else I am doing wrong. [import]uid: 96383 topic_id: 25953 reply_id: 106195[/import]

Ok, here is the entire example working at my end:

[code]
display.setStatusBar( display.HiddenStatusBar )

_G.GUI = require(“widget_candy”)
_G.GUI.LoadTheme(“theme_1”, “themes/theme_1/”)

function buyerToggleButtonSwitcher (EventData)

toggleTable = {

“buyerMessages”,
“viewBuyerOffers”,
“buyerSched”,
“requestDocs”,

}

toggleVar = table.indexOf( toggleTable, EventData.name )
table.remove (toggleTable, toggleVar)

for i=1, #toggleTable do
_G.GUI.Set( toggleTable[i], {toggleState = false})
–_G.GUI.GetHandle(toggleTable[i]):update()
end
end

_G.GUI.NewSwitch(
{
x = “center”,
y = 20,
name = “buyerMessages”,
theme = “theme_1”,
width = 250,
caption = “I am a switch.”,
textAlign = “left”,
toggleState = true, – INITIALLY ON
onPress = function( EventData) buyerToggleButtonSwitcher(EventData) end,
} )

_G.GUI.NewSwitch(
{
x = “center”,
y = 60,
name = “viewBuyerOffers”,
theme = “theme_1”,
width = 250,
caption = “I am a switch.”,
textAlign = “left”,
toggleState = false, – INITIALLY ON
onPress = function( EventData) buyerToggleButtonSwitcher(EventData) end,
} )

_G.GUI.NewSwitch(
{
x = “center”,
y = 100,
name = “buyerSched”,
theme = “theme_1”,
width = 250,
caption = “I am a switch.”,
textAlign = “left”,
toggleState = true, – INITIALLY ON
onPress = function( EventData) buyerToggleButtonSwitcher(EventData) end,
} )

_G.GUI.NewSwitch(
{
x = “center”,
y = 140,
name = “requestDocs”,
theme = “theme_1”,
width = 250,
caption = “I am a switch.”,
textAlign = “left”,
toggleState = true, – INITIALLY ON
onPress = function( EventData) buyerToggleButtonSwitcher(EventData) end,
} )
[/code] [import]uid: 129287 topic_id: 25953 reply_id: 106196[/import]

Thanks Dr.Mabuse. How are you getting the buttons to be toggle buttons at all without setting toggleButton = true for each of them as per the documentation? BTW thanks for the posts.

[import]uid: 96383 topic_id: 25953 reply_id: 106199[/import]

They are set to toggle buttons by using _G.GUI.NewSwitch.
Did you get it to work? [import]uid: 129287 topic_id: 25953 reply_id: 106203[/import]

I’m using GUI.newButton and the toggleButton setting. Still haven’t been able to get it to work. [import]uid: 96383 topic_id: 25953 reply_id: 106212[/import]

That was my thought, so I was trying the :update() method per their docs for cases where a table does not update after changing a property.

Hey super cool Widget Candy guys, any thoughts about this issue? [import]uid: 96383 topic_id: 25953 reply_id: 106235[/import]

I think you are right about that not working. In the following example the caption of the buttons are updated but not the state (the visual part of it, that is).

I guess the reason for this is that the toggleButton and toggleState properties are stored in a different table called EventData.Props (see Listener Functions -> EventData). The visuals of this table probably isn’t updated when the widget-table is. Just my guess.

[code]
function buyerToggleButtonSwitcher (EventData)

toggleTable = {

“buyerMessages”,
“viewBuyerOffers”,
“buyerSched”,
“requestDocs”,

}

for i=1, #toggleTable do
if toggleTable[i] ~= EventData.name then
_G.GUI.Set( toggleTable[i], { toggleState = false } )
_G.GUI.Set( toggleTable[i], { caption = “false” } )
else
_G.GUI.Set( toggleTable[i], { toggleState = true } )
_G.GUI.Set( toggleTable[i], { caption = “true” } )
end
end
end
[/code] [import]uid: 129287 topic_id: 25953 reply_id: 106230[/import]

@ivke2006: for a chart widget, what features would you expect in detail? If you have some ideas or suggestion on this, please drop an email and let us know in detail ( support [at] x-pressive.com ) and we’ll see what we can do.

There will definately be an “iOS styled”, native theme with the next update. It’s already finished (a “sketch” or “doodle” styled theme is also in the works).

@x-pressive.com I like the IOS theme very much! Do you have any idea when an update comes available which includes this theme?

About the chart widget: Great! I will send you a mail this weekend. [import]uid: 106768 topic_id: 25953 reply_id: 106262[/import]

I bought this a couple of days ago, and I’ve already made faster progress on my UI with better-looking results than I had before.

I would, however, very much like to see separate properties for x-scale and y-scale. I needed buttons whose width was less than twice their height, and this wasn’t possible out of the box since a button’s width can’t be less than the two end caps that make it up. Fortunately, the source code was pretty easy to follow, so I was able to cobble together a modification to the NewButton function and accomplish what I needed. Still, I’d prefer not to have to do that in the future.

Also, a drop-down menu widget would be great. That would be the most natural interface for my current project, and I’m hoping I won’t have to make do with something else instead.

Great work overall, though, and I hope to see it become even better soon. [import]uid: 129551 topic_id: 25953 reply_id: 106317[/import]

just purchased Widget and Particle Candy,

wow can’t wait to implement these into my game.

looking forward to storyboard totorials
[import]uid: 17701 topic_id: 25953 reply_id: 106352[/import]