Ejemplo n.º 1
0
        void ServerList_Disconnected(string reason)
        {
            var dlg = new List <UIElement>();

            dlg.Add(new UIBackgroundElement(manager)
            {
                FillColor = new Color4(0, 0, 0, 0.25f)
            });
            var ifc = new Infocard();

            ifc.Nodes = new List <InfocardNode>();
            ifc.Nodes.Add(new InfocardTextNode()
            {
                Bold = true, Contents = "Disconnected"
            });
            ifc.Nodes.Add(new InfocardParagraphNode());
            ifc.Nodes.Add(new InfocardTextNode()
            {
                Contents = reason
            });
            dlg.Add(new UIMessageBox(manager, ifc));
            var x = new UIXButton(manager, 0.64f, 0.26f, 2, 2.9f);

            x.Clicked += () =>
            {
                manager.Dialog       = null;
                connectButton.Action = null;
            };
            dlg.Add(x);

            manager.Dialog = dlg;
        }
Ejemplo n.º 2
0
        void ConstructLanInternetDialog()
        {
            var dlg = new List <UIElement>();

            dlg.Add(new UIBackgroundElement(manager)
            {
                FillColor = new Color4(0, 0, 0, 0.25f)
            });
            dlg.Add(new UIMessageBox(manager, LANORINTERNET_INFOCARD));
            var x = new UIXButton(manager, 0.64f, 0.26f, 2, 2.9f);

            x.Clicked += () =>
            {
                manager.Dialog = null;
                manager.PlaySound("ui_motion_swish");
                manager.FlyOutAll(FLYIN_LENGTH, 0.05);
                manager.AnimationComplete += ConstructServerList;
            };
            dlg.Add(x);

            manager.Dialog = dlg;
        }