mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 14:12:23 +00:00
53bcba3368
IGUIObject: Cache the JSObject*, to prevent some frequent allocation while running GUI scripts. JSInterface_IGUIObject: Fixed garbage collection issues. JSInterface_IGUIObject, ScriptGlue: Changed to the JS_THREADSAFE form of JS_GetClass. Util: Avoid startup warnings on Linux caused by using unimplemented cpu_* functions that aren't needed for anything important yet. sysdep/unix: Changed to native line endings. This was SVN commit r5154.
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#ifndef INCLUDED_SCENARIOEDITOR
|
|
#define INCLUDED_SCENARIOEDITOR
|
|
|
|
#include "General/AtlasWindowCommandProc.h"
|
|
#include "CustomControls/FileHistory/FileHistory.h"
|
|
#include "SectionLayout.h"
|
|
|
|
class ScriptInterface;
|
|
|
|
class ScenarioEditor : public wxFrame
|
|
{
|
|
public:
|
|
ScenarioEditor(wxWindow* parent, ScriptInterface& scriptInterface);
|
|
void OnClose(wxCloseEvent& event);
|
|
void OnTimer(wxTimerEvent& event);
|
|
void OnIdle(wxIdleEvent& event);
|
|
|
|
// void OnNew(wxCommandEvent& event);
|
|
void OnOpen(wxCommandEvent& event);
|
|
void OnSave(wxCommandEvent& event);
|
|
void OnSaveAs(wxCommandEvent& event);
|
|
void OnMRUFile(wxCommandEvent& event);
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
void OnUndo(wxCommandEvent& event);
|
|
void OnRedo(wxCommandEvent& event);
|
|
|
|
void OnWireframe(wxCommandEvent& event);
|
|
void OnMessageTrace(wxCommandEvent& event);
|
|
void OnScreenshot(wxCommandEvent& event);
|
|
void OnMediaPlayer(wxCommandEvent& event);
|
|
void OnJavaScript(wxCommandEvent& event);
|
|
|
|
void OpenFile(const wxString& name);
|
|
|
|
static AtlasWindowCommandProc& GetCommandProc();
|
|
|
|
static float GetSpeedModifier();
|
|
|
|
ScriptInterface& GetScriptInterface() const { return m_ScriptInterface; }
|
|
|
|
private:
|
|
ScriptInterface& m_ScriptInterface;
|
|
|
|
wxTimer m_Timer;
|
|
|
|
SectionLayout m_SectionLayout;
|
|
|
|
void SetOpenFilename(const wxString& filename);
|
|
wxString m_OpenFilename;
|
|
FileHistory m_FileHistory;
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
};
|
|
|
|
#endif // INCLUDED_SCENARIOEDITOR
|