Sha256: 0da653211287e7423dad66a2f625db6435cdca05ba28ecaaef57e8bd11407e80

Contents?: true

Size: 569 Bytes

Versions: 11

Compression:

Stored size: 569 Bytes

Contents

require 'sketchup.rb'

module <%= project.namespace %>

  unless file_loaded?(__FILE__)
    menu = UI.menu('Plugins').add_submenu(EXTENSION[:name])
    menu.add_item('Open Dialog') { self.open_dialog }
    menu.add_separator
    menu.add_item('Help...') { self.open_help }
    file_loaded(__FILE__)
  end

  def self.open_dialog
    file_path = File.join(PATH, 'html', 'dialog.html')
    @dialog = UI::WebDialog.new
    @dialog.set_file(file_path)
    @dialog.show
  end

  def self.open_help
    UI.openURL(EXTENSION[:url])
  end

end # module

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
skippy-0.5.2.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.5.1.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.5.0.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.4.3.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.4.2.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.4.1.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.4.0.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.3.0.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.2.0.a app/templates/webdialog/%ext_name%/main.rb.tt
skippy-0.1.1.a app/templates/webdialog/extension/main.rb.erb
skippy-0.1.0.a app/templates/webdialog/extension/main.rb.erb