GUI for pyglet

9 views
Skip to first unread message

Chris

unread,
Jun 4, 2016, 8:01:14 PM6/4/16
to libaudioverse
Hi,
Really sorry to be posting something so blatently off-topic here, but I remember someone talking about text input from within Pyglet a few weeks back, and I couldn't find that post.

Anyways, for anyone who's interested, I'm making a GUI thingy for Pyglet. It's only about 3 hours old, so expect bugs, but it works for me.

Get the code from:
https://github.com/chrisnorman7/menu.git

Here's the code for the test program I'm using thus far:
import pyglet
from pyglet.window import Window
from menu.menu import Menu
from menu.item import SimpleItem, ClickableItem, ListItem, CheckboxItem, TextboxItem

m = Menu('Test menu')
m.append_item(SimpleItem(m, 'First menu item.'))
m.append_item(TextboxItem(m, 'Message'))
m.append_item(ListItem(m, 'Title', ['MR.', 'MS.', 'MRS.', 'DR.']))
m.append_item(CheckboxItem(m, 'I have read the terms and conditions'))
m.append_item(ClickableItem(m, 'Quit program', lambda control: control.menu.window.close()))

w = Window(caption = 'Test Window')

m.attach(w)
pyglet.app.run()

It is worth noting that this code will only work under Python 3. If you're not using Python 3 then you should join the herd and upgrade! :P

Once again sorry for the off-topicness.

Cheers, and hope all are well.

Austin Hicks

unread,
Jun 5, 2016, 11:59:12 AM6/5/16
to libaud...@camlorn.net

Not to be off topic on my own list, but...


At one point you had told me you wanted to use Wx instead, and we had agreed that it was probably workable.  What happened?

--
You received this message because you are subscribed to the Google Groups "libaudioverse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libaudiovers...@camlorn.net.
To post to this group, send email to libaud...@camlorn.net.
To view this discussion on the web visit https://groups.google.com/a/camlorn.net/d/msgid/libaudioverse/5721f141-bd99-40b7-9ee0-a01dfefceb9d%40camlorn.net.

Chris Norman

unread,
Jun 8, 2016, 4:08:57 AM6/8/16
to libaud...@camlorn.net

This is for a different project LOL.


You know me mate, great at starting stuff, and this one's a little less intensive while real life is so much more appealing than the digital world! :-)


Take care,

Reply all
Reply to author
Forward
0 new messages