Over a year ago, we developed our own UI interface tool for editing, previewing, and debugging nsNiuniuSkin. We found it increasingly useful and couldn't resist sharing it!
Today, I have reorganized this tool, improving its functionality. Let me introduce the features and usage of this tool below!
The nsNiuniuSkin interface online design engine is a tool for previewing and debugging nsNiuniuSkin interfaces. Similar to Chrome's developer tools, it allows quick viewing of various interface effects, greatly improving the efficiency of interface configuration. The main features and characteristics are as follows:
After discussing the many benefits, let's take a look at the effects.
We changed the progress of the progress bar from 20% to 40%. The operation and UI changes are as follows:
Various UIs with different zoom levels, as clear as ever:
1x Effect:
1.5x Effect:
2x Effect:
The usage of the nsNiuniuSkin interface online design engine is very simple. Download the engine package, log in, click to open the debugging page, and you can get started.
Open and log in to the design engine.
Follow the on-screen instructions to open the debugging page (http://www.ggniu.com/duidesigner/duidesigner.html).
If the control is loaded successfully, it means we can start interface debugging and previewing normally!
Fill in the UI resource path of nsNiuniuSkin's installation package (there must be an "install.xml" file under the skin directory).
Click "Load UI" to display the UI interface of the installation package. Then, click buttons such as "Install Configuration," "License Agreement," "Installing," "Installation Complete," "Start Uninstall," "Uninstalling," and "Uninstall Complete" to quickly switch between different installation status interfaces.
Click "Show Popup (Confirmation)" and "Show Popup (Inquiry)" buttons to preview the interface of prompt and inquiry windows.
Select different zoom levels on the interface, then click "Load UI" again to display interfaces with different zoom levels.
You can also click the "Process Preview" button, which will sequentially display each installation interface, pausing for about 3 seconds to view each installation interface.
It's that simple! When using this debugger to assist in developing the installation package UI, both efficiency and quality are significantly improved.
The nsNiuniuSkin interface online design engine may seem simple, but we have invested a lot of effort into it. Some of the core technical points are as follows:
Wrapping the debugger's call to nsis plugins.
Usually, we only develop nsis plugins and then integrate them into nsis for use. However, this time, in order to develop this design engine, we took the opposite approach and called the nsNiuniuSkin plugin, allowing us to use the same plugin interface as in nsis. This ensures that the preview effect is the actual effect, and modifying properties on the interface guarantees consistency with the behavior during installation.
Transforming the plugin capabilities of nsNiuniuSkin into Javascript script capabilities on the browser.
We aimed to create an open engine debugging platform. To achieve this, we needed a well-known scripting interface to facilitate the integration of interactive features, such as calling nsNiuniuSkin's interface in Javascript scripts. In this part, our design engine acts as a bridge, fully integrating the interface and callback events of nsis plugins with Javascript, ultimately allowing control of the entire interface's behavior in Javascript.
Handling Duilib's control selection, hover events, and visual representation of control positions and margins.
This is considered the core capability of the entire engine. With minimal code and minimal intrusiveness into Duilib, we can dynamically draw the relative position, size, etc., of the selected control and the currently hovered control. Additionally, the selected control's information is conveyed to Javascript through events, presenting it in the form of a property list on the interface.
We believe this feature has a certain level of innovation. In the future, we can expand this design engine to serve as a general Duilib interface debugger, benefiting all Duilib interface developers.
As mentioned earlier, the current nsNiuniuSkin interface online design engine is similar to the Chrome developer tools. It allows modification of elements' properties on the debugger interface, with real-time viewing of changes. However, these changes do not synchronize with the XML configuration file of the interface, and actual modifications still require editing the XML file. In the future, we plan to:
During the installation package installation process, a visually appealing UI can leave a lasting impression on customers and reflect the software service provider's focus and dedication to user experience! We hope our efforts can make the process of creating installation packages easier and more enjoyable.
May there be no difficult installation packages in the world!