52 scvsprintf( temp,s,vl);
76 txtConsole->SetFont(txtConsoleFont);
85 txtCommand->SetFont(txtCommandFont);
88 btnExecute->SetToolTip(
_(
"Execute current command"));
91 btnLoad->SetDefault();
92 btnLoad->SetToolTip(
_(
"Load from file"));
95 btnClear->SetDefault();
96 btnClear->SetToolTip(
_(
"Clear output window"));
98 Panel1->SetSizer(BoxSizer2);
99 BoxSizer2->
Fit(Panel1);
103 BoxSizer1->
Fit(
this);
120 Log(
_(
"Welcome to the script console!"));
125 if (s_Console ==
this)
128 if (SquirrelVM::GetVMPtr())
139 if (msg.
Last() !=
_T(
'\n'))
157 if (
Manager::Get()->GetScriptingManager()->LoadBuffer(cmd,
_T(
"ScriptConsole")))
176 _T(
"Script files (*.script)|*.script"),
177 wxFD_OPEN | compatibility::wxHideReadonly);
182 Log(
_(
"Script loaded successfully"));
185 Log(
_(
"Loading script failed."));
wxSize Fit(wxWindow *window)
static const long ID_PANEL1
void OnbtnLoadClick(wxCommandEvent &event)
static void ProcessPendingEvents()
void Log(const wxString &msg)
ConfigManager * GetConfigManager(const wxString &name_space) const
const wxValidator wxDefaultValidator
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
void OnbtnExecuteClick(wxCommandEvent &event)
static const long ID_COMBOBOX1
static const long ID_STATICTEXT1
#define wxTE_PROCESS_ENTER
bool LoadScript(const wxString &filename)
Loads a script.
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
static void ScriptConsolePrintFunc(HSQUIRRELVM, const SQChar *s,...)
DLLIMPORT wxString cbC2U(const char *str)
Return str as a proper unicode-compatible string.
wxSizerItem * Add(wxWindow *window, const wxSizerFlags &flags)
static SQPRINTFUNCTION s_OldPrintFunc
const wxSize wxDefaultSize
SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v)
const wxPoint wxDefaultPosition
static wxColour GetColour(wxSystemColour index)
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
virtual wxString GetPath() const
void InjectScriptOutput(const wxString &output)
Injects script output.
const wxString & _(const wxString &string)
wxString & Trim(bool fromRight=true)
static const long ID_TEXTCTRL1
virtual wxString GetDirectory() const
void sq_setprintfunc(HSQUIRRELVM v, SQPRINTFUNCTION printfunc)
void SetSizeHints(wxWindow *window)
static wxBitmap GetBitmap(const wxArtID &id, const wxArtClient &client=wxART_OTHER, const wxSize &size=wxDefaultSize)
ScriptingManager * GetScriptingManager() const
void OnbtnClearClick(wxCommandEvent &event)