Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.

Commit

Permalink
Added toolbar icons for the plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
tav committed Aug 31, 2011
1 parent 8e5f9d2 commit 420d385
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 1 deletion.
Binary file added wikihouse-assets/download-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/guide-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/guide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/make-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/make.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/upload-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wikihouse-assets/upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion wikihouse.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ def generate
y = (scale * center.y) + base_y y = (scale * center.y) + base_y
radius = scale * radius radius = scale * radius
svg << <<-CIRCLE.gsub(/^ {14}/, '') svg << <<-CIRCLE.gsub(/^ {14}/, '')
<circle cx="#{x}" cy="#{y}" r="#{radius}" stroke="rgb(51, 51, 51)" stroke-width="2" fill="none" /> <circle cx="#{x}" cy="#{y}" r="#{radius}"
stroke="rgb(51, 51, 51)" stroke-width="2" fill="none" />
CIRCLE CIRCLE
else else
loop = loops[i] loop = loops[i]
Expand Down Expand Up @@ -1907,6 +1908,8 @@ def load_wikihouse_upload


if not file_loaded? __FILE__ if not file_loaded? __FILE__


WIKIHOUSE_DIR = File.join File.dirname(__FILE__), "wikihouse-assets"

# Initialise the data containers. # Initialise the data containers.
WIKIHOUSE_DOWNLOADS = Hash.new WIKIHOUSE_DOWNLOADS = Hash.new
WIKIHOUSE_UPLOADS = Hash.new WIKIHOUSE_UPLOADS = Hash.new
Expand All @@ -1920,6 +1923,8 @@ def load_wikihouse_upload
end end


WIKIHOUSE_DOWNLOAD.tooltip = "Find new models to use at #{WIKIHOUSE_TITLE}" WIKIHOUSE_DOWNLOAD.tooltip = "Find new models to use at #{WIKIHOUSE_TITLE}"
WIKIHOUSE_DOWNLOAD.small_icon = File.join WIKIHOUSE_DIR, "download-16.png"
WIKIHOUSE_DOWNLOAD.large_icon = File.join WIKIHOUSE_DIR, "download.png"


# TODO(tav): Irregardless of these procs, all commands seem to get greyed out # TODO(tav): Irregardless of these procs, all commands seem to get greyed out
# when no models are open -- at least, on OS X. # when no models are open -- at least, on OS X.
Expand All @@ -1932,6 +1937,8 @@ def load_wikihouse_upload
end end


WIKIHOUSE_MAKE.tooltip = "Convert a model of a House into printable components" WIKIHOUSE_MAKE.tooltip = "Convert a model of a House into printable components"
WIKIHOUSE_MAKE.small_icon = File.join WIKIHOUSE_DIR, "make-16.png"
WIKIHOUSE_MAKE.large_icon = File.join WIKIHOUSE_DIR, "make.png"
WIKIHOUSE_MAKE.set_validation_proc { WIKIHOUSE_MAKE.set_validation_proc {
if Sketchup.active_model if Sketchup.active_model
MF_ENABLED MF_ENABLED
Expand All @@ -1945,6 +1952,8 @@ def load_wikihouse_upload
end end


WIKIHOUSE_UPLOAD.tooltip = "Upload and share your model at #{WIKIHOUSE_TITLE}" WIKIHOUSE_UPLOAD.tooltip = "Upload and share your model at #{WIKIHOUSE_TITLE}"
WIKIHOUSE_UPLOAD.small_icon = File.join WIKIHOUSE_DIR, "upload-16.png"
WIKIHOUSE_UPLOAD.large_icon = File.join WIKIHOUSE_DIR, "upload.png"
WIKIHOUSE_UPLOAD.set_validation_proc { WIKIHOUSE_UPLOAD.set_validation_proc {
if Sketchup.active_model if Sketchup.active_model
MF_ENABLED MF_ENABLED
Expand Down

0 comments on commit 420d385

Please sign in to comment.