Example #1
0
 void InitButtons()
 {
     LoginButton = InstantiateChild <LMS_GuiBaseButton>(new LMS_GuiConfig
     {
         Rect = new Rect(150f, 165f, 370f, 190f),
     }, 1);
     InitButtonDefault(LoginButton, null, null, () =>
     {
         if (ErrorLabel.Config.Text != "")
         {
             LMS_Main.Instance.ShowPopup(1, LMS_GuiBaseLabelBoundaries.WrapText(ErrorLabel.Config.Text, 14, 250f), "Authentication", Color.red);
             return;
         }
         LMS_Main.Instance.ShowPopup(1, "Authentication in progress", "Authentication", Color.gray);
         LMS_Main.Instance.DarkMessageBoxPopup.ShowBackButton(false);
         LMS_TaskManager.RunTaskLater(3, () => { LMS_Main.Instance.DarkMessageBoxPopup.HidePopup(); LMS_SessionServerPeer.Instance.Authenticate(UsernameTextField.Text, PasswordTextField.Text); }, this);
     });
     LoginButton.AllowInput = true;
     DiscordButton          = InstantiateChild <LMS_GuiBaseButton>(new LMS_GuiConfig
     {
         Rect = new Rect(10f, 185f, 340f, 250f),
     }, 1);
     InitButtonDefault(DiscordButton, null, null, () => { LMS_Main.Instance.ShowPopup(0, "Would you like to join\nour discord server?", "Discord Server", Color.blue, (res, popup) => { if (res == E_PopupCallback.YES)
                                                                                                                                                                                        {
                                                                                                                                                                                            Application.OpenURL(LMS_Meta.getMetaValue("DISCORD_URL"));
                                                                                                                                                                                        }
                                                                                      }); });
     DiscordButton.AllowInput = true;
 }
Example #2
0
 void Awake()
 {
     LMS_TaskManager.RunTaskLater(3, () =>
     {
         foreach (LMS_GuiScreen s in GetComponents <LMS_GuiScreen>())
         {
             s.HideScreen();
             foreach (string str in Screens)
             {
                 if (str == s.ScreenName())
                 {
                     s.ShowScreen();
                     break;
                 }
             }
         }
     }, this);
 }
 public LMS_Txt()
 {
     LMS_TaskManager.RunTaskLater(2, () => { TxtBuffer.Push(recTxt, this); }, LMS_MainThread.Instance);
 }