Add open motd button
This commit is contained in:
parent
f469126e8d
commit
cfafd3eafe
@ -1,15 +1,30 @@
|
|||||||
require("LUI.common_menus.MarketingComms")
|
require("LUI.common_menus.MarketingComms")
|
||||||
require("LUI.common_menus.MarketingPopup")
|
require("LUI.common_menus.MarketingPopup")
|
||||||
|
|
||||||
LUI.CustomMarketingPopups = {ShowDepotOnboardingPopupIfPossible = function() end}
|
LUI.CustomMarketingPopups = {ShowDepotOnboardingPopupIfPossible = function() end}
|
||||||
|
|
||||||
|
LUI.MenuBuilder.registerPopupType("motd", function()
|
||||||
|
local data = motd.getmotd()
|
||||||
|
return LUI.MenuBuilder.BuildRegisteredType("motd_main", {
|
||||||
|
popupDataQueue = {data}
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
LUI.onmenuopen("main_campaign", function(menu)
|
LUI.onmenuopen("main_campaign", function(menu)
|
||||||
if (not motd.hasseentoday()) then
|
if (not motd.hasseentoday()) then
|
||||||
motd.sethasseentoday()
|
motd.sethasseentoday()
|
||||||
local data = motd.getmotd()
|
LUI.FlowManager.RequestPopupMenu(nil, "motd")
|
||||||
LUI.FlowManager.RequestPopupMenu( self, "motd_main", true, nil, false, {
|
|
||||||
popupDataQueue = {data}
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
menu:AddHelp({
|
||||||
|
name = "add_button_helper_text",
|
||||||
|
button_ref = "button_alt2",
|
||||||
|
helper_text = Engine.Localize("@MENU_OPEN_MOTD"),
|
||||||
|
side = "right",
|
||||||
|
clickable = true
|
||||||
|
}, function()
|
||||||
|
LUI.FlowManager.RequestPopupMenu(nil, "motd")
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
LUI.common_menus.MarketingPopup.OnPopupAction = function(a1, a2)
|
LUI.common_menus.MarketingPopup.OnPopupAction = function(a1, a2)
|
||||||
|
@ -118,5 +118,6 @@
|
|||||||
"LUA_MENU_SP_LOCATION_TRAINER": "LUA_MENU_SP_LOCATION_TRAINER",
|
"LUA_MENU_SP_LOCATION_TRAINER": "LUA_MENU_SP_LOCATION_TRAINER",
|
||||||
"LUA_MENU_SP_LOCATION_MUSEUM": "LUA_MENU_SP_LOCATION_MUSEUM",
|
"LUA_MENU_SP_LOCATION_MUSEUM": "LUA_MENU_SP_LOCATION_MUSEUM",
|
||||||
|
|
||||||
"DEPOT_GO_TO_THE_DEPOT": "Open link"
|
"DEPOT_GO_TO_THE_DEPOT": "Open link",
|
||||||
|
"MENU_OPEN_MOTD": "Open Message of the Day"
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user