mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-31 11:19:18 -05:00
Move gui_file_dialogs to another example
This commit is contained in:
@ -31,9 +31,6 @@
|
||||
|
||||
#undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again
|
||||
|
||||
#define GUI_FILE_DIALOG_IMPLEMENTATION
|
||||
#include "gui_file_dialog.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
@ -91,8 +88,6 @@ int main()
|
||||
|
||||
Vector2 viewScroll = { 0, 0 };
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
GuiFileDialogState fileDialogState = InitGuiFileDialog();
|
||||
|
||||
// Custom GUI font loading
|
||||
//Font font = LoadFontEx("fonts/rainyhearts16.ttf", 12, 0, 0);
|
||||
@ -120,8 +115,6 @@ int main()
|
||||
|
||||
if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_S)) showTextInputBox = true;
|
||||
|
||||
if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_O)) fileDialogState.fileDialogActive = !fileDialogState.fileDialogActive;
|
||||
|
||||
if (IsFileDropped())
|
||||
{
|
||||
int dropsCount = 0;
|
||||
@ -131,11 +124,6 @@ int main()
|
||||
|
||||
ClearDroppedFiles(); // Clear internal buffers
|
||||
}
|
||||
|
||||
if (fileDialogState.SelectFilePressed)
|
||||
{
|
||||
// TODO: Load/Save (state.dirPathText/state.fileNameText);
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
@ -146,7 +134,7 @@ int main()
|
||||
|
||||
// raygui: controls drawing
|
||||
//----------------------------------------------------------------------------------
|
||||
if (dropDown000EditMode || dropDown001EditMode || fileDialogState.fileDialogActive) GuiLock();
|
||||
if (dropDown000EditMode || dropDown001EditMode) GuiLock();
|
||||
//GuiDisable();
|
||||
|
||||
// First GUI column
|
||||
@ -171,7 +159,7 @@ int main()
|
||||
GuiState(GUI_STATE_PRESSED); if (GuiButton((Rectangle){ 30, 390, 115, 30 }, "#15#PRESSED")) { }
|
||||
GuiState(GUI_STATE_DISABLED); if (GuiButton((Rectangle){ 30, 425, 115, 30 }, "DISABLED")) { }
|
||||
GuiState(GUI_STATE_NORMAL);
|
||||
if (!fileDialogState.fileDialogActive) GuiUnlock();
|
||||
GuiUnlock();
|
||||
|
||||
comboBoxActive = GuiComboBox((Rectangle){ 25, 470, 125, 30 }, "ONE;TWO;THREE;FOUR", comboBoxActive);
|
||||
|
||||
@ -233,12 +221,6 @@ int main()
|
||||
}
|
||||
|
||||
GuiUnlock();
|
||||
|
||||
// GUI: About Window
|
||||
//--------------------------------------------------------------------------------
|
||||
GuiFileDialog(&fileDialogState);
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
EndDrawing();
|
||||
|
||||
Reference in New Issue
Block a user