diff options
author | Ima Mechanique <none@none> | 2011-11-17 23:17:26 +0000 |
---|---|---|
committer | Ima Mechanique <none@none> | 2011-11-17 23:17:26 +0000 |
commit | b28492fbffd7bea9e7174260d66d5f52c76d24b2 (patch) | |
tree | 754a3fdd3278b363c622b411ac9acda1bd5c3927 /indra/newview/llfilepicker.cpp | |
parent | 4bcdcd02fb7e83a2754084f2fb599b56ea6c8743 (diff) |
STORM-1708 Adding ability to save/load scripts from file.
Diffstat (limited to 'indra/newview/llfilepicker.cpp')
-rw-r--r-- | indra/newview/llfilepicker.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 4897cf1885..0801871409 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -58,6 +58,7 @@ LLFilePicker LLFilePicker::sInstance; #define SLOBJECT_FILTER L"Objects (*.slobject)\0*.slobject\0" #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" #define MODEL_FILTER L"Model files (*.dae)\0*.dae\0" +#define SCRIPT_FILTER L"Script files (*.lsl; *.txt)\0*.lsl;*.txt\0" #endif // @@ -213,6 +214,10 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) mOFN.lpstrFilter = MODEL_FILTER \ L"\0"; break; + case FFLOAD_SCRIPT: + mOFN.lpstrFilter = SCRIPT_FILTER \ + L"\0"; + break; default: res = FALSE; break; @@ -497,6 +502,16 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename) L"Compressed Images (*.j2c)\0*.j2c\0" \ L"\0"; break; + case FFSAVE_SCRIPT: + if (filename.empty()) + { + wcsncpy( mFilesW,L"untitled.lsl", FILENAME_BUFFER_SIZE); + } + mOFN.lpstrDefExt = L"txt"; + mOFN.lpstrFilter = + L"LSL Files (*.lsl; *.txt)\0*.lsl;*.txt\0" + L"\0"; + break; default: return FALSE; } |