Closed Anut-py closed 5 months ago
@Anut-py Yes, it is. This control was designed to have only one of it on the screen, actually it was a simple replace for native desktop dialogs for systems not supporting them (i.e. embedded devices running raylib in headless mode).
Here it is an usage sample:
// GUI: Save File Dialog (and saving logic)
//----------------------------------------------------------------------------------------
if (showSaveFileDialog)
{
#if defined(CUSTOM_MODAL_DIALOGS)
//int result = GuiFileDialog(DIALOG_TEXTINPUT, "Save raygui icons file...", outFileName, "Ok;Cancel", NULL);
int result = GuiTextInputBox((Rectangle){ screenWidth/2 - 280/2, screenHeight/2 - 112/2 - 30, 280, 112 }, "#2#Save rtool config file...", NULL, "#2#Save", outFileName, 512, NULL);
#else
int result = GuiFileDialog(DIALOG_SAVE_FILE, "Save rtool config file...", outFileName, "*.rtool", "rTool Config (*.rtool)");
#endif
if (result == 1)
{
// Check for valid extension and make sure it is
if ((GetFileExtension(outFileName) == NULL) || !IsFileExtension(outFileName, ".rtool")) strcat(outFileName, ".rtool\0");
SaveToolConfig(rtool, outFileName); // Save rtool config file
}
if (result >= 0) showSaveFileDialog = false;
}
//----------------------------------------------------------------------------------------
It should probably be redesigned/improved.
I'm closing this issue "as design" for now. The control was actually designed to only allow one of them on screen at a time.
Compile and run the following code
Editing one text box affects the other and sometimes they don't edit at all.