My Project
ParaEngineSettings.h
1 #pragma once
2 #include "IAttributeFields.h"
3 #include "util/NetworkAdapter.h"
4 
5 namespace ParaEngine
6 {
7  using namespace luabind;
8 
12  enum class LanguageType
13  {
14  ENGLISH = 0,
15  CHINESE,
16  FRENCH,
17  ITALIAN,
18  GERMAN,
19  SPANISH,
20  DUTCH,
21  RUSSIAN,
22  KOREAN,
23  JAPANESE,
24  HUNGARIAN,
25  PORTUGUESE,
26  ARABIC,
27  NORWEGIAN,
28  POLISH
29  };
30 
37  {
38  public:
39  ParaEngineSettings(void);
40  virtual ~ParaEngineSettings(void);
42  static ParaEngineSettings& GetSingleton();
43  public:
45  // implementation of IAttributeFields
46 
48  virtual int GetAttributeClassID(){return ATTRIBUTE_CLASSID_ParaEngineSetting;}
50  virtual const char* GetAttributeClassName(){static const char name[] = "ParaEngineSettings"; return name;}
52  virtual const char* GetAttributeClassDescription(){static const char desc[] = ""; return desc;}
54  virtual int InstallFields(CAttributeClass* pClass, bool bOverride);
55 
57  virtual IAttributeFields* GetChildAttributeObject(const std::string& sName);
59  virtual int GetChildAttributeObjectCount(int nColumnIndex = 0);
61  virtual int GetChildAttributeColumnCount();
62  virtual IAttributeFields* GetChildAttributeObject(int nRowIndex, int nColumnIndex = 0);
63 
64  ATTRIBUTE_METHOD1(ParaEngineSettings, GetScriptEditor_s, const char**) {*p1 = cls->GetScriptEditor().c_str(); return S_OK;}
65  ATTRIBUTE_METHOD1(ParaEngineSettings, SetScriptEditor_s, const char*) {cls->SetScriptEditor(p1); return S_OK;}
66 
67  ATTRIBUTE_METHOD1(ParaEngineSettings, GetCtorColor_s, Vector3*) {*p1 = cls->GetCtorColor().ToVector3(); return S_OK;}
68  ATTRIBUTE_METHOD1(ParaEngineSettings, SetCtorColor_s, Vector3) {LinearColor c(p1.x, p1.y,p1.z,1); cls->SetCtorColor(c); return S_OK;}
69 
70  ATTRIBUTE_METHOD1(ParaEngineSettings, GetCtorHeight_s, float*) {*p1 = cls->GetCtorHeight(); return S_OK;}
71  ATTRIBUTE_METHOD1(ParaEngineSettings, SetCtorHeight_s, float) {cls->SetCtorHeight(p1); return S_OK;}
72 
73  ATTRIBUTE_METHOD1(ParaEngineSettings, GetCtorSpeed_s, float*) {*p1 = cls->GetCtorSpeed(); return S_OK;}
74  ATTRIBUTE_METHOD1(ParaEngineSettings, SetCtorSpeed_s, float) {cls->SetCtorSpeed(p1); return S_OK;}
75 
76  ATTRIBUTE_METHOD1(ParaEngineSettings, GetSelectionColor_s, Vector3*) {*p1 = cls->GetSelectionColor().ToVector3(); return S_OK;}
77  ATTRIBUTE_METHOD1(ParaEngineSettings, SetSelectionColor_s, Vector3) {LinearColor c(p1.x, p1.y,p1.z,1); cls->SetSelectionColor(c); return S_OK;}
78 
79  ATTRIBUTE_METHOD1(ParaEngineSettings, IsDebugging_s, bool*) {*p1 = cls->IsDebugging(); return S_OK;}
80 
81  ATTRIBUTE_METHOD1(ParaEngineSettings, IsTouchInputting_s, bool*) { *p1 = cls->IsTouchInputting(); return S_OK; }
82 
83  ATTRIBUTE_METHOD1(ParaEngineSettings, IsSlateMode_s, bool*) { *p1 = cls->IsSlateMode(); return S_OK; }
84 
85  ATTRIBUTE_METHOD1(ParaEngineSettings, IsServerMode_s, bool*) { *p1 = cls->IsServerMode(); return S_OK; }
86 
87  ATTRIBUTE_METHOD1(ParaEngineSettings, IsEditing_s, bool*) {*p1 = cls->IsEditing(); return S_OK;}
88  ATTRIBUTE_METHOD1(ParaEngineSettings, SetEditingMode_s, bool) {cls->SetEditingMode(p1); return S_OK;}
89 
90  ATTRIBUTE_METHOD1(ParaEngineSettings, SetLockWindowSize_s, bool) { cls->SetLockWindowSize(p1); return S_OK; }
91 
92  ATTRIBUTE_METHOD1(ParaEngineSettings, IsShowWindowTitleBar_s, bool*) { *p1 = cls->IsShowWindowTitleBar(); return S_OK; }
93  ATTRIBUTE_METHOD1(ParaEngineSettings, SetShowWindowTitleBar_s, bool) { cls->SetShowWindowTitleBar(p1); return S_OK; }
94 
95 
96  ATTRIBUTE_METHOD1(ParaEngineSettings, GetGameEffectSet_s, int*) {*p1 = cls->GetGameEffectSet(); return S_OK;}
97  ATTRIBUTE_METHOD1(ParaEngineSettings, LoadGameEffectSet_s, int) {cls->LoadGameEffectSet(p1); return S_OK;}
98 
99  ATTRIBUTE_METHOD1(ParaEngineSettings, GetTextureLOD_s, int*) {*p1 = cls->GetTextureLOD(); return S_OK;}
100  ATTRIBUTE_METHOD1(ParaEngineSettings, SetTextureLOD_s, int) {cls->SetTextureLOD(p1); return S_OK;}
101 
102  ATTRIBUTE_METHOD1(ParaEngineSettings, GetLocale_s, const char**) {*p1 = cls->GetLocale(); return S_OK;}
103  ATTRIBUTE_METHOD1(ParaEngineSettings, SetLocale_s, const char*) {cls->SetLocale(p1); return S_OK;}
104  ATTRIBUTE_METHOD1(ParaEngineSettings, GetCurrentLanguage_s, int*) { *p1 = (int)(cls->GetCurrentLanguage()); return S_OK; }
105 
106  ATTRIBUTE_METHOD1(ParaEngineSettings, GetMouseInverse_s1, bool*) {*p1 = cls->GetMouseInverse(); return S_OK;}
107  ATTRIBUTE_METHOD1(ParaEngineSettings, SetMouseInverse_s1, bool) {cls->SetMouseInverse(p1); return S_OK;}
108 
109  ATTRIBUTE_METHOD1(ParaEngineSettings, GetIgnoreWindowSizeChange_s, bool*) {*p1 = cls->GetIgnoreWindowSizeChange(); return S_OK;}
110  ATTRIBUTE_METHOD1(ParaEngineSettings, SetIgnoreWindowSizeChange_s, bool) {cls->SetIgnoreWindowSizeChange(p1); return S_OK;}
111 
112 
113  ATTRIBUTE_METHOD1(ParaEngineSettings, GetWindowText1_s, const char**) {*p1 = cls->GetWindowText1(); return S_OK;}
114  ATTRIBUTE_METHOD1(ParaEngineSettings, SetWindowText1_s, const char*) {cls->SetWindowText1(p1); return S_OK;}
115 
116  ATTRIBUTE_METHOD1(ParaEngineSettings, IsWindowClosingAllowed_s, bool*) {*p1 = cls->IsWindowClosingAllowed(); return S_OK;}
117  ATTRIBUTE_METHOD1(ParaEngineSettings, SetAllowWindowClosing_s, bool) {cls->SetAllowWindowClosing(p1); return S_OK;}
118 
119  ATTRIBUTE_METHOD1(ParaEngineSettings, HasClosingRequest_s, bool*) { *p1 = cls->HasClosingRequest(); return S_OK; }
120  ATTRIBUTE_METHOD1(ParaEngineSettings, SetHasClosingRequest_s, bool) { cls->SetHasClosingRequest(p1); return S_OK; }
121 
122  ATTRIBUTE_METHOD1(ParaEngineSettings, IsFullScreenMode_s, bool*) {*p1 = cls->IsFullScreenMode(); return S_OK;}
123  ATTRIBUTE_METHOD1(ParaEngineSettings, SetFullScreenMode_s, bool) {cls->SetFullScreenMode(p1); return S_OK;}
124 
125  ATTRIBUTE_METHOD(ParaEngineSettings, BringWindowToTop_s) {cls->BringWindowToTop(); return S_OK;}
126 
127  ATTRIBUTE_METHOD1(ParaEngineSettings, HasNewConfig_s, bool*) {*p1 = cls->HasNewConfig(); return S_OK;}
128  ATTRIBUTE_METHOD1(ParaEngineSettings, SetHasNewConfig_s, bool) {cls->SetHasNewConfig(p1); return S_OK;}
129 
130  ATTRIBUTE_METHOD1(ParaEngineSettings, GetScreenResolution_s, Vector2*) {*p1 = cls->GetScreenResolution(); return S_OK;}
131  ATTRIBUTE_METHOD1(ParaEngineSettings, SetScreenResolution_s, Vector2) {cls->SetScreenResolution(p1); return S_OK;}
132 
133  ATTRIBUTE_METHOD1(ParaEngineSettings, GetMultiSampleType_s, int*) {*p1 = cls->GetMultiSampleType(); return S_OK;}
134  ATTRIBUTE_METHOD1(ParaEngineSettings, SetMultiSampleType_s, int) {cls->SetMultiSampleType(p1); return S_OK;}
135 
136  ATTRIBUTE_METHOD1(ParaEngineSettings, GetMultiSampleQuality_s, int*) {*p1 = cls->GetMultiSampleQuality(); return S_OK;}
137  ATTRIBUTE_METHOD1(ParaEngineSettings, SetMultiSampleQuality_s, int) {cls->SetMultiSampleQuality(p1); return S_OK;}
138 
139  ATTRIBUTE_METHOD(ParaEngineSettings, UpdateScreenMode_s) {cls->UpdateScreenMode(); return S_OK;}
140 
141  ATTRIBUTE_METHOD1(ParaEngineSettings, SetShowMenu_s, bool) {cls->ShowMenu(p1); return S_OK;}
142 
143  ATTRIBUTE_METHOD1(ParaEngineSettings, IsProfilingEnabled_s, bool*) {*p1 = cls->IsProfilingEnabled(); return S_OK;}
144  ATTRIBUTE_METHOD1(ParaEngineSettings, EnableProfiling_s, bool) {cls->EnableProfiling(p1); return S_OK;}
145 
146  ATTRIBUTE_METHOD1(ParaEngineSettings, Is3DRenderingEnabled_s, bool*) {*p1 = cls->Is3DRenderingEnabled(); return S_OK;}
147  ATTRIBUTE_METHOD1(ParaEngineSettings, Enable3DRendering_s, bool) {cls->Enable3DRendering(p1); return S_OK;}
148 
149  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAsyncLoaderItemsLeft_s, int*) {*p1 = cls->GetAsyncLoaderItemsLeft(-2); return S_OK;}
150  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAsyncLoaderBytesReceived_s, int*) {*p1 = cls->GetAsyncLoaderBytesReceived(-2); return S_OK;}
151  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAsyncLoaderRemainingBytes_s, int*) {*p1 = cls->GetAsyncLoaderRemainingBytes(); return S_OK;}
152 
153  ATTRIBUTE_METHOD1(ParaEngineSettings, GetVertexShaderVersion_s, int*) {*p1 = cls->GetVertexShaderVersion(); return S_OK;}
154  ATTRIBUTE_METHOD1(ParaEngineSettings, GetPixelShaderVersion_s, int*) {*p1 = cls->GetPixelShaderVersion(); return S_OK;}
155 
156  ATTRIBUTE_METHOD1(ParaEngineSettings, GetRefreshTimer_s, float*) {*p1 = cls->GetRefreshTimer(); return S_OK;}
157  ATTRIBUTE_METHOD1(ParaEngineSettings, SetRefreshTimer_s, float) {cls->SetRefreshTimer(p1); return S_OK;}
158 
159  ATTRIBUTE_METHOD(ParaEngineSettings, AllocConsole_s) {cls->AllocConsole(); return S_OK;}
160  ATTRIBUTE_METHOD1(ParaEngineSettings, SetConsoleTextAttribute_s, int) {cls->SetConsoleTextAttribute(p1); return S_OK;}
161 
162  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAppCount_s, int*) { *p1 = cls->GetAppCount(); return S_OK; }
163 
164  ATTRIBUTE_METHOD1(ParaEngineSettings, GetCoreUsage_s, int*) {*p1 = cls->GetCoreUsage(); return S_OK;}
165  ATTRIBUTE_METHOD1(ParaEngineSettings, SetCoreUsage_s, int) {cls->SetCoreUsage(p1); return S_OK;}
166 
167  ATTRIBUTE_METHOD1(ParaEngineSettings, GetProcessId_s, int*) { *p1 = cls->GetProcessId(); return S_OK; }
168 
169  ATTRIBUTE_METHOD1(ParaEngineSettings, GetSystemInfoString_s, const char**) {*p1 = cls->GetSystemInfoString().c_str(); return S_OK;}
170 
171  ATTRIBUTE_METHOD1(ParaEngineSettings, GetMaxMacAddress_s, const char**) {*p1 = cls->GetMaxMacAddress().c_str(); return S_OK;}
172  ATTRIBUTE_METHOD1(ParaEngineSettings, GetMaxIPAddress_s, const char**) { *p1 = cls->GetMaxIPAddress().c_str(); return S_OK; }
173 
174 
175  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAutoLowerFrameRateWhenNotFocused_s, bool*) {*p1 = cls->GetAutoLowerFrameRateWhenNotFocused(); return S_OK;}
176  ATTRIBUTE_METHOD1(ParaEngineSettings, SetAutoLowerFrameRateWhenNotFocused_s, bool) {cls->SetAutoLowerFrameRateWhenNotFocused(p1); return S_OK;}
177 
178  ATTRIBUTE_METHOD1(ParaEngineSettings, GetToggleSoundWhenNotFocused_s, bool*) {*p1 = cls->GetToggleSoundWhenNotFocused(); return S_OK;}
179  ATTRIBUTE_METHOD1(ParaEngineSettings, SetToggleSoundWhenNotFocused_s, bool) {cls->SetToggleSoundWhenNotFocused(p1); return S_OK;}
180 
181  ATTRIBUTE_METHOD1(ParaEngineSettings, Is32bitsTextureEnabled_s, bool*) {*p1 = cls->Is32bitsTextureEnabled(); return S_OK;}
182  ATTRIBUTE_METHOD1(ParaEngineSettings, Enable32bitsTexture_s, bool) {cls->Enable32bitsTexture(p1); return S_OK;}
183 
184  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAppHasFocus_s, bool*) {*p1 = cls->GetAppHasFocus(); return S_OK;}
185  ATTRIBUTE_METHOD1(ParaEngineSettings, SetAppHasFocus_s, bool) {cls->SetAppHasFocus(p1); return S_OK;}
186 
187  ATTRIBUTE_METHOD1(ParaEngineSettings, IsMouseCaptured_s, bool*) { *p1 = cls->IsMouseCaptured(); return S_OK; }
188  ATTRIBUTE_METHOD1(ParaEngineSettings, SetCaptureMouse_s, bool) { cls->SetCaptureMouse(p1); return S_OK; }
189 
190  ATTRIBUTE_METHOD1(ParaEngineSettings, IsSandboxMode_s, bool*) { *p1 = cls->IsSandboxMode(); return S_OK; }
191  ATTRIBUTE_METHOD1(ParaEngineSettings, SetSandboxMode_s, bool) { if(p1) cls->SetSandboxMode(p1); return S_OK; }
192 
193  ATTRIBUTE_METHOD1(ParaEngineSettings, GetDisplayMode_s, const char**) {*p1 = cls->GetDispalyMode().c_str(); return S_OK;}
194  ATTRIBUTE_METHOD1(ParaEngineSettings, GetMonitorResolution_s, Vector2*) {*p1 = cls->GetMonitorResolution(); return S_OK;}
195  ATTRIBUTE_METHOD1(ParaEngineSettings, GetWindowResolution_s, Vector2*) { *p1 = cls->GetWindowResolution(); return S_OK; }
196 
197  ATTRIBUTE_METHOD1(ParaEngineSettings, SetDefaultOpenFileFolder_s, const char*) { cls->SetDefaultOpenFileFolder(p1); return S_OK; }
198  ATTRIBUTE_METHOD1(ParaEngineSettings, GetOpenFolder_s, const char**) { *p1 = cls->GetOpenFolder(); return S_OK; }
199 
200  ATTRIBUTE_METHOD1(ParaEngineSettings, SetIcon_s, const char*) { cls->SetIcon(p1); return S_OK; }
201 
202  ATTRIBUTE_METHOD1(ParaEngineSettings, GetPlatform_s, int*) { *p1 = cls->GetPlatform(); return S_OK; }
203  ATTRIBUTE_METHOD1(ParaEngineSettings, IsMobilePlatform_s, bool*) { *p1 = cls->IsMobilePlatform(); return S_OK; }
204 
205  ATTRIBUTE_METHOD1(ParaEngineSettings, Is64BitsSystem_s, bool*) { *p1 = cls->Is64BitsSystem(); return S_OK; }
206 
207  ATTRIBUTE_METHOD(ParaEngineSettings, RecreateRenderer_s) { cls->RecreateRenderer(); return S_OK; }
208 
209  ATTRIBUTE_METHOD1(ParaEngineSettings, GetFPS_s, float*) { *p1 = (float)(cls->GetFPS()); return S_OK; }
210  ATTRIBUTE_METHOD1(ParaEngineSettings, GetDrawCallCount_s, int*) { *p1 = cls->GetDrawCallCount(); return S_OK; }
211  ATTRIBUTE_METHOD1(ParaEngineSettings, GetTriangleCount_s, int*) { *p1 = cls->GetTriangleCount(); return S_OK; }
212 
213  ATTRIBUTE_METHOD1(ParaEngineSettings, GetPeakMemoryUse_s, int*) { *p1 = cls->GetPeakMemoryUse(); return S_OK; }
214  ATTRIBUTE_METHOD1(ParaEngineSettings, GetCurrentMemoryUse_s, int*) { *p1 = cls->GetCurrentMemoryUse(); return S_OK; }
215  ATTRIBUTE_METHOD1(ParaEngineSettings, GetVertexBufferPoolTotalBytes_s, int*) { *p1 = (int)cls->GetVertexBufferPoolTotalBytes(); return S_OK; }
216 
217  ATTRIBUTE_METHOD1(ParaEngineSettings, GetWritablePath_s, const char**) { *p1 = cls->GetWritablePath(); return S_OK; }
218  ATTRIBUTE_METHOD1(ParaEngineSettings, SetWritablePath_s, const char*) { cls->SetWritablePath(p1); return S_OK; }
219 
220  ATTRIBUTE_METHOD1(ParaEngineSettings, GetAppHWND_s, double*) { *p1 = (double)cls->GetAppHWND(); return S_OK; }
221  public:
223  static bool IsSandboxMode();
224 
226  static void SetSandboxMode(bool val);
227 
230  static void SetOceanTechnique(DWORD dwTechnique);
231 
233  void SetScriptEditor(const string& sEditorFilePath);
235  const string& GetScriptEditor();
236 
238  void SetDefaultOpenFileFolder(const char* sDefaultOpenFileFolder);
239 
241  const char* GetOpenFolder();
242 
243  void RecreateRenderer();
245  //
246  // mesh construction settings
247  //
249 
250  LinearColor GetCtorColor();
251  static LinearColor GetCtorColorS(){ return GetSingleton().GetCtorColor();};
253  void SetCtorColor(const LinearColor& color);
254  static void SetCtorColorS(const LinearColor& color){ GetSingleton().SetCtorColor(color);};
255 
257  void AllocConsole();
258 
263  void SetConsoleTextAttribute(int wAttributes);
264 
269  DWORD GetCoreUsage();
270 
275  void SetCoreUsage(DWORD dwUsage);
276 
278  int GetProcessId();
279 
281  LinearColor GetSelectionColor(int nGroupID=0);
282  static LinearColor GetSelectionColorS(){ return GetSingleton().GetSelectionColor();};
284  void SetSelectionColor(const LinearColor& color,int nGroupID=0);
285  static void SetSelectionColorS(const LinearColor& color){ GetSingleton().SetSelectionColor(color);};
286 
287 
289  float GetCtorHeight();
290  static float GetCtorHeightS(){ return GetSingleton().GetCtorHeight();};
292  void SetCtorHeight(float fHeight);
293  static void SetCtorHeightS(float fHeight){ GetSingleton().SetCtorHeight(fHeight);};
294 
296  float GetCtorSpeed();
297  static float GetCtorSpeedS(){ return GetSingleton().GetCtorSpeed();};
298 
300  void SetCtorSpeed(float fSpeed);
301  static void SetCtorSpeedS(float fSpeed){ GetSingleton().SetCtorSpeed(fSpeed);};
302 
306  static void GetClientSize(int* width, int* height);
307 
309  static void EnableProfiling(bool bEnable);
310  static bool IsProfilingEnabled();
311 
316  static string GetStats(DWORD dwFields);
317 
323  int GetPeakMemoryUse();
324 
329  int GetCurrentMemoryUse();
330 
332  static void SetRefreshTimer(float fTimerInterval);
333 
335  static float GetRefreshTimer();
336 
345  static int GetPlatform();
346 
347  static bool IsMobilePlatform();
348 
350  static bool Is64BitsSystem();
352  //
353  // global effect and light settings
354  //
356 
369  void LoadGameEffectSet(int nSetID);
370  int GetGameEffectSet();
371  static void LoadGameEffectSetS(int nSetID){ GetSingleton().LoadGameEffectSet(nSetID);};
372  static int GetGameEffectSetS(){ return GetSingleton().GetGameEffectSet();};
373 
374 
375 
381  void SetTextureLOD(int nLOD);
382  int GetTextureLOD();
383 
384  /* get the current number of ParaEngine app running. */
385  int GetAppCount();
386 
388  int GetDrawCallCount();
390  int GetTriangleCount();
392  int GetFPS();
393 
396  void Enable32bitsTexture(bool bEnable);
397 
400  bool Is32bitsTextureEnabled();
401 
403  static bool IsDebugging();
404 
406  static bool IsTouchInputting();
407 
409  static bool IsSlateMode();
410 
412  bool HasNewConfig();
413  void SetHasNewConfig(bool bHasNewConfig);
414 
416  static bool IsEditing();
419  static void SetEditingMode(bool bEnable);
420 
422  static bool IsServerMode();
423 
437  const char* GetLocale();
438  static const char* GetLocaleS(){ return GetSingleton().GetLocale();};
439 
441  void SetLocale(const char* sLocale);
442  static void SetLocaleS(const char* sLocale){ GetSingleton().SetLocale(sLocale);};
443 
447  void SetIcon(const char* sIconFile);
448 
450  LanguageType GetCurrentLanguage();
452  void SetCurrentLanguage(LanguageType lang);
453 
461  static bool IsProductActivated();
468  static bool ActivateProduct(const char* sActivationCode);
469 
475  static const char* GetProductKey(const char* sProductName);
476 
488  static bool GenerateActivationCodes(const char* sOutputFileName, int nFrom, int nTo);
489 
491  void SetFullScreenMode(bool bFullscreen);
492  bool IsFullScreenMode();
493 
496  void BringWindowToTop();
497 
499  Vector2 GetScreenResolution();
500  void SetScreenResolution(const Vector2& vSize);
501 
503  Vector2 GetWindowResolution();
504 
506  int GetMultiSampleType();
507  void SetMultiSampleType(int nType);
508 
510  int GetMultiSampleQuality();
511  void SetMultiSampleQuality(int nType);
512 
516  int GetVertexShaderVersion();
517 
521  int GetPixelShaderVersion();
522 
525  const std::string& GetDispalyMode();
526 
527  Vector2 GetMonitorResolution();
528 
529 
534  const std::string& GetSystemInfoString(bool bRefresh = false);
535 
537  void UpdateScreenMode();
538 
540  static bool SetWindowedMode(bool bWindowed);
541 
543  static bool IsWindowedMode();
544 
547  void Enable3DRendering(bool bPause);
548 
551  bool Is3DRenderingEnabled();
552 
556  static void SetAllowWindowClosing(bool bAllowClosing);
557 
561  static bool IsWindowClosingAllowed();
562 
564  static void ShowMenu(bool bShow);
565 
568  static void SetIgnoreWindowSizeChange(bool bIgnoreSizeChange);
569 
571  static bool GetIgnoreWindowSizeChange();
572 
573 
577  static void EnablePassiveRendering(bool bEnable);
581  static bool IsPassiveRenderingEnabled();
582 
584  static void SetWindowText(const char* pChar);
585  void SetWindowText1(const char* pChar){SetWindowText(pChar);};
587  static const char* GetWindowText();
588  const char* GetWindowText1(){return GetWindowText();};
589 
594  static void WriteConfigFile(const char* sFileName);
595 
597  void SetMouseInverse(bool bInverse);
598  static void SetMouseInverse_s(bool bInverse){GetSingleton().SetMouseInverse(bInverse);};
599  bool GetMouseInverse();
600  static bool GetMouseInverse_s(){return GetSingleton().GetMouseInverse();};
601 
603  static const char* GetAppCommandLine();
604 
610  static const char* GetAppCommandLineByParam(const char* pParam, const object& defaultValue);
611 
616  static void SetAppCommandLine(const char* pCommandLine);
617 
628  int GetAsyncLoaderItemsLeft(int nItemType);
630  static int GetAsyncLoaderItemsLeftS(int nItemType) {return GetSingleton().GetAsyncLoaderItemsLeft(nItemType);} ;
631 
641  int GetAsyncLoaderBytesReceived(int nItemType);
643  static int GetAsyncLoaderBytesReceivedS(int nItemType) {return GetSingleton().GetAsyncLoaderBytesReceived(nItemType);};
644 
647  int GetAsyncLoaderRemainingBytes();
648 
650  void SetAutoLowerFrameRateWhenNotFocused(bool bEnabled);
651  bool GetAutoLowerFrameRateWhenNotFocused();
652 
654  void SetToggleSoundWhenNotFocused(bool bEnabled);
655  bool GetToggleSoundWhenNotFocused();
656 
658  void SetAppHasFocus(bool bEnabled);
660  bool GetAppHasFocus();
661 
662  void SetCaptureMouse(bool bCapture);
663  bool IsMouseCaptured();
664 
666  void SetLockWindowSize(bool bEnabled);
667 
669  void SetShowWindowTitleBar(bool bEnabled);
670  bool IsShowWindowTitleBar();
671 
672  const std::string& GetMaxMacAddress();
673 
674  const std::string& GetMaxIPAddress();
675 
677  size_t GetVertexBufferPoolTotalBytes();
678 
682  bool HasClosingRequest();
683  void SetHasClosingRequest(bool val);
684 
686  const char* GetWritablePath();
687 
691  void SetWritablePath(const char* sPath);
692 
693  static intptr_t GetAppHWND();
694  protected:
695  void LoadNameIndex();
696  private:
698  LinearColor m_ctorColor;
700  LinearColor m_selectionColor;
701 
702  float m_ctorHeight;
703  float m_ctorSpeed;
704  bool m_bEditingMode;
706  static bool m_bSandboxMode;
708  string m_sScriptEditorPath;
710  bool m_bInverseMouse;
711  /* current system language. */
712  int m_currentLanguage;
713 
725  string m_sLocale;
726  string m_displayModes;
727 
729  std::map<std::string, int> m_name_to_index;
730  };
731 }
void SetSelectionColor(const LinearColor &color, int nGroupID=0)
set the construction animation color.
Definition: ParaEngineSettings.cpp:95
static int GetAsyncLoaderItemsLeftS(int nItemType)
same as above, except it is meant to be called from the scripting interface
Definition: ParaEngineSettings.h:630
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
static int GetAsyncLoaderBytesReceivedS(int nItemType)
same as above, except it is meant to be called from the scripting interface
Definition: ParaEngineSettings.h:643
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: ParaEngineSettings.h:52
int GetAsyncLoaderBytesReceived(int nItemType)
get the total number of bytes processed.
Definition: ParaEngineSettings.cpp:880
different physics engine has different winding order.
Definition: EventBinding.h:32
float GetCtorHeight()
Get the construction animation region&#39;s height in meters.
Definition: ParaEngineSettings.cpp:110
void SetCtorSpeed(float fSpeed)
set the construction Speed.
Definition: ParaEngineSettings.cpp:135
void SetLocale(const char *sLocale)
Definition: ParaEngineSettings.cpp:369
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
float GetCtorSpeed()
Get the construction Speed.
Definition: ParaEngineSettings.cpp:121
void SetCtorHeight(float fHeight)
set the construction height.
Definition: ParaEngineSettings.cpp:115
void LoadGameEffectSet(int nSetID)
Load the game effect set.
Definition: ParaEngineSettings.cpp:207
PE_CORE_DECL size_t GetCurrentMemoryUse()
Returns the current resident set size (physical memory use) measured in bytes, or zero if the value c...
Definition: os_calls.cpp:370
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
PE_CORE_DECL size_t GetPeakMemoryUse()
Returns the peak (maximum so far) resident set size (physical memory use) measured in bytes...
Definition: os_calls.cpp:332
LinearColor GetSelectionColor(int nGroupID=0)
get the selection color.
Definition: ParaEngineSettings.cpp:91
Definition: PEtypes.h:507
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object&#39;s name
Definition: ParaEngineSettings.h:50
A common interface for all classes implementing IAttributeFields By implementing this class&#39;s virtual...
Definition: IAttributeFields.h:59
LinearColor GetCtorColor()
get the construction animation color.
Definition: ParaEngineSettings.cpp:100
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: ParaEngineSettings.h:48
LanguageType
Enum the language type supported now.
Definition: ParaEngineSettings.h:12
A linear, 32-bit/component floating point RGBA color.
Definition: ParaColor.h:12
int GetAsyncLoaderItemsLeft(int nItemType)
Get the number of items left in the asynchronous content loader queue.
Definition: ParaEngineSettings.cpp:874
void SetCtorColor(const LinearColor &color)
set the construction animation color.
Definition: ParaEngineSettings.cpp:105
const char * GetLocale()
The locale is what makes it possible to know what language the interface is using and thus determine ...
Definition: ParaEngineSettings.cpp:364
void SetMouseInverse(bool bInverse)
set whether the mouse is inversed.
Definition: ParaEngineSettings.cpp:662
global settings for ParaEngine.
Definition: ParaEngineSettings.h:36