How to create the image on a field dialogbox?
Posted: Sun Sep 26, 2004 2:30 pm
How to create the image on a field dialogbox?
I assume you are talking about a preview image, such as the star shape shown here:maxic wrote:How to create the image on a field dialogbox?
Code: Select all
d.preview = MOHO.MeshPreview(200, 200)
l:AddChild(d.preview)
Code: Select all
function LM_PolygonDialog:UpdatePreview()
local mesh = self.preview:Mesh()
mesh:Clear()
local numPoints = self.numPoints:IntValue()
numPoints = LM.Clamp(numPoints, 3, 20)
LM_Polygon:BuildPolygon(mesh, numPoints)
self.preview:CreateShape(true)
self.preview:Refresh()
end
Code: Select all
self:UpdatePreview()
Maybe. There are certainly lots of ways to imrpove the Lua scripting capabilities.maxic wrote:And in the future it is planned?