Commit 36d9a1a
committed
Use existing MainWindowPanel for both Chili and RmlUi modes
Instead of creating parallel initialization systems, reuse what exists.
Changes:
1. MainWindowPanel:AddElement() now detects RmlUi mode
- In RmlUi: skips Chili button creation, uses SB.delay for editors
- In Chili: creates buttons and editors as before
2. View:InitializeRmlUi() now creates TabbedWindow (like Chili does)
- TabbedWindow creates MainWindowPanels
- MainWindowPanel:AddElements() populates from editorRegistry
- Editor creation happens via existing SB.delay mechanism
3. Removed custom PreCreateAllEditors() - not needed
This unifies the editor initialization path for both UI systems.
Both modes now use the same TabbedWindow/MainWindowPanel infrastructure,
with MainWindowPanel detecting the mode and adapting behavior.1 parent e73dbfe commit 36d9a1a
2 files changed
+17
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 86 | | |
101 | 87 | | |
102 | 88 | | |
| |||
360 | 346 | | |
361 | 347 | | |
362 | 348 | | |
363 | | - | |
| 349 | + | |
364 | 350 | | |
365 | 351 | | |
366 | 352 | | |
| |||
0 commit comments