Re #307 Removed unused code
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4241 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: fbf5fbc302cd5c37a54bc19ae06c0f0e21a8c11a Former-commit-id: 7a9c5c6473d57bb6d0286e57fc6db96f06049619
This commit is contained in:
parent
766eeede04
commit
abbaca7a85
2 changed files with 24 additions and 38 deletions
|
@ -25,8 +25,7 @@
|
|||
#include "mainmenu.h"
|
||||
|
||||
|
||||
static void *exitmenuHandle = NULL;
|
||||
static void *exitMainMenuHandle = NULL;
|
||||
static void *MenuHandle = NULL;
|
||||
|
||||
static void
|
||||
onAcceptExit(void * /* dummy */)
|
||||
|
@ -34,29 +33,6 @@ onAcceptExit(void * /* dummy */)
|
|||
LegacyMenu::self().quit();
|
||||
}
|
||||
|
||||
void* exitMenuInit(void *prevMenu, void *menuHandle)
|
||||
{
|
||||
if (menuHandle) {
|
||||
GfuiScreenRelease(menuHandle);
|
||||
}
|
||||
|
||||
menuHandle = GfuiScreenCreate();
|
||||
|
||||
void *param = GfuiMenuLoad("exitmenu.xml");
|
||||
|
||||
GfuiMenuCreateStaticControls(menuHandle, param);
|
||||
GfuiMenuCreateButtonControl(menuHandle, param, "yesquit", NULL, onAcceptExit);
|
||||
GfuiMenuCreateButtonControl(menuHandle, param, "nobacktogame", prevMenu, GfuiScreenActivate);
|
||||
|
||||
GfParmReleaseHandle(param);
|
||||
|
||||
GfuiMenuDefaultKeysAdd(menuHandle);
|
||||
GfuiAddKey(menuHandle, GFUIK_RETURN, "Yes, quit the game", NULL, onAcceptExit, NULL);
|
||||
GfuiAddKey(menuHandle, GFUIK_ESCAPE, "No, back to the game", prevMenu, GfuiScreenActivate, NULL);
|
||||
|
||||
return menuHandle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Function
|
||||
* ExitMenuInit
|
||||
|
@ -65,23 +41,34 @@ void* exitMenuInit(void *prevMenu, void *menuHandle)
|
|||
* init the exit menus
|
||||
*
|
||||
* Parameters
|
||||
* none
|
||||
* prevMenu : Handle of the menu to activate when cancelling the exit action.
|
||||
*
|
||||
* Return
|
||||
* 0 ok -1 nok
|
||||
* The menu handle
|
||||
*
|
||||
* Remarks
|
||||
*
|
||||
*/
|
||||
void* ExitMenuInit(void *menu)
|
||||
{
|
||||
exitmenuHandle = exitMenuInit(menu, exitmenuHandle);
|
||||
return exitmenuHandle;
|
||||
}
|
||||
|
||||
|
||||
void* MainExitMenuInit(void *mainMenu)
|
||||
void* ExitMenuInit(void *prevMenu)
|
||||
{
|
||||
exitMainMenuHandle = exitMenuInit(mainMenu, exitMainMenuHandle);
|
||||
return exitMainMenuHandle;
|
||||
if (MenuHandle) {
|
||||
GfuiScreenRelease(MenuHandle);
|
||||
}
|
||||
|
||||
MenuHandle = GfuiScreenCreate();
|
||||
|
||||
void *param = GfuiMenuLoad("exitmenu.xml");
|
||||
|
||||
GfuiMenuCreateStaticControls(MenuHandle, param);
|
||||
GfuiMenuCreateButtonControl(MenuHandle, param, "yesquit", NULL, onAcceptExit);
|
||||
GfuiMenuCreateButtonControl(MenuHandle, param, "nobacktogame", prevMenu, GfuiScreenActivate);
|
||||
|
||||
GfParmReleaseHandle(param);
|
||||
|
||||
GfuiMenuDefaultKeysAdd(MenuHandle);
|
||||
GfuiAddKey(MenuHandle, GFUIK_RETURN, "Yes, quit the game", NULL, onAcceptExit, NULL);
|
||||
GfuiAddKey(MenuHandle, GFUIK_ESCAPE, "No, back to the game", prevMenu, GfuiScreenActivate, NULL);
|
||||
|
||||
return MenuHandle;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
#define _EXITMENU_H_
|
||||
|
||||
|
||||
extern void* ExitMenuInit(void *menu);
|
||||
extern void* MainExitMenuInit(void *mainMenu);
|
||||
extern void* ExitMenuInit(void *prevMenu);
|
||||
|
||||
#endif /* _EXITMENU_H_ */
|
||||
|
||||
|
|
Loading…
Reference in a new issue