mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fix variable name
This commit is contained in:
parent
4bdddb7e3a
commit
d948a1e41f
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue