A function in tibasic can be called from this lib, but you cant call any of the functions nessecary, or even interact with lua, from a ti basic program. This is because they wanted lua to be 'sandboxed'.
For a Lua program, all you have to do is copy the portions from the lua file I release into another file, or make a copy of that lua file and rename it. Then you just create the objects. Notice that if an object is a button, then you have to create the function that it calls and tell it its name when you create it.
examle:
--Do not wory about anything befor this point unless you are using Nspire OS 3.1 or earlier, if so change platform.apilevel to 1.0
--this is where you create objects
function on.construction()
form1 = form(60, 60, 150, 100, false, "Title", color.white, color.black, true, false, mycont, true, true, Icon1, true)
--code for any previous objects, Any form(s) should be created before add creating controls, as they will be the parent of the control
button1 = button("BTN1", 4, 4, btnClick, color.black, color.buttoncontrol, form1)
end
function btnClick()
--your code here
end
you could also write your own controls, but that is advanced and I need to release a dev guid first... which is comming
For C and ASM, I believe for OS 3.1 there are functions in Ndless that can interact with lua, but to what extent I realy dont know.
Also this is for both you CompSystems and everyone else:
Since the example I provided above uses my dev version of WZGUILIB, I am posting it below, Go ahead and test out the new features
Notice** when drag resizing Forms there is a bug that occurs when you go below a specific point, but I almost have it fixed, It shouldnt crash the script
Also this dosnt require any external data, it dosnt use it because I am deving the base Items
***********************How to use the arrow keys to move a form, what the tabKey does, and what backtabKey does******************
tabKey scrolls through the controls in form_name_here.controls, and gives them selected status. When it reaches the end of the list it unselects all controls and allows you to use the arrow keys to move the window. All controls should be surrounded by a dotted rectangle when selected except textboxes, whos carrot appears.
backtabKey scrolls throug the windows in wndTbl giving them the focused status
Arrow Keys will move the focused window 4 pixels in the direction that the arrowKey points.
As always if you need more examples or just need help, Ask me by posting here or you can also PM me.
Also the tns file is form 3.2 and the lua file is for 3.1, but all code except on.create/on.construction and platform.apilevel are the same.
ALSO here are the paramaters for the controls
--~ --params----------
--~ window = --dont need
--~ form = x, y, width, height, fullscreen, title, titlecolor, bordercolor, isdrawn, contextmenu, cmtable, hassb, hasicon, iconimg, draggable
--~ dialog = x, y, text, title, backcolor, titlecolor, bodytextcolor, isdrawn
--~ button = text, x, y, action, txtcolor, bgcolor, parent
--~ lable = x, y, text, txtsize, color, parent
--~ textbox = x, y, width, text, textcolor, tbcolor, parent, selected
--~ radioButton = text, x, y, marked, backcolor, markcolor, txtcolor, parent
--~ contextm = --dont need
--~ checkbox = x, y, text, checked, backcolor, checkcolor, textcolor, parent
--~ pb = x, y, width, height, labeltbl, picturetable, txtcolor, index, lablename, parent, selected
--~ NumericUD = x, y, num, linecolor, maxnum, minnumber, textcolor, pmbcolor, parent, selected
--~ tabcontrol = x, y, width, height, tabtable, parent
--~ listbox = x, y, tabval, selected, scrollbars, parent
--~ toggle = x, y, state, parent
--~ inputDialog = x, y, text, title, backcolor, titlecolor, bodytextcolor, isdrawn, btnAction
--~ cant use: scrollbar, progressbar, statusbar
--~ --end params
paste this in where the current paramater list is
Also to resize forms by dragging, click the little box on the lower right hand corner and move the mouse