LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   full screen menu to select games? (http://www.linuxquestions.org/questions/linux-software-2/full-screen-menu-to-select-games-410723/)

johnson_steve 02-02-2006 02:04 AM

full screen menu to select games?
 
so I've been building some linux based emulation consoles for some people the first 2 were for me and my brother and both have a keyboard and mouse and run xfce and we select games in that. this is fine because we also use these for other uses so this is the most convienent way to go about it. but now I'm building one for my friend who is not so familiar with linux. this one is in a nes case and has no keyboard mouse or monitor, just a tvout and controllers. I was wondering if anyone knows of a menu program that will run fullscreen (with big font like 24 or 36 so it is easy to read on a tv) and either uses the arrow keys or the joystick to select something and run it? this way I could have this run when it starts up and he can select a game with his controller and play. I would like something with submenus and maybee a nice config file along the lines of:

Code:

#"Title that is shown to the user" = some app or script I'd like to run
"Tetris" = /usr/games/bin/fceu -fs 1 /usr/local/roms/nes/tetris.nes

you know so that the menu could launch just about anything I could from the prompt. Does anyone know of a program that can do this? I would prefer that it look old and crappy like a nes with huge font and maybee a background image.

Hosiah 02-02-2006 02:33 AM

Did somebody say "old 'n' crappy"? Tcl/Tk/Wish is your friend!:)

Of course, I don't know if this will work with your setup. But I do know you can do a Wish script like:

Code:

#!/usr/bin/wish

proc do_tetris {} {
    exec "/usr/games/tetris"
    exit
}

proc do_mario {} {
    exec "/usr/games/mario"
    exit
}

label .ask -text "Program to execute?"
button .te -text "tetris" -command "do_tetris"
button .ma -text "mario" -command "do_mario"
pack .ask
pack .te
pack .ma

A site about Tcl/Tk menus

My second guess would be to hack up something customized in SDL, which can read joysticks...that would be a lot of work, but you might be able to find something done already.

My third guess would be a Bash script dialog - Here's a site about it

cs-cam 02-02-2006 03:09 AM

I tried to do something similar recently (didn't try very hard though) and didn't see any easy solutions. SDL would be great but I didn't want to learn C just for something small like this :/ Google for animenu and see if you can make it compile, that would do the job. Tcl/Tk would do the job fine also or if you wanted to make something spiffy but easy, PyGTK + a GTK theme could do it easily enough, accept the joystick input and look half-decent.

johnson_steve 02-02-2006 03:16 AM

I'd prefer to avoid the button look of the tcl/tk wish menus but this will come in handy later. I thought I would have to make something in c (I'm not a programmer at least not any good) to do those kind of things. I like bash scripts. this menu would have to call a bunch of bash scripts I wrote to launch the emulators and set up the controllers anyway this looks like it would work well if I could remember how to change the color/font size of the console. I don't have to talk to the joysticks directly. I've been using Qjoypad to translate the controller to keyboard/mouse events. unless anyone can think of anything simpler I'll start working on a bash dialog menu but this may get tedious as I have like 640 nes games and like 2100 sega games. not to mention gb, gba, snes, and n64.

edit:
animenu is giving me compile errors (looking for the freetype headers in the wrong place?) I like that it would just make a menu from the contents of a directory but It looks like it's made to work with lirc. will it work with the keyboard?

cs-cam 02-02-2006 07:43 AM

No idea about animenu working with a keyboard, never got it working ;) Here is a good reference about colours in the shell, it's what I use when I'm playing with my initscripts.


All times are GMT -5. The time now is 06:11 PM.