Image
-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "HS_ToggleChecker"

-- **************************************************
-- General information about this script
-- **************************************************

HS_ToggleChecker = {}

function HS_ToggleChecker:Name()
	return "ToggleChecker"
end

function HS_ToggleChecker:Test()
--	return true
	return false
end

function HS_ToggleChecker:Version()
	return "1.00"
end

function HS_ToggleChecker:UILabel()
	return "Toggle Checker Selection"
end

function HS_ToggleChecker:Creator()
	return "hayasidist"
end

function HS_ToggleChecker:Description()
	return "Switch between box and checker for shape selection" .. HS_ToggleChecker:Version()
end

function HS_ToggleChecker:ColorizeIcon()
	return true
end
	

-- **************************************************
-- Is Relevant / Is Enabled
-- **************************************************

function HS_ToggleChecker:IsRelevant(moho)
	return true
end

function HS_ToggleChecker:IsEnabled(moho)
	return true
end


-- **************************************************
-- Recurring Values
-- **************************************************



-- **************************************************
-- Keyboard/Mouse Control
-- **************************************************

--[[
function HS_ToggleChecker:OnMouseDown(moho, mouseEvent)

end

function HS_ToggleChecker:OnMouseMoved(moho, mouseEvent)

end

function HS_ToggleChecker:OnMouseUp(moho, mouseEvent)

end
]]

function HS_ToggleChecker:Run(moho)
	MOHO.MohoGlobals.SelectedShapeCheckerboard = not (MOHO.MohoGlobals.SelectedShapeCheckerboard)
end


HS Toggle "Checker Selection"
Listed

Script type: Button/Menu

Uploaded: Nov 08 2023, 05:52

Script Version: 1.00

Flips the "Checker Selection" checkbox (in the Styles window) on/off
Install this as a tool button and optionally assign your own keyboard shortcut to it.
It will flip between showing selected shapes as checkered or with a bounding box. (The state of the "Checker Selection" box in the Styles window is inverted on each activation of this tool, whether the window is visible or not.)

The tool can be installed as a menu item but, as these cannot currently have a shortcut key assigned, there is no usability benefit from doing so.

Installation Options:

This script, and all other scripts on this site are distributed as free software under the GNU General Public License 3.0 or later.
Downloads count: 393