I have been trying to improve the UI part of garnet engine recently. Considering that implementing a complete UI requires a lot of work, you need to find a ready-made open-source library.
Turned on the internet, found the http://www.cegui.org.ui. Strong functions, and is dedicatedProgramAnd has been integrated into ogre. However, this library is too bloated and requires a lot of external dependencies to run, such as FreeType and xerces. It also has weak support for Chinese characters.
I found several lightweight UI libraries on the Internet, such:
Http://guichan.darkbits.org/
Http://www.paragui.org/
Http://www.picogui.org
Without a careful look at their functions, the rough looks are not ideal. If you have time, you can write a UI library by yourself.
If you want to define a standard program interface for the UI and then write different implementations, it is much easier. It also helps to separate the functions and interfaces of the program.
There are currently several alternatives:
1. Define the GUI as a collection of two groups of events:
-A group of events are generated by the GUI based on user input and are responded by the background program;
-Another group of events is generated by the background program and the GUI is responsible for the response;
-The background program and GUI do not know the implementation details of the other party. They can only use these events for interaction;
-These events can also be provided to the other party in the form of "attributes:
-Each attribute consists of the following events:
-For application:
-App_read (...)
-App_write (...)
-On_gui_read (...)
-On_gui_write (...)
-For GUI:
-Gui_read (...)
-Gui_write (...)
-On_app_read (...)
-On_app_write (...)
-The specific GUI format is defined by the script file and transparent to the application, similar to the description file (TBD) of effect)
2. The background program provides a set of functions for GUI calls. Gui provides a set of common functions for creating and customizing user interfaces.
-TBD