From 384e3baf0c7527e05c33eb69387b1716c1d0ea42 Mon Sep 17 00:00:00 2001 From: Pxtl Date: Fri, 26 Feb 2021 01:48:39 -0500 Subject: [PATCH] allow custom widget options icon --- LuaUI/Widgets/gui_epicmenu.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LuaUI/Widgets/gui_epicmenu.lua b/LuaUI/Widgets/gui_epicmenu.lua index fe0df86b6b..68639758d5 100644 --- a/LuaUI/Widgets/gui_epicmenu.lua +++ b/LuaUI/Widgets/gui_epicmenu.lua @@ -1285,7 +1285,11 @@ local function IntegrateWidget(w, addoptions, index) local wname = w.whInfo.name local defaultpath = w.options_path or ('Settings/Misc/' .. wname) - + + -- add the widget's icon to the subMenuIcons table if there isn't one in that spot already + if w.whInfo.icon and not confdata.subMenuIcons[defaultpath] then + confdata.subMenuIcons[defaultpath] = w.whInfo.icon + end --[[ --If a widget disables itself in widget:Initialize it will run the removewidget before the insertwidget is complete. this fix doesn't work