Added "Reset Controls" Feature under the Main-Menu Options->Controls
git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@102 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
10
src/menu.cpp
10
src/menu.cpp
@@ -1198,7 +1198,7 @@ char controlsmenu(stCloneKeenPlus *pCKP)
|
|||||||
// Prepare the Games Menu
|
// Prepare the Games Menu
|
||||||
ControlsMenu = new CDialog();
|
ControlsMenu = new CDialog();
|
||||||
|
|
||||||
ControlsMenu->setDimensions(1,3,38,20);
|
ControlsMenu->setDimensions(1,2,38,21);
|
||||||
|
|
||||||
g_pInput->getEventName(IC_LEFT, 0, buf2);
|
g_pInput->getEventName(IC_LEFT, 0, buf2);
|
||||||
sprintf(buf,"P1 Left: %s",buf2);
|
sprintf(buf,"P1 Left: %s",buf2);
|
||||||
@@ -1250,6 +1250,7 @@ char controlsmenu(stCloneKeenPlus *pCKP)
|
|||||||
sprintf(buf,"P2 Status: %s",buf2);
|
sprintf(buf,"P2 Status: %s",buf2);
|
||||||
ControlsMenu->addOptionText(buf);
|
ControlsMenu->addOptionText(buf);
|
||||||
ControlsMenu->addSeparator();
|
ControlsMenu->addSeparator();
|
||||||
|
ControlsMenu->addOptionText("Reset Controls");
|
||||||
ControlsMenu->addOptionText("Return");
|
ControlsMenu->addOptionText("Return");
|
||||||
|
|
||||||
ControlsMenu->animateDialogBox(true);
|
ControlsMenu->animateDialogBox(true);
|
||||||
@@ -1340,6 +1341,13 @@ char controlsmenu(stCloneKeenPlus *pCKP)
|
|||||||
strcat(buf,buf2);
|
strcat(buf,buf2);
|
||||||
ControlsMenu->setOptionText(selection,buf);
|
ControlsMenu->setOptionText(selection,buf);
|
||||||
}
|
}
|
||||||
|
else if(selection == MAX_COMMANDS*2+1)
|
||||||
|
{
|
||||||
|
// Reset Controls here!
|
||||||
|
g_pInput->resetControls();
|
||||||
|
g_pInput->saveControlconfig();
|
||||||
|
break;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_pInput->saveControlconfig();
|
g_pInput->saveControlconfig();
|
||||||
|
|||||||
Reference in New Issue
Block a user