UI Alignments
Posted: Mon May 13, 2024 4:23 pm
Is it possible to align any control to the right side of the toolbar? it seems LM.GUI.ALIGN_RIGHT dosn't effect at all.
Also is it possible to change width of the button? It seems this one is also missed.
Also is it possible to change width of the button? It seems this one is also missed.
Code: Select all
-- **************************************************
-- General information about this script
-- **************************************************
ScriptName = "TestScript"
TestScript = {}
function TestScript:Name()
return 'Name'
end
function TestScript:Version()
return 'Version'
end
function TestScript:UILabel()
return 'UILabel'
end
function TestScript:Creator()
return 'Creator'
end
function TestScript:Description()
return 'Description'
end
-- **************************************************
-- Is Relevant / Is Enabled
-- **************************************************
function TestScript:IsRelevant(moho)
return true
end
function TestScript:IsEnabled(moho)
return true
end
-- **************************************************
-- Events
-- **************************************************
function TestScript:OnMouseDown(moho, mouseEvent)
end
function TestScript:DoLayout(moho, layout)
local button = LM.GUI.Button('Button', 0)
layout:AddChild(button, LM.GUI.ALIGN_RIGHT, 0)
end