MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    Touchscreen Modules

    General Discussion
    4
    7
    2801
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yours.mukul last edited by

      How to make a module for touchscreen??
      I will be using a touchscreen lcd display, and I wish to make touch interactive modules,

      broberg 1 Reply Last reply Reply Quote 0
      • broberg
        broberg Project Sponsor @yours.mukul last edited by

        @yours.mukul look at the ones already made.

        But basically you add an onclick event on text/graphics/divs to make them react to a touch (same thing as a click with the mouse, as the input is the same)

        1 Reply Last reply Reply Quote 0
        • cowboysdude
          cowboysdude Module Developer last edited by cowboysdude

          @yours.mukul look inside the touch news module for an example 🙂

          1 Reply Last reply Reply Quote 0
          • Y
            yours.mukul last edited by

            I couldn’t see onclick anywhere in the touch news, can you please explain me how it uses touch??
            P.S. I’m sorry if I sound too stupid.

            broberg 1 Reply Last reply Reply Quote 0
            • ?
              A Former User last edited by

              Coincidence!
              I’m making one with touch gestures (multiple tapping, multiple touches, multi-finger swiping, multi-finger press holding…)
              It could give an interface with human to modules like my other commander modules(Assistant, TelegramBot)
              I hope I could release a few weeks later.

              cowboysdude 1 Reply Last reply Reply Quote 1
              • broberg
                broberg Project Sponsor @yours.mukul last edited by

                @yours.mukul

                title.addEventListener("click", () => showdesc(this)); //Show description on click
                

                so it’s

                elementname.addEventListener(“click”, () => function(data));

                Google javascript onclick and eventlistener for more information

                1 Reply Last reply Reply Quote 1
                • cowboysdude
                  cowboysdude Module Developer @Guest last edited by

                  @Sean can’t wait…

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy