Best way to spawn a pop up

Machiavelli24

Mod creator
Joined
May 9, 2012
Messages
818
I have some lua code that I want to be able to create a pop up for the player in certain situations. I just need a window with some text and an "ok" button. I don't need to take any input from the player, they don't need to make any choice.

I could create a new UI context to do this but there should be a generic popup similar to the plotbonus or goodyhut popup I can reuse.
 
Haha, no, please don't look at that. 8) Don't think anyone can learn anything from that mess of a code.

@topic:
ButtonPopupTypes.BUTTONPOPUP_TEXT is a generic text popup that (if I remember correctly) doesn't have any headline or any images attached to it.

If that was part of the question you can trigger it with something like this:
Code:
	UI.AddPopup( { Type = ButtonPopupTypes.BUTTONPOPUP_TEXT, 
	Data1 = 800, 
	Option1 = true, 
	Text = "TXT_KEY_MP_LAST_PLAYER" } );
 
Top Bottom