Files
biomed/application.cpp
2026-02-12 10:51:02 +01:00

42 lines
665 B
C++

#include "application.h"
//#include "model.h"
//#include "console.h"
namespace Application
{
bool quit {false};
char dirty {1};
const bool& ShouldQuit()
{
return quit;
}
void Quit()
{
//if (Model::IsModified()) {
// Console::Ask("SAVE BEFORE QUITTING (YES/NO/CANCEL)?", Application::QuitHandler);
//} else {
quit = true;
//}
}
void QuitHandler(const char* reply)
{
//if (reply[0] == 'Y') {
// Model::Save();
//} else if (reply[0] == 'N') {
// quit = true;
//}
}
bool NeedsUpdate(const char cycles)
{
if (cycles > 0 and cycles > dirty) dirty = cycles;
return dirty > 0;
}
void Updated() { if (dirty > 0) dirty--; }
}