=begin
btm_Sculpt1_Dialog.rb

Copyright 2009, btmsketchup@hotmail.com

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Created by •BTM on 23/07/09.

Name:			Dialog (sculpt tools)
Version:		1.0
Description:	The settings inputbox for the sculpt tools.
Usage:			Set the settings of the tools, by using this tool, and inputing the settings desired.
=end
require 'sketchup.rb'
#===================================================================================
class SculptDialog
#===================================================================================
$btm_sculpt_radius = 20.0.to_l
$btm_sculpt_area = 0.0.to_l
$btm_sculpt_strength = 50
$btm_sculpt_gravity = 0
$btm_sculpt_trans = "linear"
$btm_sculpt_lag = "off"
$btm_sculpt_visual = "Inference + Radius"
$btm_sculpt_lock = "Use + Show"
#===================================================================================
def activate
repeat = 0
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
while repeat == 0
	prompts = ["Radius", "hard area", "Strength %", "gravity %","smoothness","lag-line", "cursor", "use locks"]
	defaults = [ $btm_sculpt_radius, $btm_sculpt_area, $btm_sculpt_strength, $btm_sculpt_gravity, $btm_sculpt_trans, $btm_sculpt_lag, $btm_sculpt_visual, $btm_sculpt_lock]
	list = ["","","","", "linear|s curve|pinch|bump", "on|off", "None|Inference|Radius|Inference + Radius", "Don't Use|Use|Use + Show"]
	results = UI.inputbox prompts, defaults, list, "Please input desired radius + strength."
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
	$btm_sculpt_radius = results[0]
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
		if results[1] >= 0
		$btm_sculpt_area = results[1]
		end
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
		if results[2] > 0
		$btm_sculpt_strength = results[2]
		repeat = 1
		else
		UI.messagebox "Strength division must be above 0."
		repeat = 0
		end
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
	$btm_sculpt_gravity = results[3]
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
	$btm_sculpt_trans = results[4]
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
	$btm_sculpt_lag = results[5]
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
	$btm_sculpt_visual = results[6]
#     -     -     -     -     -     -     -     -     -     -     -     -     -    -
	$btm_sculpt_lock = results[7]
end
end
#===================================================================================
end
		mgp = UI::Command.new("Dialog") { Sketchup.active_model.select_tool SculptDialog.new }
		$btm_sculpt_menu.add_item mgp
		mgp.large_icon = "./btm_dialog_24.png"
		mgp.small_icon = "./btm_dialog_16.png"
		mgp.tooltip = "Dialog"
		toolbar = $btm_sculpt_toolbar.add_item mgp
		case toolbar.get_last_state
		when 1
			toolbar.restore
		when -1   
			toolbar.show
		end