added SetPauseState wrapper

develop
doomchild 2010-09-16 13:10:04 -05:00
parent 70b1a48cea
commit 9844a8f8b3
2 changed files with 18 additions and 0 deletions

@ -37,6 +37,7 @@ DFHACK_EXPORT int Gui_Start(DFHackObject* gui);
DFHACK_EXPORT int Gui_Finish(DFHackObject* gui);
DFHACK_EXPORT int Gui_ReadPauseState(DFHackObject* gui);
DFHACK_EXPORT int Gui_SetPauseState(DFHackObject* gui, int8_t paused);
DFHACK_EXPORT int Gui_ReadViewScreen(DFHackObject* gui, t_viewscreen* viewscreen);
DFHACK_EXPORT int Gui_ReadMenuState(DFHackObject* gui, uint32_t* menuState);

@ -58,6 +58,23 @@ int Gui_ReadPauseState(DFHackObject* gui)
return -1;
}
int Gui_SetPauseState(DFHackObject* gui, int8_t paused)
{
if(gui != NULL)
{
bool pauseState = false;
if(paused > 0)
pauseState = true;
((DFHack::Gui*)gui)->SetPauseState(pauseState);
return 1;
}
return -1;
}
int Gui_ReadViewScreen(DFHackObject* gui, t_viewscreen* viewscreen)
{
if(gui != NULL)