The NEW Build Your Own Arcade Controls
Front End Support => MaLa Frontend => Topic started by: brock.sampson on February 03, 2010, 11:50:31 am
-
I'm thinking about making a track and field style cocktail. One side will have standard street fighter layout, the other will have a trackball. I want to use mala's controller detection to flip the screen when using people use one side or the other. I can get controller detection to work with buttons but I don't know how to configure it to work with a mouse. Any help would be appreciated.
-
I'm thinking about making a track and field style cocktail. One side will have standard street fighter layout, the other will have a trackball. I want to use mala's controller detection to flip the screen when using people use one side or the other. I can get controller detection to work with buttons but I don't know how to configure it to work with a mouse. Any help would be appreciated.
You can't as such.
You could add a 'extra' button on the trackball side that could be used to flip the screen?
-
You you create a very simple autohotkey script (resident) so that when the mouse axes are detected in the mala program, a specific key is sent. Ask here: http://www.autohotkey.com/forum/forum-1.html&sid=28c11465ab545764224006bdf8572b3e (http://www.autohotkey.com/forum/forum-1.html&sid=28c11465ab545764224006bdf8572b3e)
-
OK, I'll save you time. Here's the script. It monitors the mouse every second. If it's moved, the F1 key is pressed. You can change that, of course. You can compile it with the tool provided with Autohotkey and run the exe before MaLa so that it stays resident.
#Persistent
#NoTrayIcon
SetTimer, monitorcursor, 1000
monitorcursor:
IfWinActive MaLa ahk_class TfrmMain
if !chk_mousepos()
send, {F1}
return
chk_mousepos(input=false)
{
static mousex, mousey
if !mousex OR !mousey
MouseGetPos, mousex, mousey
MouseGetPos, mousex2, mousey2
if (mousex = mousex2) AND (mousey = mousey2)
return true
else
{
mousex := mousex2
mousey := mousey2
return false
}
}