Add xmessage-based GUI dialog box for debug messages on Linux (fixes #663).

Switch out of fullscreen before displaying dialog boxes.
Add Engine.DebugWarn for testing.

This was SVN commit r8661.
This commit is contained in:
Ykkrosh
2010-11-20 17:14:45 +00:00
parent e971c85da5
commit 74c19b5015
4 changed files with 148 additions and 7 deletions
+6
View File
@@ -356,6 +356,11 @@ int Crash(void* UNUSED(cbdata))
return *(int*)0;
}
void DebugWarn(void* UNUSED(cbdata))
{
debug_warn(L"Warning at user's request.");
}
// Force a JS garbage collection cycle to take place immediately.
// Writes an indication of how long this took to the console.
void ForceGC(void* cbdata)
@@ -416,5 +421,6 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<void, int, &SetTurnLength>("SetTurnLength");
scriptInterface.RegisterFunction<void, float, float, float, &SetCameraTarget>("SetCameraTarget");
scriptInterface.RegisterFunction<int, &Crash>("Crash");
scriptInterface.RegisterFunction<void, &DebugWarn>("DebugWarn");
scriptInterface.RegisterFunction<void, &ForceGC>("ForceGC");
}