Help hiding my UI help menu

Bingles

Chieftain
Joined
Jan 7, 2014
Messages
71
Location
Sunny Florida
I wrote up a help menu for my mod using Whoward's guide and everything is working perfectly. Except for one thing: The help menu pops up when I start a new game. I do not want this to happen. Surely the fix is an easy one but right now I feel a little burnt out. Any suggestions on the couple of lines that need editing to fix this will be greatly appreciated.

Code:
function OnOK()
ContextPtr:SetHide(true)
end
Controls.OK:RegisterCallback(Mouse.eLClick, OnOK)

function OnDiploCornerPopup()
ContextPtr:SetHide(false)
end

function OnAdditionalInformationDropdownGatherEntries(additionalEntries)
  table.insert(additionalEntries, {
    text=Locale.ConvertTextKey("TXT_KEY_LEADER_TRAITS_TITLE"), 
    call=OnDiploCornerPopup
  })
end
LuaEvents.AdditionalInformationDropdownGatherEntries.Add(OnAdditionalInformationDropdownGatherEntries)
LuaEvents.RequestRefreshAdditionalInformationDropdownEntries()

Thanks in advance!
 
Wow. Turns out I just had to put a ContextPtr:SetHide(true) line at the beginning outside of a function. I love it when I get tired of reading tutorials and just try something at random, only to have it work on the first try.
 
Back
Top Bottom