Code: Select all
-- **************************************************
-- General information about this script
-- **************************************************
ScriptName = "Test_Script"
Test_Script = {}
function Test_Script:Name()
return 'Test Script'
end
function Test_Script:Version()
return '1.0'
end
function Test_Script:UILabel()
return 'Test Script'
end
function Test_Script:Creator()
return 'Test'
end
function Test_Script:Description()
return 'Test'
end
-- **************************************************
-- Is Relevant / Is Enabled
-- **************************************************
function Test_Script:IsRelevant(moho)
return true
end
function Test_Script:IsEnabled(moho)
return true
end
-- **************************************************
-- Tool Panel Layout
-- **************************************************
Test_Script.BUTTON_1 = MOHO.MSG_BASE
function Test_Script:DoLayout(moho, layout)
self.button1Button = LM.GUI.Button('Button 1', self.BUTTON_1)
layout:AddChild(self.button1Button, LM.GUI.ALIGN_LEFT, 0)
end
-- **************************************************
-- Events
-- **************************************************
function Test_Script:OnMouseDown(moho, mouseEvent)
end
function Test_Script:HandleMessage(moho, view, msg)
if msg == self.BUTTON_1 then
print('Message BUTTON_1 received')
else
end
end