0 Members and 4 Guests are viewing this topic.
cursortypes = {*cursor image data here*}cursor:init(x,y,type) self.x = x self.y = y self.type = cursortypes[type]endCursor = cursor(50,50,*number here*)
function cursor:set(type)Cursor.type = cursortypes[type]endcursor:set(*number here*)
"welcome to the world of computers, where everything seems to be based on random number generators"
im actualy about to upload a prerelease version right now, check in a few miniutes, im using an old crappy school computer so it might take some time
just doCode: [Select]cursortypes = {*cursor image data here*}cursor:init(x,y,type) self.x = x self.y = y self.type = cursortypes[type]endCursor = cursor(50,50,*number here*)this way you can add different cursor like we have in nspire, which you can find hereit contains a zip with all the cursors in a different image...
thats a good idea too, my code only uses one instance of inheritance though, in the form class, do to the fact that the lib is quit large and poeple should be able to choose what code they need and take the other stuff out.this way if they take out some class and some other class had to inherit from it there would be errors.also i might add a control class for the controls to inherit from, but i may not do to the fact im trying to make it smaller and more optimized
i thought he meant functions from your gui jwalker.. here are all the functions standard in nspire luaFunction name Arguments Called whenon.paint(gc) GC is the graphical context (explained later) platform.window:invalidate() is calledon.arrowKey(arrow) Arrow returns ‘left’,’right’,’up’ or ‘down’ An arrow key had been pressedon.arrowLeft() - The left arrow key has been pressedon.arrowRight() - The right arrow key has been pressedon.arrowUp() - The up arrow key has been pressedon.arrowDown() - The down arrow key has been pressedon.enterKey() - The enter key has been pressedon.escapeKey() - The escape key has been pressedon.tabKey() - The tab key has been pressedon.charIn(char) Char can return any char, e.g. char = ‘+’ Any character key has been pressedon.mouseMove(x,y) x and y return the position of the mouse The mouse moveson.mouseDown(x,y) x and y return the position of the mouse The mouse has been pressedon.mouseUp(x,y) x and y return the position of the mouse The mouse has been releasedon.create() - The file gets opened (made)on.destroy() - The file gets closed (destroyed)on.resize() - The screen is resized (when in the pc software)on.timer() - The timer is calledon.deleteKey() - The delete key has been pressedon.backspaceKey() - The backspace key has been pressedon.returnKey() - The return key has been pressedon.contextMenu() - The [ctrl][menu] key has been pressedon.help() - The [ctrl][trig] has been pressedon.clearKey() - The clear key has been pressedon.activate() - The tab/page gets activatedon.deactivate() - The tab/page gets inactivatedon.blink() - The focus gets lost on the pageor just go hereit's the events part
certainly, you will only have to use loops to determine if a function needs to be called or not..luaFX is in loops, isn't it?