sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Hide Cursor Help

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 889 Views 3 Watching
    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.
    • renderizaR
      renderiza
      last edited by

      Hi,

      For the game I am making I want the cursor to not be visible while playing. I tryed using a transparent png file to use as a cursor but I can't make it work.

      cursor_id = nil
      cursor_path = Sketchup.find_support_file("Pointer.png", "Plugins/")
      if cursor_path
       cursor_id = UI.create_cursor(cursor_path, 0, 0)
      end
      
      def onSetCursor
      puts "onSetCursor; view = " + view.to_s
      		 
        UI.set_cursor(cursor_id)
      end
      

      If there is the possibility to set the position of the cursor off screen that will be even better than using a transparent png.

      Again thanks and remember I am not that good but will try my best understanding you suggestions.

      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

      1 Reply Last reply
      Reply Quote 0
      • D
        driven
        last edited by

        you could try a 1px x 1px cursor?
        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply
        Reply Quote 0
        • renderizaR
          renderiza
          last edited by

          Been searching and can't find a way to do this...Can u provide simple example?

          Also found that in order to move the cursor with script I need to use WINAPI..here is example: http://msdn.microsoft.com/en-us/library/ms648394%28VS.85%29.aspx

          Only problem the code there is C++ 0_0

          Anyways thanks for help.

          [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

          1 Reply Last reply
          Reply Quote 0
          • D
            driven
            last edited by

            just did a test and the 1x1 didn't work, however

            I copied and renamed a working cursor in another plugin [ae_wiretool], then in an editor I 'cut' the image content out of the png file, now when run in SU I have no cursor...

            john

            learn from the mistakes of others, you may not live long enough to make them all yourself...

            1 Reply Last reply
            Reply Quote 0
            • Dan RathbunD
              Dan Rathbun
              last edited by

              @Rafael: ALL of the code in your first post MUST be within a custom Tool, otherwise onSetCursor() will never be called by the application engine.

              Also do not put string output calls within UI callbacks, because this will slow down SketchUp in a MAJOR way.

              I'm not here much anymore.

              1 Reply Last reply
              Reply Quote 0
              • renderizaR
                renderiza
                last edited by

                Thank you Driven & Dan Rathbun I solved it thanks to you guys! πŸ˜„

                Note: loading my plugin as tool solved another problem without me trying and that is when you are playing the game before you could click & drag mouse and select objects which was bad but now its all fixed!

                [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                1 Reply Last reply
                Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better πŸ’—

                Register Login
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement