tModLoader How to create a list of options?

Hello, I am creating a mod for which the User may choose the areas where he will teleport ... I would list the options on the screen and relate each option to its proper teleportation
code below
Code:
public override void RightClick(int i, int j)
                {


                                //Codigo de Teleporte

                    Player jogador = Main.player[Main.myPlayer];

                    int x = (int)(jogador.position.X);
                    int y = (int)(jogador.position.Y);

                    x = x + (40 * 16);

                    string posicao_x = x.ToString();

                    Tile piso = Main.tile[i, j];
                    jogador.position = new Vector2(x,y);
                    Main.NewText("Teleportou..!", 255, 240, 20, false);
                    Main.NewText(posicao_x, 255, 240, 20, false);
                   

                }
 
Ty for help ...
[doublepost=1477362206,1477362006][/doublepost]
Code:
public class teleportador : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Teleportador";
            item.width = 20;
            item.height = 20;
            item.useStyle = 2;
            item.maxStack = 1;
            item.useAnimation = 17;
            item.useTime = 1;
            item.consumable = false;
            AddTooltip("This is a modded item.");
            item.value = 1;
            item.rare = 4;
        }


        public override bool UseItem(Player player)
        {
            int x = 30; // coordenada x de teleporte
            int y = 30; // coordenada y de teleporte

            string posicao_x = x.ToString();// converte variavel x para o formato de texto
            string posicao_y = y.ToString();// converte variavel y para o formato de texto
            Player jogador = Main.player[Main.myPlayer];//atributos do jogador

                   
            jogador.position = new Vector2(x,y);//Faz o jogar ir a opção desejada
            Main.NewText("Teleportou..!", 255, 240, 20, false);
            Main.NewText(posicao_x, 255, 240, 20, false);// Texto com posicao x
            Main.NewText(posicao_y, 255, 240, 20, false);// Texto com posicao y

            return true;

        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 1);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();   

        }
    }
 
Back
Top Bottom