5. Gui
El's Gui references cegui.
The author has been using cegui for some time. Here I will discuss cegui and hope to help you.
Cegui is often criticized for its inefficiency, but its overall UI system design is brilliant. Fortunately, after a project is simply optimized, its efficiency can basically meet the application requirements. There are some articles on how to optimize cegui on the Internet, which will not be listed here. Another mygui is recommended. It is said to be a simplified version of cegui. You can try it.
Currently, the most advanced application of cegui in online games is an editable mix of text and text. It is similar to the control of the World of Warcraft chat box. This control allows players to attach Device Links and images, and responds to player mouse selection links or images.
The biggest challenge to the cegui architecture in the text-and-text layout is the ChAT Expression. Because chat emoticons require that each frame of the control be refreshed, the single rendering queue designed by cegui determines a change in the unit of the queue, all units need to re-fill the queue, so refreshing a single control will cause the entire system to refresh. If the UI contains a large number of characters, frame-by-frame refresh of a single control may lead to system exponential frame drop.
To solve the above problems, you must improve the GUI architecture, add additional parameters to the units in the cegui rendering queue, or change the texture corresponding to the chat expression at the underlying layer frame by frame. If you are interested, you can try to add text-and-text mixed control and chat expressions to the cegui.
The El GUI text section adopts the window GDI TrueType rendering method, and the Application Section only implements some simple controls.
Figure 5.1 Gui