You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use existing Chili editors with RmlUi field compatibility layer
Removed separate RmlUi editor hierarchy - not needed!
The field compatibility layer (rmlui_field_compat.lua) makes:
- StringField() → RmlUiStringField when RmlUi active
- NumericField() → RmlUiNumericField when RmlUi active
- etc.
So existing Chili editors (GrassEditor, MetalEditor, LightingEditor, etc.)
automatically work with RmlUi without any code changes:
1. Editor:init() adds fields using StringField(), NumericField(), etc.
2. Field compat layer creates RmlUi fields instead of Chili fields
3. Editor:Finalize() detects SB.view.useRmlUi and calls _FinalizeRmlUi()
4. _FinalizeRmlUi() generates HTML by calling field:GenerateRml()
Changes:
- Removed manual RmlUi editor initialization (RmlUiGrassEditor, etc.)
- Removed rmlui_editor_base.lua and rmlui_components.lua includes
- InitializeAllEditors() creates editors from editorRegistry
- They auto-detect RmlUi mode and generate HTML via field compat layer
This is cleaner and avoids duplicating editor definitions.
0 commit comments