diff options
| author | oy <Tom_Adams@web.de> | 2012-01-08 13:14:02 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2012-01-08 13:14:02 +0100 |
| commit | bafd22ebe7e249e05ba4b64266196935abcc5c66 (patch) | |
| tree | 76a94ab37620bb2f09db3da6645224f737705111 /src/game | |
| parent | be37147342ff9032f0557d732abfc6cfd2c77efe (diff) | |
| download | zcatch-bafd22ebe7e249e05ba4b64266196935abcc5c66.tar.gz zcatch-bafd22ebe7e249e05ba4b64266196935abcc5c66.zip | |
show path in the editor file dialog. Closes #786
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/editor/editor.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 6b0a401c..a5a9392a 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -2781,11 +2781,13 @@ void CEditor::RenderFileDialog() RenderTools()->DrawUIRect(&View, vec4(0,0,0,0.75f), CUI::CORNER_ALL, 5.0f); View.Margin(10.0f, &View); - CUIRect Title, FileBox, FileBoxLabel, ButtonBar, Scroll; + CUIRect Title, FileBox, FileBoxLabel, ButtonBar, Scroll, PathBox; View.HSplitTop(18.0f, &Title, &View); View.HSplitTop(5.0f, 0, &View); // some spacing View.HSplitBottom(14.0f, &View, &ButtonBar); View.HSplitBottom(10.0f, &View, 0); // some spacing + View.HSplitBottom(14.0f, &View, &PathBox); + View.HSplitBottom(5.0f, &View, 0); // some spacing View.HSplitBottom(14.0f, &View, &FileBox); FileBox.VSplitLeft(55.0f, &FileBoxLabel, &FileBox); View.HSplitBottom(10.0f, &View, 0); // some spacing @@ -2796,6 +2798,15 @@ void CEditor::RenderFileDialog() Title.VMargin(10.0f, &Title); UI()->DoLabel(&Title, m_pFileDialogTitle, 12.0f, -1, -1); + // pathbox + char aPath[128], aBuf[128]; + if(m_FilesSelectedIndex != -1) + Storage()->GetCompletePath(m_FileList[m_FilesSelectedIndex].m_StorageType, m_pFileDialogPath, aPath, sizeof(aPath)); + else + aPath[0] = 0; + str_format(aBuf, sizeof(aBuf), "Current path: %s", aPath); + UI()->DoLabel(&PathBox, aBuf, 10.0f, -1, -1); + // filebox if(m_FileDialogStorageType == IStorage::TYPE_SAVE) { |