Palette panel collision

- Preview control now hides if is colliding with the palette panel
This commit is contained in:
Ray
2018-05-28 13:50:20 +02:00
parent 9717a11942
commit 4b1d00109c

View File

@ -8,8 +8,8 @@
* *
* CONTRIBUTORS: * CONTRIBUTORS:
* Ramon Santamaria: Supervision, review, design, update and maintenance... * Ramon Santamaria: Supervision, review, design, update and maintenance...
* Adria Arranz: Design and implementation v1.0 (2018) * Adria Arranz: Design and implementation (2018)
* Jordi Jorba: Design and implementation v1.0 (2018) * Jordi Jorba: Design and implementation (2018)
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
@ -163,7 +163,7 @@ int main()
// Initialization // Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
SetConfigFlags(FLAG_WINDOW_RESIZABLE); SetConfigFlags(FLAG_WINDOW_RESIZABLE);
InitWindow(screenWidth, screenHeight, "rGuiLayout v1.0"); InitWindow(screenWidth, screenHeight, "rGuiLayout v1.1");
SetExitKey(0); SetExitKey(0);
// General app variables // General app variables
@ -1156,7 +1156,7 @@ int main()
selectedControl = -1; selectedControl = -1;
LoadLayoutRGL(droppedFileName); LoadLayoutRGL(droppedFileName);
strcpy(loadedFileName, droppedFileName); strcpy(loadedFileName, droppedFileName);
SetWindowTitle(FormatText("rGuiLayout v1.0 - %s", GetFileName(loadedFileName))); SetWindowTitle(FormatText("rGuiLayout v1.1 - %s", GetFileName(loadedFileName)));
} }
else if (IsFileExtension(droppedFileName, ".rgs")) GuiLoadStyle(droppedFileName); else if (IsFileExtension(droppedFileName, ".rgs")) GuiLoadStyle(droppedFileName);
else if (IsFileExtension(droppedFileName, ".png")) else if (IsFileExtension(droppedFileName, ".png"))
@ -1353,7 +1353,7 @@ int main()
layout.anchors[i].hidding = false; layout.anchors[i].hidding = false;
} }
SetWindowTitle("rGuiLayout v1.0"); SetWindowTitle("rGuiLayout v1.1");
strcpy(loadedFileName, "\0"); strcpy(loadedFileName, "\0");
layout.controlsCount = 0; layout.controlsCount = 0;
resetWindowActive = false; resetWindowActive = false;
@ -1428,7 +1428,7 @@ int main()
} }
// Draws the defaultRec[selectedType] of the control selected // Draws the defaultRec[selectedType] of the control selected
if ((selectedControl == -1) && (focusedControl == -1 )&& !anchorMode && !tracemapEditMode && !closingWindowActive && !generateWindowActive) if ((selectedControl == -1) && (focusedControl == -1 )&& !anchorMode && !tracemapEditMode && !closingWindowActive && !generateWindowActive && !(CheckCollisionPointRec(mouse, palettePanel)))
{ {
GuiFade(0.5f); GuiFade(0.5f);
switch (selectedTypeDraw) switch (selectedTypeDraw)
@ -1768,7 +1768,7 @@ static void ShowSaveLayoutDialog(void)
if (GetExtension(fileName) == NULL) strcat(outFileName, ".rgl\0"); // No extension provided if (GetExtension(fileName) == NULL) strcat(outFileName, ".rgl\0"); // No extension provided
SaveLayoutRGL(outFileName, false); SaveLayoutRGL(outFileName, false);
strcpy(loadedFileName, outFileName); strcpy(loadedFileName, outFileName);
SetWindowTitle(FormatText("rGuiLayout v1.0 - %s", GetFileName(loadedFileName))); SetWindowTitle(FormatText("rGuiLayout v1.1 - %s", GetFileName(loadedFileName)));
cancelSave = true; cancelSave = true;
} }
} }