Touchpoint API
#81
Posted 02 January 2015 - 09:17 PM
#82
Posted 05 January 2015 - 07:06 PM
I have a small suggestion that would save me effort every time I use the API though: allowing "duration" to be sent as an optional argument to the flash function. I find the pulse too quick for a lot of my cases and while modifying the API per-install isn't a big burden, it would be nice to have the functionality built in.
Thanks for a great API regardless!
#83
Posted 05 January 2015 - 07:40 PM
Edit: I've added this feature. An optional duration argument may now be specified. If it isn't, the default will be used.
#84
Posted 05 January 2015 - 09:41 PM
Lyqyd, on 05 January 2015 - 07:40 PM, said:
Edit: I've added this feature. An optional duration argument may now be specified. If it isn't, the default will be used.
I certainly didn't expect it to be implemented within an hour, lol. Thanks much.
#85
Posted 09 January 2015 - 03:08 AM
#86
Posted 09 January 2015 - 03:42 AM
#87
Posted 21 January 2015 - 03:56 AM
#88
Posted 21 January 2015 - 07:40 AM
#89
Posted 21 January 2015 - 04:24 PM
#90
Posted 31 January 2015 - 10:28 AM
#91
Posted 11 February 2015 - 05:12 PM
#92
Posted 11 February 2015 - 05:43 PM
#93
Posted 12 February 2015 - 04:59 PM
#94
Posted 19 February 2015 - 10:24 AM
for t:run(), could there be a variable (like in javascript) that is passed to the function and gives details of the event.
eg.
function button(e)
if e.label = "1" then
...
t:add("1", button, ...)
t:add("2", button, ...)
t:run()
I am making a keypad (currently with dw20's api, just about to port it to your api) and I would like to have buttons 1-9 without 9 functions...I know it is possible to do it with the event thing, but t:run() is cleaner...
on a side note, would I be able to put this api in a github repository, I'd credit you... https://github.com/comp500/CCSnippets/
Edited by comp500, 19 February 2015 - 10:36 AM.
#95
Posted 20 February 2015 - 01:17 AM
function button(num)
if num == 1 then
--# etc.
end
end
t:add("1", function() button(1) end, ...)
I hadn't realized I had forgotten to actually put Touchpoint on github, It's there now, and since it is under the MIT license, you are of course free to fork it or do whatever else you like within the limits of the license.
#96
Posted 20 February 2015 - 07:38 AM
Lyqyd, on 20 February 2015 - 01:17 AM, said:
function button(num)
if num == 1 then
--# etc.
end
end
t:add("1", function() button(1) end, ...)
I hadn't realized I had forgotten to actually put Touchpoint on github, It's there now, and since it is under the MIT license, you are of course free to fork it or do whatever else you like within the limits of the license.
Good, I'll might fork it and add some stuff. I use the MIT license on my CC stuff as well.
PS: It's so strange on this forum, because I'm in the UK so nobody really is on when I'm on, so I have to wait until the next day
#98
Posted 29 March 2015 - 06:55 PM
Thanks!
#99
Posted 29 March 2015 - 07:54 PM
local t = touchpoint.new()
You then can use the instance like you would any other Touchpoint instance.
#100
Posted 07 April 2015 - 04:05 PM
All I ask of you is to make me a small program with guidelines that will help me understand this API a bit better.
could you write me just a simple program (2 buttons that emit a redstone signal left and right) and help me understand it a little better?
Thanks.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











