Page 2 of 2

Re: Yet another GUI toolkit: Gwee

Posted: Thu Dec 08, 2011 4:32 am
by ZephyrMC
lxp is LuaExpat. I don't include it with Gwee because part of it is a native library, and I don't have a good (portable) way to resolve the dependency. This is actually a good time to point out that a link to a pure Lua XML parser would be awesome if anyone knows of a good one :)

Re: Yet another GUI toolkit: Gwee

Posted: Thu Dec 08, 2011 10:36 am
by T-Bone
ZephyrMC wrote:lxp is LuaExpat. I don't include it with Gwee because part of it is a native library, and I don't have a good (portable) way to resolve the dependency. This is actually a good time to point out that a link to a pure Lua XML parser would be awesome if anyone knows of a good one :)
...so what's the point of this if it depends on a native library? If you could do a minecraft and include it for all platforms and then determine the OS and use the right one, I guess it could be useful.

Re: Yet another GUI toolkit: Gwee

Posted: Thu Dec 08, 2011 11:15 am
by kikito
It should be reasonably easy to adapt it to use pure lua code in addition to xml.

I mean using something like this as the source:

Code: Select all

return {
  { kind="button", id="foo", x="100", y="100", h="100", label="Button!" },
  { kind="textfield", id="field", x="100", y="200", w="100", h="30", label="Text Field:" }
}
Instead the xml:

Code: Select all

<interface>
    <button id="foo" x="100" y="100" w="100" h="30" label="Button!" />
    <textfield id="field" x="100" y="200" w="100" h="30" label="Text Field:" />
</interface>
Probably the former can be automatically generated from the later via xslt, and this would remove the luaexpat dependency - "just run this converter on your xml to produce a lua file".

Re: Yet another GUI toolkit: Gwee

Posted: Thu Dec 08, 2011 12:11 pm
by miko
ZephyrMC wrote:lxp is LuaExpat. I don't include it with Gwee because part of it is a native library, and I don't have a good (portable) way to resolve the dependency. This is actually a good time to point out that a link to a pure Lua XML parser would be awesome if anyone knows of a good one :)
How do you define "a good one"? Anyways, there are some pointers:
http://lua-users.org/wiki/LuaXml

Re: Yet another GUI toolkit: Gwee

Posted: Thu Dec 08, 2011 9:40 pm
by josefnpat
Yeah, the xml lib is stopping me from using. In all honesty, it would make it a lot easier to just define it all in lua, seeing as the people who would use it know lua already. Any screenshots yet? I see lots of commits to the git repo :)

Re: Yet another GUI toolkit: Gwee

Posted: Thu Dec 08, 2011 10:06 pm
by ZephyrMC
It should be reasonably easy to adapt it to use pure lua code in addition to xml.
Yeah, the xml lib is stopping me from using. In all honesty, it would make it a lot easier to just define it all in lua, seeing as the people who would use it know lua already.
Fair enough. I will work on a pure Lua version of the layout loader this afternoon.
automatically generated from the later via xslt
Also, this intrigues me.
...so what's the point of this if it depends on a native library?
Well, the widget set itself doesn't depend on a native library. The XML layouts module does, though, and the example uses the XML layouts module.

I will also push some screenshots this afternoon.