16
SFML projects / cpGUI - A new object oriented GUI toolkit based on SFML 1.5
« on: September 28, 2009, 05:42:28 pm »
**Major Update**
I have just released cpGUI version 1.5.5b on the wiki. This update adds a few things that people in this thread have asked for.
First, I have added the functions SetMouseoverColor() and GetMouseoverColor(). These functions allow you to customize the "hot" color that the object changes to when the user mouses over the object.
Secondly, I have added the ability to only include the objects that you want to use for your project to cut down on bloat. I have separated most of the object classes into their own header and cpp files so that you can include only the ones you want. There are cpGUI_base.h and cpGUI_base.cpp files that must be included as a requirement. These files include the classes for cpGuiContainer, cpObject, cpButton, and cpScrollBar. This is necessary because other objects depend on these. cpSelectionBox and cpDropDownBox classes are both in the cpSelection-DropDownBox.h and cpSelection-DropDownBox.cpp files because the drop down box depends on the selection box. Other than that, each of the other objects have their own files. There is now a cpGUI-example-partial.cpp file to demonstrate how to do things this way.
Of course, you can still choose to do things the old way and include all of the classes in the original cpGUI.h and cpGUI.cpp files. If you choose to do it this way, you don't need to include any of the new files. The download still includes the cpGUI-example.cpp file to demonstrate how to do things this way. The new features and bug fixes are incorporated into these files, also.
Lastly, I fixed a selection box bug pointed out by nacsasoft. This bug caused a runtime error when you dynamically RemoveLastChoice() when the user makes a certain selection and the scroll bar is all the way down. This bug is now fixed along with some much needed error catching in the RemoveLastChoice() function.
Enjoy!
I have just released cpGUI version 1.5.5b on the wiki. This update adds a few things that people in this thread have asked for.
First, I have added the functions SetMouseoverColor() and GetMouseoverColor(). These functions allow you to customize the "hot" color that the object changes to when the user mouses over the object.
Secondly, I have added the ability to only include the objects that you want to use for your project to cut down on bloat. I have separated most of the object classes into their own header and cpp files so that you can include only the ones you want. There are cpGUI_base.h and cpGUI_base.cpp files that must be included as a requirement. These files include the classes for cpGuiContainer, cpObject, cpButton, and cpScrollBar. This is necessary because other objects depend on these. cpSelectionBox and cpDropDownBox classes are both in the cpSelection-DropDownBox.h and cpSelection-DropDownBox.cpp files because the drop down box depends on the selection box. Other than that, each of the other objects have their own files. There is now a cpGUI-example-partial.cpp file to demonstrate how to do things this way.
Of course, you can still choose to do things the old way and include all of the classes in the original cpGUI.h and cpGUI.cpp files. If you choose to do it this way, you don't need to include any of the new files. The download still includes the cpGUI-example.cpp file to demonstrate how to do things this way. The new features and bug fixes are incorporated into these files, also.
Lastly, I fixed a selection box bug pointed out by nacsasoft. This bug caused a runtime error when you dynamically RemoveLastChoice() when the user makes a certain selection and the scroll bar is all the way down. This bug is now fixed along with some much needed error catching in the RemoveLastChoice() function.
Enjoy!