[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question about using Lua for defining GUIs
- From: RLake@...
- Date: Fri, 10 Jan 2003 14:23:04 -0500
How about this:
Personally, I would ditch the word Create, but that is a question of style.
I like constructors whose names are the names of the type itself.
CreateGUI
{
name = "Canvas",
horizontal = "left",
vertical = "top",
position = "0 0",
visible = 1,
bitmap = "./bitmaps/bitmap.jpg",
size = "640 480",
components = {
CreateComponent
{
type = "ClockComponent",
name = "Clock",
horizontal = "left",
vertical = "top",
position = "0 0",
visible = 1,
size = "100 100"
},
CreateComponent
{
-- etc.
}
}
}