@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?
@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?
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.
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?
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 )
@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...
@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!
@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:
I want the images to behalve as buttons that start tools and fold/unfold menu sections(groupboxes).
Or would you take a different approach?
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
@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.
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!
I like this!
I got one problem when testing it in SU2015, the glass is placed just outside the window frame.
If you could make the window a cutting component, it would work great with my bim-tools plugin
Cheers!
Jan
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!
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.
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:
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
@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?
@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]
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
@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:
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