mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-24 16:07:36 +00:00
# Add opt-in automatic feedback system.
Add GL implementation limits to hwdetect. Make the in-game manual support multiple text files. Remove unnecessary instruction on how to close the manual window. Make guitextobject.caption return the original value without stripping formatting tags. Remove unused non-VFS support from config system. Support writing config files back to their original path. Remove unnecessary user profile directory; use normal config directory. This was SVN commit r8925.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "graphics/MapReader.h"
|
||||
#include "gui/GUIManager.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
#include "maths/FixedVector3D.h"
|
||||
#include "network/NetClient.h"
|
||||
@@ -36,6 +37,7 @@
|
||||
#include "ps/Hotkey.h"
|
||||
#include "ps/Overlay.h"
|
||||
#include "ps/Pyrogenesis.h"
|
||||
#include "ps/UserReport.h"
|
||||
#include "ps/GameSetup/Atlas.h"
|
||||
#include "ps/GameSetup/Config.h"
|
||||
|
||||
@@ -342,6 +344,29 @@ void DisplayErrorDialog(void* UNUSED(cbdata), std::wstring msg)
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool IsUserReportEnabled(void* UNUSED(cbdata))
|
||||
{
|
||||
return g_UserReporter.IsReportingEnabled();
|
||||
}
|
||||
|
||||
void SetUserReportEnabled(void* UNUSED(cbdata), bool enabled)
|
||||
{
|
||||
g_UserReporter.SetReportingEnabled(enabled);
|
||||
}
|
||||
|
||||
std::string GetUserReportStatus(void* UNUSED(cbdata))
|
||||
{
|
||||
return g_UserReporter.GetStatus();
|
||||
}
|
||||
|
||||
void SubmitUserReport(void* UNUSED(cbdata), std::string type, int version, std::wstring data)
|
||||
{
|
||||
g_UserReporter.SubmitReport(type.c_str(), version, utf8_from_wstring(data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SetSimRate(void* UNUSED(cbdata), float rate)
|
||||
{
|
||||
g_Game->SetSimRate(rate);
|
||||
@@ -449,6 +474,12 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
|
||||
scriptInterface.RegisterFunction<bool, std::string, &HotkeyIsPressed_>("HotkeyIsPressed");
|
||||
scriptInterface.RegisterFunction<void, std::wstring, &DisplayErrorDialog>("DisplayErrorDialog");
|
||||
|
||||
// User report functions
|
||||
scriptInterface.RegisterFunction<bool, &IsUserReportEnabled>("IsUserReportEnabled");
|
||||
scriptInterface.RegisterFunction<void, bool, &SetUserReportEnabled>("SetUserReportEnabled");
|
||||
scriptInterface.RegisterFunction<std::string, &GetUserReportStatus>("GetUserReportStatus");
|
||||
scriptInterface.RegisterFunction<void, std::string, int, std::wstring, &SubmitUserReport>("SubmitUserReport");
|
||||
|
||||
// Development/debugging functions
|
||||
scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");
|
||||
scriptInterface.RegisterFunction<void, int, &SetTurnLength>("SetTurnLength");
|
||||
|
||||
Reference in New Issue
Block a user