diff options
| author | SushiTee <weichel.sascha@xxx.xx> | 2011-07-12 03:14:46 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-07-15 00:47:52 +0200 |
| commit | d78c0d66e5108f0316f3bcac2a2119aa3a680ff9 (patch) | |
| tree | c5527f5d756bbb0ff6dc901828e49ad9535b204f /src/game/editor/popups.cpp | |
| parent | a3fec2f9f384f82ec631bbfc43bce456b20a2e0e (diff) | |
| download | zcatch-d78c0d66e5108f0316f3bcac2a2119aa3a680ff9.tar.gz zcatch-d78c0d66e5108f0316f3bcac2a2119aa3a680ff9.zip | |
ability to name groups and layers
Diffstat (limited to 'src/game/editor/popups.cpp')
| -rw-r--r-- | src/game/editor/popups.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index 0a691fdf..00c9f043 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -167,6 +167,17 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View) return 1; } + // group name + if(!pEditor->GetSelectedGroup()->m_GameGroup) + { + View.HSplitBottom(5.0f, &View, &Button); + View.HSplitBottom(12.0f, &View, &Button); + static float s_Name = 0; + pEditor->UI()->DoLabel(&Button, "Name:", 10.0f, -1, -1); + Button.VSplitLeft(40.0f, 0, &Button); + pEditor->DoEditBox(&s_Name, &Button, pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_aName, sizeof(pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_aName), 10.0f, &s_Name); + } + enum { PROP_ORDER=0, @@ -243,6 +254,17 @@ int CEditor::PopupLayer(CEditor *pEditor, CUIRect View) return 1; } + // layer name + if(pEditor->m_Map.m_pGameLayer != pEditor->GetSelectedLayer(0)) + { + View.HSplitBottom(5.0f, &View, &Button); + View.HSplitBottom(12.0f, &View, &Button); + static float s_Name = 0; + pEditor->UI()->DoLabel(&Button, "Name:", 10.0f, -1, -1); + Button.VSplitLeft(40.0f, 0, &Button); + pEditor->DoEditBox(&s_Name, &Button, pEditor->GetSelectedLayer(0)->m_aName, sizeof(pEditor->GetSelectedLayer(0)->m_aName), 10.0f, &s_Name); + } + View.HSplitBottom(10.0f, &View, 0); CLayerGroup *pCurrentGroup = pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]; @@ -532,8 +554,8 @@ int CEditor::PopupNewFolder(CEditor *pEditor, CUIRect View) View.HSplitBottom(40.0f, &View, 0); View.VMargin(40.0f, &View); View.HSplitBottom(20.0f, &View, &Label); - static int s_FolderBox = 0; - pEditor->DoEditBox(&s_FolderBox, &Label, pEditor->m_FileDialogNewFolderName, sizeof(pEditor->m_FileDialogNewFolderName), 15.0f); + static float s_FolderBox = 0; + pEditor->DoEditBox(&s_FolderBox, &Label, pEditor->m_FileDialogNewFolderName, sizeof(pEditor->m_FileDialogNewFolderName), 15.0f, &s_FolderBox); View.HSplitBottom(20.0f, &View, &Label); pEditor->UI()->DoLabel(&Label, "Name:", 10.0f, -1); |