diff options
| author | oy <Tom_Adams@web.de> | 2010-10-06 23:07:35 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-10-06 23:07:35 +0200 |
| commit | 3a98f7a048c044ce0d870320fc0b1def0db4f7fb (patch) | |
| tree | 7dfa1826e537355b37d00e77558ca623a915bac2 /src/game/editor/ed_editor.h | |
| parent | a62a7413d1ff25c8e07657b96a485f001004619a (diff) | |
| download | zcatch-3a98f7a048c044ce0d870320fc0b1def0db4f7fb.tar.gz zcatch-3a98f7a048c044ce0d870320fc0b1def0db4f7fb.zip | |
added mod system. Closes #34
Diffstat (limited to 'src/game/editor/ed_editor.h')
| -rw-r--r-- | src/game/editor/ed_editor.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/game/editor/ed_editor.h b/src/game/editor/ed_editor.h index 30ec7203..225ff4ab 100644 --- a/src/game/editor/ed_editor.h +++ b/src/game/editor/ed_editor.h @@ -459,7 +459,7 @@ public: m_aFileName[0] = 0; - m_FileDialogDirTypes = 0; + m_FileDialogStorageType = 0; m_pFileDialogTitle = 0; m_pFileDialogButtonText = 0; m_pFileDialogUser = 0; @@ -508,7 +508,7 @@ public: virtual void UpdateAndRender(); void FilelistPopulate(); - void InvokeFileDialog(int ListdirType, const char *pTitle, const char *pButtonText, + void InvokeFileDialog(int StorageType, const char *pTitle, const char *pButtonText, const char *pBasepath, const char *pDefaultName, void (*pfnFunc)(const char *pFilename, void *pUser), void *pUser); @@ -531,7 +531,7 @@ public: char m_aFileName[512]; - int m_FileDialogDirTypes; + int m_FileDialogStorageType; const char *m_pFileDialogTitle; const char *m_pFileDialogButtonText; void (*m_pfnFileDialogFunc)(const char *pFileName, void *pUser); @@ -540,7 +540,19 @@ public: char m_aFileDialogPath[512]; char m_aFileDialogCompleteFilename[512]; int m_FilesNum; - sorted_array<string> m_FileList; + + struct CFilelistItem + { + char m_aFilename[128]; + char m_aName[128]; + bool m_IsDir; + int m_StorageType; + + bool operator<(const CFilelistItem &Other) { return !str_comp(m_aFilename, "..") ? true : !str_comp(Other.m_aFilename, "..") ? false : + m_IsDir && !Other.m_IsDir ? true : !m_IsDir && Other.m_IsDir ? false : + str_comp_filenames(m_aFilename, Other.m_aFilename) < 0; } + }; + sorted_array<CFilelistItem> m_FileList; int m_FilesStartAt; int m_FilesCur; int m_FilesStopAt; @@ -643,7 +655,7 @@ public: void RenderMenubar(CUIRect Menubar); void RenderFileDialog(); - void AddFileDialogEntry(const char *pName, CUIRect *pView); + void AddFileDialogEntry(const CFilelistItem *pItem, CUIRect *pView); void SortImages(); }; |