Create a menu on console output

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Create a menu on console output

ALBERT Aurélien
Hi,

I'm new to lua and I'm looking for a way to create a "console gui".

Not a like in a game, but on a system console, as the linux command "dialog" does. (all is done in text mode on console output)

Here is a link about linux "dialog" command : http://linuxcommand.org/lc3_adv_dialog.php
And here is a screenshot : http://linuxcommand.org/images/adventure_dialog-while-menu-dialog1.png

So, is there any lua library to do that kind of stuff ?
Or is it hard to make from scratch ? (I only need to support a menu, not all features of linux "dialog" command)

Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Create a menu on console output

Ignacio Burgueño-2


On Thu, Jun 18, 2015 at 6:18 PM, ALBERT Aurélien <[hidden email]> wrote:
Hi,

I'm new to lua and I'm looking for a way to create a "console gui".


LuaPosix includes bindings for curses. Is that what you want?


But, beware :)



Reply | Threaded
Open this post in threaded view
|

Re: Create a menu on console output

Sean Conner
In reply to this post by ALBERT Aurélien
It was thus said that the Great ALBERT Aurélien once stated:

> Hi,
>
> I'm new to lua and I'm looking for a way to create a "console gui".
>
> Not a like in a game, but on a system console, as the linux command "dialog" does. (all is done in text mode on console output)
>
> Here is a link about linux "dialog" command : http://linuxcommand.org/lc3_adv_dialog.php
> And here is a screenshot : http://linuxcommand.org/images/adventure_dialog-while-menu-dialog1.png
>
> So, is there any lua library to do that kind of stuff ?
> Or is it hard to make from scratch ? (I only need to support a menu, not all features of linux "dialog" command)

  I don't know of any, but there is a C library for dialog [1] so I don't
see why it would be that difficult to generate Lua bindings for it (at least
for the higher level dialog_*() functions).

  -spc

[1] http://invisible-island.net/dialog/manpage/dialog_lib.html

Reply | Threaded
Open this post in threaded view
|

RE: Create a menu on console output

ALBERT Aurélien
Thanks you both for your answers.

"LuaPosix includes bindings for curses. Is that what you want?"

=> I think this is a little "oversized" solution in my case

"but there is a C library for dialog [1] so I don't see why it would be that difficult to generate Lua bindings for it"

=> that's a great idea, I'll try that

Reply | Threaded
Open this post in threaded view
|

Re: Create a menu on console output

Coda Highland
On Fri, Jun 19, 2015 at 12:08 AM, ALBERT Aurélien
<[hidden email]> wrote:

> Thanks you both for your answers.
>
> "LuaPosix includes bindings for curses. Is that what you want?"
>
> => I think this is a little "oversized" solution in my case
>
> "but there is a C library for dialog [1] so I don't see why it would be that difficult to generate Lua bindings for it"
>
> => that's a great idea, I'll try that
>

Is it worth considering just shelling out to the dialog program?

/s/ Adam

Reply | Threaded
Open this post in threaded view
|

Re: Create a menu on console output

Dirk Laurie-2
In reply to this post by Sean Conner
2015-06-19 1:51 GMT+02:00 Sean Conner <[hidden email]>:

> It was thus said that the Great ALBERT Aurélien once stated:
>> I'm new to lua and I'm looking for a way to create a "console gui".

>   ... there is a C library for dialog [1]
>
> [1]     http://invisible-island.net/dialog/manpage/dialog_lib.html

Under Debian, Ubuntu etc, the library, including Perl bindings, and
documentation is bundled with the dialog binary. "dpkg -L dialog".