sketchucation logo sketchucation
    • Login
    1. Home
    2. brewsky
    3. Posts
    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!
    ⚠️ Important | Libfredo 15.8b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 163
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: SKUI β€” A GUI Framework for SketchUp

      @jolran said:

      Have you had a look at icomoon ?

      Never heard of icomoon before, but it does sound very interesting!
      Do you know if exporting a project also includes your own uploades SVG icons?

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      Traveling up and down to Boulder? πŸ˜‰

      @thomthom said:

      The intent with the background image, is that to create a graphical button, or an icon glypth to go along with the button text?

      What I want to do is create graphical buttons, but an icon(like emoticons) in the text would be another option.
      I also managed to set the background with javascript, works fine, but I think image buttons are so common that a built in option could be useful.

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      Another question.

      Do you recommend to leave the "core.css" file unaltered, and only add additional styling using themes?

      I first completely uprooted core.css for my plugin in a way that all objects were relatively positioned and the fieldset would be automatically re-sized based on it's contents(normal html behavior).

      But later-on I thought that doing all positioning from ruby/SKUI would better fit SKUI's design, even though it would take some more scripting to make everything line-up and re-size dynamically.
      This would probably also prevent different behavior between browsers.

      Is this assumption correct?

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      Hi TT,

      As a response to your questions on Github.
      What do you think of this approach?
      If you could use the button as a container like groupbox the need for a background image would be eliminated... and the image class has all positioning methods you need(except maybe for z-index?).

      
      btn_hello = SKUI;;Button.new( 'Hello' ) { |control|
        name = control.window[;txt_name].value
        puts "Hello #{name}"
        UI.messagebox( "Hello #{name}" )
      }
      btn_hello.position( 200, 0 )
      btn_hello.tooltip = 'Click me!'
      window.add_control( btn_hello )
      
      icon = SKUI;;Image.new('icon.png')
      icon.position( 0, 0 )
      icon.size( 16, 16 )
      btn_hello.add_control( icon )
      
      
      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      @thomthom said:

      That would be a nice improvement to SKUI.

      I have added a pull request to the Github repository.
      Let me know if you see any problems.
      Btw I just noticed a different pull request which also adds images to buttons, but it seems to take a different approach...

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      @thomthom said:

      But I was wondering if making the image an IMG element so that it could position itself relative to the button text.

      Ahhh, you mean like this?
      <button><img src="icon.png" /></button>
      That does sound better! πŸ˜„

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      @thomthom said:

      I'm wondering if the image perhaps fits better as an IMG element that sits in line with the text? Then the Button control could have some properties to control if the image to the left or right of the button text. ?

      Hi Thomthom,

      I don't understand exactly what you mean.

      At first I just added a "click" event to the IMG element. But i figured that it would be better to approach them as real buttons.

      This is the menu I'm rebuilding with SKUI:bt-menu-base-121015.png
      I want the images to behalve as buttons that start tools and fold/unfold menu sections(groupboxes).

      Or would you take a different approach?

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      I needed some buttons with images instead of text for my plugin, therefore made these changes in my local SKUI:

      Example:

      
      @window = SKUI;;Window.new(options)
      b = SKUI;;Button.new( 'Hello' ) { puts 'World! ;)' }
      b.position( 10, 5 )
      b.background(File.join(PLUGIN_PATH_IMAGE, 'icon.png'))
      window.add_control( b )
      
      

      button.rb:

      
          def background( image_path )
          
            # calculate relative path
            require 'pathname'; 
            relative_image_path = Pathname.new( image_path ).relative_path_from(Pathname.new( PATH_HTML )).to_s
            
            @properties[ ;background_image ] = relative_image_path
            @properties[ ;caption ] = ''
          end
      
      

      ui.button.js:

      
      Button.prototype.set_background_image = function( value ) {
        this.control.css({'background-image'; 'url(' + value + ')','border'; '0','background-repeat'; 'no-repeat'});
        return value;
      };
      
      

      Are there any more people interested in this?
      I'm still unsure how to implement it. It could be a separate "image_button" (sub)class based on "button", or (like I did now) additional properties for "button".

      If anyone is interested I can propose a patch on Github to TT...

      Cheers!
      Jan

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      @jim said:

      The right click blocking is done explicitly in ui.js file.

      Thanks! Found it πŸ˜„

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      @jolran said:

      It can be problematic to do a progressbar to webdialog. Due to the "freeze" that happends when ruby calculates.

      Thanks for pointing this out. Might be better to let this rest until I really need it πŸ˜‰
      One positive thing might be that the progressbar would be for while I wait for a server to process my model so I don't think ruby has to work hard in the background.

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      Hi TT,

      I want to try to add a progressbar control to SKUI.
      It does not seem very different from the jQuery widget for "button"...
      Do you have any tips on where to start? πŸ˜‰

      Another question, how did you disable the right-click / context menu in the webdialog?
      Would be nice to temporarily enable "view source"...

      Thanks!

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: [Plugin] 3 point Window

      I like this! πŸ˜„

      I got one problem when testing it in SU2015, the glass is placed just outside the window frame.
      3pw.png
      If you could make the window a cutting component, it would work great with my bim-tools plugin πŸ˜‰

      Cheers!
      Jan

      posted in Plugins
      brewskyB
      brewsky
    • RE: C++ using swig

      Hey Guys, this looks great! πŸ˜„ Too bad that I didn't notice this project before... It even seems to be Swig based! I'll dive right into it πŸ˜„

      @jolran said:

      Are you using the provided examples at the Github Project ? They should be relatively new.
      https://github.com/SketchUp/ruby-c-extension-examples

      I have been trying the examples from the swig website but these are really old.

      Thanks!

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      Sorry for the late reply 😳
      The latest version for 2014 seems to work fine on SU2015, but I didn't get around to make it an "official" version yet so it got a bit lost within the thread(posted on 4 aug. 2014).

      I will try to update the main-post with the latest version tomorrow.

      posted in Plugins
      brewskyB
      brewsky
    • C++ using swig

      Hi Everyone,

      I've been trying to connect to a C++ library from SU(windows) using swig.
      No success so far... Not even the most basic examples.
      I'm rather new to C++, but compiling swig using python works ok, ruby ?!? no way...

      Is there anyone that has used swig on a recent(ruby2.x) sketchup version on windows?
      I would love to have some tips on this.

      Some problems I ran into:

      • ruby does not seem to provide MSVS builds anymore, only MingW. It seems to me that the ruby build in SU is also done using MinGW, is that correct?
      • swig examples are ancient and point to these old MSVS builds, it also seems that(for swig) MSVS would be preferable over MinGW.(I didn't have much trouble compiling swig/ruby on linux.)

      I thought it better to ask a general question to see if anyone has been using swig+sketchUp recently before I start "spewing" out build errors πŸ˜‰ might be that a swig or C++ forum would be a better place for this question...

      Thanks!
      Jan

      posted in Developers' Forum
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @markitekt said:

      Great plugin. Lots of potential. How about imperial units?
      Thanks!

      Thank you! πŸ˜„
      I have been thinking about adding imperial units, but until now has not been very high on my list of priorities. I will look into it.

      Any more votes for this?

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @leolouie said:

      Any plans on releasing a version for Sketchup 2014? I miss not be able to use this tool.

      Great to hear that you like using it! πŸ˜„

      I fixed a few basic errors a few months ago but didn't get around to figure out why it's so much slower than on previous versions. All functionality seems to be working though.

      I've been working on some side-projects "lately", but if people like using it, than it needs a higher place on my list of priorities πŸ˜‰
      Maybe you can give it a try and let me know your experiences? any feature requests? bugs?

      Check out the attachment!
      [removed in favor of new version]

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      New version πŸ˜„
      Should be a bit faster!
      still a bit experimental, needs some more testing but seems to work OK
      I also took the time to update the source on google-code...
      https://code.google.com/p/bim-tools/source/browse/

      Please let me know if you find any issues(or ideas for improvement)!

      Cheers!
      Jan


      Experimental version for SU2014

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @unclex said:

      a little bug
      make COMP in the any face,then copy the COMP, sometimes crashed the SU2014

      Thanks for reporting this.
      Do you mean that it crashes(sometimes) when you:

      • create a "thick face"(wall) with my plugin
      • then draw a square(for example) on the face.
      • select the square and it's edges
      • make component, select "glue to any" and "cut opening" and "replace selection"
      • copy the new component within the same face
        I have not yet been able to reproduce the error, can you send me an example file that crashes?
      posted in Plugins
      brewskyB
      brewsky
    • RE: SKUI β€” A GUI Framework for SketchUp

      Great project! I have also been thinking about something like this.
      I'm going to try this out, beta or not, it seems way more solid than my own webdialogs πŸ˜‰

      posted in Developers' Forum
      brewskyB
      brewsky
    • 1
    • 2
    • 3
    • 4
    • 5
    • 8
    • 9
    • 2 / 9