Scrolling Frontend Menu for MAME

Just starting out? Need help? Post your questions and find answers here.
PeterGams
User
User
Posts: 25
Joined: Sun Dec 03, 2006 4:19 am
Location: Australia

Scrolling Frontend Menu for MAME

Post 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.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post 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:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 345
Joined: Sat Dec 25, 2004 2:37 pm

Post 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 !
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Heh, another Mamer! :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
PeterGams
User
User
Posts: 25
Joined: Sun Dec 03, 2006 4:19 am
Location: Australia

Thanks Guys

Post 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.....
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 345
Joined: Sat Dec 25, 2004 2:37 pm

Re: Thanks Guys

Post 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
Post Reply