Skip to content

Commit 469af98

Browse files
committed
Convert remaining editors to use ActionButton
- object_defs_view.lua: 2 buttons (Brush, Add) - areas_window.lua: 1 button (Add area) - triggers_window.lua: 1 button (Add trigger) - variables_window.lua: 1 button (Add variable) - array_field.lua: 1 button (Add item) - dnts_editor.lua: 1 button (DNTS) Fixes crashes when these editors initialize in RmlUi mode. All editors now use ActionButton wrapper instead of direct TabbedPanelButton, enabling proper icon display in both modes.
1 parent d6c3271 commit 469af98

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

scen_edit/view/fields/array_field.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function ArrayFieldWindow:init(opts)
131131
self.OnUpdateItem = opts.OnUpdateItem
132132

133133
if self.field.canAdd then
134-
self.btnAddItem = TabbedPanelButton({
134+
self.btnAddItem = ActionButton({
135135
x = 0,
136136
y = 0,
137137
tooltip = "Add",

scen_edit/view/map/dnts_editor.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function DNTSEditor:init()
7575
},
7676
})
7777

78-
self.btnDNTS = TabbedPanelButton({
78+
self.btnDNTS = ActionButton({
7979
x = 140,
8080
y = 0,
8181
tooltip = "DNTS textures",

scen_edit/view/object/object_defs_view.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ObjectDefsView = Editor:extends{}
55
function ObjectDefsView:init()
66
self:super("init")
77

8-
self.btnBrush = TabbedPanelButton({
8+
self.btnBrush = ActionButton({
99
x = 0,
1010
y = 0,
1111
tooltip = "Add or remove objects by painting the map",
@@ -20,7 +20,7 @@ function ObjectDefsView:init()
2020
end
2121
},
2222
})
23-
self.btnSet = TabbedPanelButton({
23+
self.btnSet = ActionButton({
2424
x = 70,
2525
y = 0,
2626
tooltip = "Add objects by clicking on the map",

scen_edit/view/trigger/areas_window.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ AreasWindow:Register({
1414
function AreasWindow:init()
1515
self:super("init")
1616

17-
self.btnAddArea = TabbedPanelButton({
17+
self.btnAddArea = ActionButton({
1818
x = 0,
1919
y = 0,
2020
tooltip = "Add area",

scen_edit/view/trigger/triggers_window.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TriggersWindow:Register({
1313
function TriggersWindow:init()
1414
self:super("init")
1515

16-
self.btnAddTrigger = TabbedPanelButton({
16+
self.btnAddTrigger = ActionButton({
1717
x = 0,
1818
y = 0,
1919
tooltip = "Add trigger",

scen_edit/view/trigger/variables_window.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ VariablesWindow:Register({
1313
function VariablesWindow:init()
1414
self:super("init")
1515

16-
self.btnAddVariable = TabbedPanelButton({
16+
self.btnAddVariable = ActionButton({
1717
x = 0,
1818
y = 0,
1919
tooltip = "Add variable",

0 commit comments

Comments
 (0)