Problem with Popup window

manolek

Chieftain
Joined
Jul 27, 2011
Messages
6
I am a beginner modder and I can't resolve how to close a popup window, code is as follows:

Spoiler :
if (Game.GetGameTurnYear() >= 1492) then
local popupInfo = {
Data1 = 500,
Type = ButtonPopupTypes.BUTTONPOPUP_TEXT,
}
popupInfo.Text = Locale.ConvertTextKey("TXT_KEY_VICTORIA_SPAIN_TEXT");
UI.AddPopup(popupInfo);
player:ChangeGold(5000);


Everything works perfectly and even the player receives 5000 gold but I can not close the window, do not know if I need a function onback() but not how to do.
Would greatly appreciate your help.
 
SOLVED

Had ShowHideHandler function () duplicate in the file, just coment it and it works
 
Back
Top Bottom