In Wings Engine’s secondary development, custom public attributes will automatically generate corresponding settings items, while private attributes will not. Private attributes are those starting with #, whereas public attributes include directly defined public attributes and those defined through getter methods. Public attributes can be either directly defined attributes or getter functions.
1 | class ExtensionSample { |
The code above will generate the following settings items:
The generated settings items can be further manually adjusted.
Currently, Wings Engine supports generating various settings items such as component selection, color selection, drop-down boxes, etc. For more details, refer to the API documentation.
When attribute values in the attribute panel are modified, you may want to respond to these changes in your secondary development code in real-time. For this, you need to use the onPropertyChanged method, as shown below:
1 | class ExtensionSample { |
Whenever an attribute value is modified, it will be printed to the debug information.