Page 1 of 1

Scrolling Frontend Menu for MAME

Posted: Tue Mar 31, 2009 12:07 pm
by PeterGams
I would like to use a scrolling menu controlled by the arrow keys up & Down to select the highlighted game title when I press crtl.


GAME 1
GAME 2
GAME 3
GAME 4
GAME 5

Press ctrl when GAME 3 is highlited and away she goes.
It's mainly just the text scrolling which is causing me a headache.

Posted: Tue Mar 31, 2009 2:03 pm
by Fluid Byte
You need to be a little more precise. What is a "scrolling menu"? Is it a window with a custom control? Is it a regular menu? Is it a dockmenu like on MacOS and Vista?

If it's something like a custom thing this could be helpful:

Code: Select all

OpenWindow(0,0,0,320,240,"void",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListViewGadget(0,5,5,120,230)
AddGadgetItem(0,-1,"[1] PuckMan")
AddGadgetItem(0,-1,"[2] Space Zap")
AddGadgetItem(0,-1,"[3] Tempest")
AddGadgetItem(0,-1,"[4] Donkey Kong")
AddGadgetItem(0,-1,"[5] Frogger")
AddGadgetItem(0,-1,"[6] Bagman")
SetActiveGadget(0)
SetGadgetState(0,0)

Repeat
	EventID = WaitWindowEvent()
	
	If EventID = #WM_KEYDOWN And EventwParam() = #VK_CONTROL
		Debug GetGadgetItemText(0,GetGadgetState(0))
	EndIf
	
	If EventID = #WM_MOUSEWHEEL
		ScrolVal = EventwParam() >> 16
		State = GetGadgetState(0)
		If ScrolVal < 0
			SetGadgetState(0,State + 1)		
		ElseIf State > 0
			SetGadgetState(0,State - 1)
		EndIf		
	EndIf	
Until EventID = #PB_Event_CloseWindow
Besides, use EasyMAME. It's the best frontend. You won't need anything else. :wink:

Posted: Tue Mar 31, 2009 8:03 pm
by thyphoon
Hello

I have an old projet for my MameCab
if you want to use some piece code... you can download it !

http://www.thyphoon.com/PureArcade3.0.zip

it's a frontend (multi emulator). But not finish ! I have no enough time !

The frontend main file is main.pb
The Configuration main file is configuration.pb

The code is not very beauty ! not enough comment, and french comment.

i would like a good and simple frontend to put in my MameCab (ArcadeVGA)
I hope this source code help you !

Posted: Tue Mar 31, 2009 10:37 pm
by blueznl
Heh, another Mamer! :-)

Thanks Guys

Posted: Thu Apr 02, 2009 9:54 am
by PeterGams
What i was hoping for was a Graphic/text scrolling menu
controlled by up/down arrows.
The selection line stays in the center of the screen and the text scrolls up and down.

I will also eventually have a screen shot of the game show up as it's title is highlighted.
Don't mean to be vague but it's hard to explain.

That's why I wanted to use drawtext.

Go Fellow MAMERS.....

Re: Thanks Guys

Posted: Wed Apr 08, 2009 6:49 am
by thyphoon
PeterGams wrote:What i was hoping for was a Graphic/text scrolling menu
controlled by up/down arrows.
The selection line stays in the center of the screen and the text scrolls up and down.

I will also eventually have a screen shot of the game show up as it's title is highlighted.
Don't mean to be vague but it's hard to explain.

That's why I wanted to use drawtext.

Go Fellow MAMERS.....
you have an exemple in my source code ... :P