Patrox
-
Posts
11 -
Joined
-
Last visited
Posts posted by Patrox
-
-
Sorry how do you Show your new widget ?
i made those try:
Panel.show()
panel.show()
but at each time it give me a scrit error !
Find !! as it is write in the unit modul, you must write:
unit.show
the widget appear, but "Hello Word" does not appear ???
-
Bonjour tout le monde
Hello evry body
Happy to begin soon the game with the Alpha
Alpha 2 Lua changes and novelties
in General Discussions
Posted
if you make a copy of this line in your LUA code, it deos'nt work because the quote use for the label " text" hare not the good one.
you must write :
dataText = system.createData('{"text": "Hello World"}')
And "Hello Word" appear in your windlet
So the complet running code is:
panel = system.createWidgetPanel("Panel") -- Display “Hello World” widgetText = system.createWidget(panel, "text") dataText = system.createData('{"text": "Hello Word"}') system.addDataToWidget(dataText, widgetText) -- Display a title “Title” widgetTitle = system.createWidget(panel, "text") dataTitle = system.createData('{"text": "Title"}') system.addDataToWidget(dataTitle, widgetTitle) -- Display a gauge filled at 60% widgetGauge = system.createWidget(panel, "gauge") dataGauge = system.createData('{"percentage": 60}') system.addDataToWidget(dataGauge, widgetGauge) -- Display “Weight 80 kg” widgetValue = system.createWidget(panel, "value") dataValue = system.createData('{"label": "Weight", "value": "80", "unit": "kg"}') system.addDataToWidget(dataValue, widgetValue) unit.show()