sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Use Sketchup default cursors

    Scheduled Pinned Locked Moved Developers' Forum
    23 Posts 7 Posters 5.8k Views 7 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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      @thomthom said:

      Do SU use .cur files? Isn't it just .png?

      Yes your right Thom, I boo-boo'd. Posted before I tested.

      SU does NOT recognize ****.cur**** files. If you try it the id for the cursor = 0. (I'm once again flabbergasted at whomever wrote the SU ruby API. They've earned 20 lashes with a Nerf-Noodle!)

      The API states 'image' but does not say what formats are acceptable.

      I've already begun extracting the 4 images files from the cursor files, decided to do a bit of anti-aliasing work on the edges of the pencils.

      DONE (Original posting now has updated zip with png images for SU cursors and buttons.)Get them...

      Will also look at the Windows API and see if I can cobble up a system call to load a cursor file instead of making a call to UI.create_cursor, as UI.set_cursor should not care how the cursor got loaded into memory, it only wants a pointer (id). [Some testing has shown the UI.set_cursor canNOT deal with Windows Cursor resources, so a 'special' set_win_cursor method would be needed, using a direct Win32 API call.]

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • eneroth3E Offline
        eneroth3
        last edited by

        @thomthom said:

        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/ui.html#create_cursor
        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/ui.html#set_cursor
        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/tool.html#onSetCursor

        These links you give me 404 errors 😢 . I know I've read about this somewhere else recently but can't remember where now.

        EDIT:

        It might have been from when I read in TT lib the other day to understand how the win32api works. Found this page now: https://bitbucket.org/thomthom/tt-library-2/src/9ff3a5f08604ed477eb4b17fd63612bfc42832dd/TT_Lib2/cursor.rb?at=Version%202.9

        My website: http://julia-christina-eneroth.se/

        1 Reply Last reply Reply Quote 0
        • tt_suT Offline
          tt_su
          last edited by

          http://www.sketchup.com/intl/en/developer/docs/ourdoc/ui#set_cursor
          http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool#onSetCursor

          1 Reply Last reply Reply Quote 0
          • 1
          • 2
          • 2 / 2
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement