You can also send multiple commands at the same time, just put all of them in a table:
Once you got your button, you can listen for presses using the event.msg.<YOUR_BUTTON_NAME>.
Here is an example:
ifevent.channel=="TOUCH_CHANNEL"andevent.msg.button_namethendigiline_send("TOUCH_CHANNEL",{{command="clear"},{command="addlabel",X=1,Y=1,H=1,name="label_name",label="You had clicked the button!"}})fiifevent.type=="program"thendigiline_send("TOUCH_CHANNEL",{{command="clear"},{command="addlabel",X=1,Y=1,H=1,name="label_name",label="Click the button"},{command="addbutton",X=1,Y=2,H=1,name="button_name",label="Click Me"}})end
I really love this mod, it adds so much cool stuff to the game.
I like to use the digipistons since they allow me to make compact piston extenders.
The documentation for all nodes is a bit bad, so here is my proposal for documentation about touchscreen:
How to use the digistuff touchscreens:
You can send a command as a table. The options you have are as follows:
{command="clear"}
{command="addlabel",X=1,Y=1,H=1,name="label_name",label="Label:"}
{command="addfield",X=1,Y=2,W=4,H=1,name="input",label="Enter something"}
{command="addbutton",X=1,Y=3,H=1,name="button_name",label="Click Me"}
{command="addbutton_exit",X=1,Y=4,W=3,H=1,name="exit",label="Exit"}
You can also send multiple commands at the same time, just put all of them in a table:
Once you got your button, you can listen for presses using the
event.msg.<YOUR_BUTTON_NAME>
. Here is an example:How to use the digistuff advtouchscreens:
You can send formspec code to it.