


Doxing (releasing personal information).This is an English speaking community, all non-English posts and comments will be removed.Pictures of real-life things or things from other games that resemble things found in Terraria are subject to moderator discretion It isn't useful, but hopefully this code example is simple enough to show how it works.Subreddit Rules: 1. All that means is you start in the air and die. It provides an option to "skydive" during worldgen. Private void ButtonMouseOut(UIMouseEvent evt, UIElement listeningElement) Private void DeleteMouseOver(UIMouseEvent evt, UIElement listeningElement) Private void PlayMouseOver(UIMouseEvent evt, UIElement listeningElement) Private void CloseButtonClicked(UIMouseEvent evt, UIElement listeningElement) Private void PlayButtonClicked(UIMouseEvent evt, UIElement listeningElement) UIImageButton closeButton = new UIImageButton(buttonDeleteTexture) ĬloseButton.OnClick += new MouseEvent(CloseButtonClicked) ĬloseButton.OnMouseOver += new UIElement.MouseEvent(DeleteMouseOver) ĬloseButton.OnMouseOut += new UIElement.MouseEvent(ButtonMouseOut) Texture2D buttonDeleteTexture = ModLoader.GetTexture("Terraria/UI/ButtonDelete") PlayButton.OnMouseOut += new UIElement.MouseEvent(ButtonMouseOut) PlayButton.OnMouseOver += new UIElement.MouseEvent(PlayMouseOver) PlayButton.OnClick += new MouseEvent(PlayButtonClicked)

UIImageButton playButton = new UIImageButton(buttonPlayTexture) Texture2D buttonPlayTexture = ModLoader.GetTexture("Terraria/UI/ButtonPlay") _buttonLabel = new UIText("", 1f, false) UITextPanel text = new UITextPanel("Would you like to go Sky diving?") Main.spawnTileY = 100 // Do things based on choiceĬontinueWorldGen = false // reset for next world genĬoinCounterPanel.BackgroundColor = new Color(73, 94, 171) Internal static bool continueWorldGen = false Internal class InterruptModWorld : ModWorld Autoload = true, // We need Autoload to be true so our ModWorld class below will be loaded.
