[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question about using Lua for defining GUIs
- From: "Peter Hill" <corwin@...>
- Date: Sat, 11 Jan 2003 03:04:36 -0000
pixellent@stodge.net:
> I'm using Lua in a game framework that I'm prototyping and I'd like to try
> to use Lua as a GUI definition language.
(snip sample)
> Now I know that the above doesn't work, but it's what I would like.
Why doesn't your example work? Aside from a comma missing after
size = "640 480"
it seems like a perfectly legal & workable statement.
Eg, (snipping out bits to shorten it) we have:
CreateGUI
{
name = "Canvas",
bitmap = "./bitmaps/bitmap.jpg",
size = "640 480",
CreateComponent
{
type = "ClockComponent",
name = "Clock",
size = "100 100"
}
}
which is equivalent to
local cmpt =
CreateComponent
{
type = "ClockComponent",
name = "Clock",
size = "100 100"
}
CreateGUI
{
name = "Canvas",
bitmap = "./bitmaps/bitmap.jpg",
size = "640 480",
[1] = cmpt
}
Am I missing the point here?
*cheers*
Peter Hill.