fix variable name

This commit is contained in:
Robert Müller 2021-12-03 18:01:37 +01:00
parent 4bdddb7e3a
commit d948a1e41f
3 changed files with 5 additions and 5 deletions

View file

@ -4425,7 +4425,7 @@ void CEditor::RenderFileDialog()
ButtonBar.VSplitLeft(70.0f, &Button, &ButtonBar); ButtonBar.VSplitLeft(70.0f, &Button, &ButtonBar);
if(DoButton_Editor(&s_NewFolderButton, "New folder", 0, &Button, 0, 0)) if(DoButton_Editor(&s_NewFolderButton, "New folder", 0, &Button, 0, 0))
{ {
m_FileDialogNewFolderName[0] = 0; m_aFileDialogNewFolderName[0] = 0;
m_FileDialogErrString[0] = 0; m_FileDialogErrString[0] = 0;
static int s_NewFolderPopupID = 0; static int s_NewFolderPopupID = 0;
UiInvokePopupMenu(&s_NewFolderPopupID, 0, Width / 2.0f - 200.0f, Height / 2.0f - 100.0f, 400.0f, 200.0f, PopupNewFolder); UiInvokePopupMenu(&s_NewFolderPopupID, 0, Width / 2.0f - 200.0f, Height / 2.0f - 100.0f, 400.0f, 200.0f, PopupNewFolder);

View file

@ -868,7 +868,7 @@ public:
int m_FileDialogFileType; int m_FileDialogFileType;
float m_FileDialogScrollValue; float m_FileDialogScrollValue;
int m_FilesSelectedIndex; int m_FilesSelectedIndex;
char m_FileDialogNewFolderName[64]; char m_aFileDialogNewFolderName[64];
char m_FileDialogErrString[64]; char m_FileDialogErrString[64];
IGraphics::CTextureHandle m_FilePreviewImage; IGraphics::CTextureHandle m_FilePreviewImage;
bool m_PreviewImageIsLoaded; bool m_PreviewImageIsLoaded;

View file

@ -987,7 +987,7 @@ int CEditor::PopupNewFolder(CEditor *pEditor, CUIRect View, void *pContext)
View.VMargin(40.0f, &View); View.VMargin(40.0f, &View);
View.HSplitBottom(20.0f, &View, &Label); View.HSplitBottom(20.0f, &View, &Label);
static float s_FolderBox = 0; static float s_FolderBox = 0;
pEditor->DoEditBox(&s_FolderBox, &Label, pEditor->m_FileDialogNewFolderName, sizeof(pEditor->m_FileDialogNewFolderName), 15.0f, &s_FolderBox); pEditor->DoEditBox(&s_FolderBox, &Label, pEditor->m_aFileDialogNewFolderName, sizeof(pEditor->m_aFileDialogNewFolderName), 15.0f, &s_FolderBox);
View.HSplitBottom(20.0f, &View, &Label); View.HSplitBottom(20.0f, &View, &Label);
pEditor->UI()->DoLabel(&Label, "Name:", 10.0f, -1); pEditor->UI()->DoLabel(&Label, "Name:", 10.0f, -1);
@ -998,10 +998,10 @@ int CEditor::PopupNewFolder(CEditor *pEditor, CUIRect View, void *pContext)
if(pEditor->DoButton_Editor(&s_CreateButton, "Create", 0, &Label, 0, 0) || pEditor->Input()->KeyPress(KEY_RETURN) || pEditor->Input()->KeyPress(KEY_KP_ENTER)) if(pEditor->DoButton_Editor(&s_CreateButton, "Create", 0, &Label, 0, 0) || pEditor->Input()->KeyPress(KEY_RETURN) || pEditor->Input()->KeyPress(KEY_KP_ENTER))
{ {
// create the folder // create the folder
if(*pEditor->m_FileDialogNewFolderName) if(pEditor->m_aFileDialogNewFolderName[0])
{ {
char aBuf[512]; char aBuf[512];
str_format(aBuf, sizeof(aBuf), "%s/%s", pEditor->m_pFileDialogPath, pEditor->m_FileDialogNewFolderName); str_format(aBuf, sizeof(aBuf), "%s/%s", pEditor->m_pFileDialogPath, pEditor->m_aFileDialogNewFolderName);
if(pEditor->Storage()->CreateFolder(aBuf, IStorage::TYPE_SAVE)) if(pEditor->Storage()->CreateFolder(aBuf, IStorage::TYPE_SAVE))
{ {
pEditor->FilelistPopulate(IStorage::TYPE_SAVE); pEditor->FilelistPopulate(IStorage::TYPE_SAVE);