Currently selected elements

  • gillett-hernandez
    23rd Dec 2014 Member 0 Permalink

    Is there a way to find out the currently selected elements through lua? i have searched through the forum and wiki and i couldn't find anything about this.

  • mecha-man
    23rd Dec 2014 Member 0 Permalink

    tpt.selectedl for the left selected,

    tpt.selectedr for the right selected,

    tpt.selecteda for the alternate selected and

    tpt.selectedreplace for the replece mode selected.

    They are values, not functions so you can get/set them directly.

  • gillett-hernandez
    23rd Dec 2014 Member 0 Permalink

    thanks so much.

     

    edit and note: elements[tpt.selectedl] will give you the element id for the left mouse selected element. found this out while experimenting.

    Edited once by gillett-hernandez. Last: 23rd Dec 2014