Exemplo n.º 1
0
        public ConnectGameMenu(SpriteFont font, MenuManager manager)
        {
            mIPLabel     = new ButtonItem(font, "IP: ");
            mIPTextField = new TextInputItem(font, "localhost");
            mIPTextField.Link(() => { ip = false; });

            mPortLabel     = new ButtonItem(font, "Port: ");
            mPortTextField = new TextInputItem(font, "8090", ReadyConnect);

            mItemListV1 = new ItemListSelectable(null, new Vector2(0, 0), ItemListType.Horizontal);
            mItemListV2 = new ItemListSelectable(null, new Vector2(0, 40), ItemListType.Horizontal);

            //mItemList = new ItemListSelectable(null, new Vector2(50, 50), ItemListType.Vertical,
            //    new List<IMenuItem> {
            //        mIPLabel, mIPTextField, mPortLabel, mPortTextField
            //    });
            //mItemList = new ItemListSelectable(null, new Vector2(50, 50), ItemListType.Vertical);
            // mItemList.AddItem(mItemListV1);
            //mItemList.AddItem(mItemListV2);
            mItemListV1.AddItem(mIPLabel);
            mItemListV1.AddItem(mIPTextField);
            mItemListV2.AddItem(mPortLabel);
            mItemListV2.AddItem(mPortTextField);
        }
Exemplo n.º 2
0
 public HostGameMenu(SpriteFont font, MenuManager manager)
 {
     mPortLabel         = new ButtonItem(font, "Port: ");
     mHostPortTextField = new TextInputItem(font, "8090", ReadyHost);
     mHostPortTextField.SetPosition(mPortLabel.GetItemSpan().X + 10, 0);
 }