diff options
| author | SushiTee <weichel.sascha@xxx.xx> | 2011-07-12 23:31:39 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2012-01-10 23:14:24 +0100 |
| commit | 65f4416164eb592efdcb56140f095944b485f8b6 (patch) | |
| tree | 0e021a28f548cbeccc34a0f79d15ec16b3391c13 /src/game/editor/editor.cpp | |
| parent | fa81141110ad46fc65860091c065bb932916fef4 (diff) | |
| download | zcatch-65f4416164eb592efdcb56140f095944b485f8b6.tar.gz zcatch-65f4416164eb592efdcb56140f095944b485f8b6.zip | |
added map info
Diffstat (limited to 'src/game/editor/editor.cpp')
| -rw-r--r-- | src/game/editor/editor.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 792c735a..fa1024e0 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -214,7 +214,6 @@ void CEditor::EnvelopeEval(float TimeOffset, int Env, float *pChannels, void *pU // copied from gc_menu.cpp, should be more generalized //extern int ui_do_edit_box(void *id, const CUIRect *rect, char *str, int str_size, float font_size, bool hidden=false); - int CEditor::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrSize, float FontSize, float *Offset, bool Hidden, int Corners) { int Inside = UI()->MouseInside(pRect); @@ -2904,6 +2903,7 @@ void CEditor::RenderFileDialog() static int s_OkButton = 0; static int s_CancelButton = 0; static int s_NewFolderButton = 0; + static int s_MapInfoButton = 0; CUIRect Button; ButtonBar.VSplitRight(50.0f, &ButtonBar, &Button); @@ -2979,6 +2979,22 @@ void CEditor::RenderFileDialog() UI()->SetActiveItem(0); } } + + if(m_FileDialogStorageType == IStorage::TYPE_SAVE) + { + ButtonBar.VSplitLeft(40.0f, 0, &ButtonBar); + ButtonBar.VSplitLeft(70.0f, &Button, &ButtonBar); + if(DoButton_Editor(&s_MapInfoButton, "Map details", 0, &Button, 0, 0)) + { + str_copy(m_Map.m_MapInfo.m_aAuthorTmp, m_Map.m_MapInfo.m_aAuthor, sizeof(m_Map.m_MapInfo.m_aAuthorTmp)); + str_copy(m_Map.m_MapInfo.m_aVersionTmp, m_Map.m_MapInfo.m_aVersion, sizeof(m_Map.m_MapInfo.m_aVersionTmp)); + str_copy(m_Map.m_MapInfo.m_aCreditsTmp, m_Map.m_MapInfo.m_aCredits, sizeof(m_Map.m_MapInfo.m_aCreditsTmp)); + str_copy(m_Map.m_MapInfo.m_aLicenseTmp, m_Map.m_MapInfo.m_aLicense, sizeof(m_Map.m_MapInfo.m_aLicenseTmp)); + static int s_MapInfoPopupID = 0; + UiInvokePopupMenu(&s_MapInfoPopupID, 0, Width/2.0f-200.0f, Height/2.0f-100.0f, 400.0f, 200.0f, PopupMapInfo); + UI()->SetActiveItem(0); + } + } } void CEditor::FilelistPopulate(int StorageType) @@ -3889,6 +3905,8 @@ void CEditorMap::Clean() m_lEnvelopes.delete_all(); m_lImages.delete_all(); + m_MapInfo.Reset(); + m_pGameLayer = 0x0; m_pGameGroup = 0x0; |