From f469126e8db8d4523c2869634f87a9b4e740205a Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Thu, 2 Mar 2023 21:13:09 +0100 Subject: [PATCH] Keep featured widget minimzed --- data/cdata/ui_scripts/motd/featured.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/cdata/ui_scripts/motd/featured.lua b/data/cdata/ui_scripts/motd/featured.lua index 53d52a69..94f6abad 100644 --- a/data/cdata/ui_scripts/motd/featured.lua +++ b/data/cdata/ui_scripts/motd/featured.lua @@ -4,6 +4,7 @@ end local animmsfull = 150 local animms = animmsfull / 2 +local minimized = false LUI.onmenuopen("main_campaign", function(menu) if (mods.getloaded() ~= nil or motd.getnumfeaturedtabs() <= 0) then @@ -160,7 +161,6 @@ LUI.onmenuopen("main_campaign", function(menu) local tabcount = motd.getnumfeaturedtabs() headerbutton:setHandleMouse(true) - local minimized = false headerbutton:registerEventHandler("leftmousedown", function() Engine.PlaySound(CoD.SFX.MenuAccept) headerbutton:processEvent({ @@ -185,6 +185,13 @@ LUI.onmenuopen("main_campaign", function(menu) end end) + if (minimized) then + featuredstencil:animateToState("hide") + featuredcontainer:animateToState("hide") + headerbutton:animateToState("right") + arrowcontainer:animateToState("hide") + end + header:addElement(headerbg) header:addElement(headerbutton)