Exemplo n.º 1
0
    // GUIVIEW INTERFACE

    protected override void OnViewShow()
    {
        base.OnViewShow();

        GuiBaseUtils.RegisterButtonDelegate(Layout,
                                            "Close_Button",
                                            () =>
        {
            Owner.Back();
            SendResult(E_PopupResultCode.Cancel);
        },
                                            null);
    }
Exemplo n.º 2
0
        public PreyNightmare(GUIBase_Widget root)
        {
            m_Root            = root;
            m_NicknameLabel   = GuiBaseUtils.GetChild <GUIBase_Label>(root, "Name");
            m_KilledByMeLabel = GuiBaseUtils.GetChild <GUIBase_Label>(root, "KilledByMe");
            m_KilledMeLabel   = GuiBaseUtils.GetChild <GUIBase_Label>(root, "KilledMe");
            m_RankLabel       = GuiBaseUtils.GetChild <GUIBase_Label>(root, "RankNum");
            m_RankIcon        = GuiBaseUtils.GetChild <GUIBase_MultiSprite>(root, "RankPic");
            m_FriendIcon      = GuiBaseUtils.GetChild <GUIBase_Widget>(root, "FriendIcon");

            m_KilledByMeLabel.SetNewText("0");
            m_KilledMeLabel.SetNewText("0");
        }
Exemplo n.º 3
0
    //--------------------------------------------------------------------------------------------------
    //--------------------------------------------------------------------------------------------------
    // IGuiPageOptionsDisplay methods
    //--------------------------------------------------------------------------------------------------
    //--------------------------------------------------------------------------------------------------

    public void OnInit(GUIBase_Layout layout)
    {
        m_GraphicEnum      = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, GRAPHDETAILS_ENUM);
        m_AutoDetectButton = GuiBaseUtils.GetControl <GUIBase_Button>(layout, DETECTGRAPHIC_BUTTON);
        m_ShowHintsSwitch  = GuiBaseUtils.GetControl <GUIBase_Switch>(layout, SHOWHINTS_SWITCH);
        m_HintLabel        = GuiBaseUtils.GetControl <GUIBase_Label>(layout, HINT_LABEL);
        m_LanguageEnum     = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, LANGUAGE_ENUM);

        if (m_OriginalGraphicValue < 0)
        {
            m_OriginalGraphicValue = GuiOptions.graphicDetail;
        }
    }
Exemplo n.º 4
0
    protected override void OnViewHide()
    {
        RegisterRollerDelegate(REGION_ROLLER, null);
        GuiBaseUtils.RegisterSwitchDelegate(Layout, NEWS_SWITCH, null);
        PrepareButton(PASSWORD2_BUTTON, null, null);
        PrepareButton(PASSWORD1_BUTTON, null, null);
        PrepareButton(NICKNAME_BUTTON, null, null);
        PrepareButton(CONFIRM_BUTTON, null, null);
        PrepareButton(CLOSE_BUTTON, null, null);
        PrepareButton(MIGRATE_BUTTON, null, null);

        base.OnViewHide();
    }
Exemplo n.º 5
0
    protected override void OnViewInit()
    {
        //Debug.Log("Customise init");

        if (!GuiOptions.customControlsInitialised)
        {
            GuiHUD.StoreControlsPositions();
        }

        m_Controls.Add(new CustomControl()
        {
            m_Name = "FireDummy", m_OptionsPos = GuiOptions.FireUseButton
        });
        m_Controls.Add(new CustomControl()
        {
            m_Name = "ReloadDummy", m_OptionsPos = GuiOptions.ReloadButton
        });
        m_Controls.Add(new CustomControl()
        {
            m_Name = "RollDummy", m_OptionsPos = GuiOptions.RollButton
        });
        m_Controls.Add(new CustomControl()
        {
            m_Name = moveDummyName, m_OptionsPos = GuiOptions.MoveStick
        });
        m_Controls.Add(new CustomControl()
        {
            m_Name = "WeaponsDummy", m_OptionsPos = GuiOptions.WeaponButton
        });
        //m_Controls.Add(new CustomControl(){m_Name = "PauseDummy", m_OptionsPos = GuiOptions.PauseButton});
        m_Controls.Add(new CustomControl()
        {
            m_Name = "SprintDummy", m_OptionsPos = GuiOptions.SprintButton
        });

        for (int i = 0; i < GuiOptions.GadgetButtons.Length; i++)
        {
            m_Controls.Add(new CustomControl()
            {
                m_Name = gadgetDummnyName + (i + 1), m_OptionsPos = GuiOptions.GadgetButtons[i]
            });
        }

        //init all sprites
        foreach (CustomControl c in m_Controls)
        {
            GUIBase_Sprite sprite = GuiBaseUtils.PrepareSprite(m_ScreenLayout, c.m_Name);
            c.m_WidgetDummy = sprite.Widget;
            c.m_Transform   = c.m_WidgetDummy.transform;
        }
    }
Exemplo n.º 6
0
    // GUIOVERLAY INTERFACE

    protected override void OnViewInit()
    {
        m_Label       = GuiBaseUtils.FindLayoutWidget <GUIBase_Label>(Layout, "GUIBase_Label");
        m_VersionInfo = GuiBaseUtils.FindLayoutWidget <GUIBase_Label>(Layout, "Version_Label");

        m_DefaultMessage = m_Label.GetText();

        // anchor news bar to the bottom of the screen
        Transform trans    = Layout.transform;
        Vector3   position = trans.position;

        position.y     = Screen.height - Layout.PlatformSize.y * Layout.LayoutScale.y;
        trans.position = position;
    }
Exemplo n.º 7
0
    void GuiInit()
    {
        if (BuildInfo.Version.Stage == BuildInfo.Stage.Release)
        {
            return;
        }

        if (!MFGuiManager.Instance)
        {
            return;
        }

        GUIBase_Platform p = MFGuiManager.Instance.FindPlatform("Gui_16_9");

        if (!p)
        {
            return;
        }

        m_PivotOther = MFGuiManager.Instance.GetPivot(s_PivotOtherName);

        if (!m_PivotOther)
        {
            //Debug.LogError("'" + s_PivotOtherName + "' not found!!! Assert should come now");
            return;
        }

        m_LayoutOther = m_PivotOther.GetLayout(s_LayoutOtherName);

        if (!m_LayoutOther)
        {
            //Debug.LogError("'" + s_LayoutOtherName + "' not found!!! Assert should come now");
            return;
        }

        // DIRTY fix
        if (m_LayoutOther.GetWidget(s_FPSName, false) == null)
        {
            return;
        }

        m_FPS = GuiBaseUtils.PrepareNumber(m_LayoutOther, s_FPSName);
        if (!m_FPS)
        {
            return;
        }

        Show(true);
        Initialised = true;
    }
Exemplo n.º 8
0
    // GUIOVERLAY INTERFACE

    protected override void OnViewInit()
    {
        m_Instance = this;

        base.OnViewInit();

        CloudUser.authenticationChanged += OnAuthenticationChanged;

        m_Chat         = RegisterComponent <ScreenComponentChat>();
        m_Chat.MaxRows = MAX_ROWS;

        m_FriendList = GuiBaseUtils.GetControl <GUIBase_List>(Layout, "FriendList");
        InitGuiLines();
    }
Exemplo n.º 9
0
	// ------
	protected override void OnViewInit()
	{
		base.OnViewInit();

		m_Caption_Label = GuiBaseUtils.PrepareLabel(Layout, "Caption_Label");
		m_Value_Label = GuiBaseUtils.PrepareLabel(Layout, "Value_Label");
		m_AcceptButton = GuiBaseUtils.GetControl<GUIBase_Button>(Layout, "Accept_Button");
		m_BigThumbnail = GuiBaseUtils.PrepareSprite(Layout, "BigThumbnail");
		GuiBaseUtils.RegisterButtonDelegate(Layout, "Back_Button", null, OnCloseButton);
		GuiBaseUtils.RegisterButtonDelegate(Layout, "Accept_Button", null, OnAcceptButton);
		m_Cost = new GuiShopFunds(GuiBaseUtils.PrepareSprite(Layout, "Cost_Sprite"));
		m_UpgradeIcon = ResearchSupport.Instance.GetNewUpgradeIcon();
		m_UpgradeIcon.Relink(m_BigThumbnail.Widget);
	}
Exemplo n.º 10
0
 public void InitGui(GUIBase_Layout layout, GUIBase_Widget widget, int slotId)
 {
     m_RootWidget       = widget;
     m_NameLabel        = GuiBaseUtils.GetChildLabel(widget, "Gun_Label");
     m_WeaponSprite     = GuiBaseUtils.GetChildSprite(widget, "Gun_Sprite");
     m_WeaponTypeSprite = GuiBaseUtils.GetChildSprite(widget, "WeaponType_Sprite");
     m_LockSprite       = GuiBaseUtils.GetChildSprite(widget, "Lock_Sprite");
     m_EmptyLabel       = GuiBaseUtils.GetChildLabel(widget, "Empty_Label");
     if (slotId == 1 || slotId == 2)
     {
         m_PremiumSprite       = GuiBaseUtils.GetChildSprite(widget, "PremiumOn_Sprite");
         m_PremiumLockedSprite = GuiBaseUtils.GetChildSprite(widget, "PremiumOnlyLocked_Sprite");
     }
 }
Exemplo n.º 11
0
    // -----
    protected override bool OnInit()
    {
        if (base.OnInit() == false)
        {
            return(false);
        }

        m_Pivot  = MFGuiManager.Instance.GetPivot("MainHUD");
        m_Layout = m_Pivot.GetLayout("HUD_Layout");
        m_RegisteredMedkits.Clear();
        m_RegisteredAmmokits.Clear();

        for (int i = 0; i < 5; i++)
        {
            Label l = new Label();
            l.Base          = m_Layout.GetWidget("FriendName" + i);
            l.Name          = GuiBaseUtils.GetChildLabel(l.Base, "Name");
            l.Transform     = l.Base.transform;
            l.OrigNameScale = 0.54f;             // l.Name.transform.localScale.x;
            l.OrigBaseWidth = l.Base.GetWidth();
            l.Base.Show(false, true);
            l.Base.SetModify(true);
            m_Labels.Add(l);
        }
        for (int i = 0; i < 3; i++)
        {
            Label l = new Label();
            l.Base          = m_Layout.GetWidget("Medkit" + i);
            l.Name          = null;    //GuiBaseUtils.GetChildLabel(l.Base, "Name");
            l.Transform     = l.Base.transform;
            l.OrigNameScale = 0.54f;
            l.OrigBaseWidth = l.Base.GetWidth();
            l.Base.Show(false, true);
            l.Base.SetModify(true);
            m_Medkits.Add(l);
        }
        for (int i = 0; i < 3; i++)
        {
            Label l = new Label();
            l.Base          = m_Layout.GetWidget("Ammokit" + i);
            l.Name          = null;    //GuiBaseUtils.GetChildLabel(l.Base, "Name");
            l.Transform     = l.Base.transform;
            l.OrigNameScale = 0.54f;
            l.OrigBaseWidth = l.Base.GetWidth();
            l.Base.Show(false, true);
            l.Base.SetModify(true);
            m_Ammokits.Add(l);
        }
        return(true);
    }
        //--------------------------------------------------------------------------------------------------------------
        public ChartLine(GUIBase_Widget inLineWidget)
        {
            m_LineWidget = inLineWidget;

            GUIBase_Label[]       labels  = m_LineWidget.GetComponentsInChildren <GUIBase_Label>();
            GUIBase_MultiSprite[] sprites = m_LineWidget.GetComponentsInChildren <GUIBase_MultiSprite>();

            foreach (GUIBase_Label l in labels)
            {
                if (l.name == "Stand_Enum")
                {
                    m_OrderLabel = l;
                }
                else if (l.name == "RankNumber")
                {
                    m_RankLabel = l;
                }
                else if (l.name == "Name")
                {
                    m_NameLabel = l;
                }
                else if (l.name == "Score_Enum")
                {
                    m_ScoreLabel = l;
                }
                else if (l.name == "Kills_Enum")
                {
                    m_KillsLabel = l;
                }
                else if (l.name == "Deads_Enum")
                {
                    m_DeadsLabel = l;
                }
            }

            foreach (GUIBase_MultiSprite s in sprites)
            {
                if (s.name == "RankPic")
                {
                    m_RankSprite = s;
                }
                else if (s.name == "PlatformPic")
                {
                    m_PlatformSprite = s;
                }
            }

            m_FriendIcon = GuiBaseUtils.GetChild <GUIBase_Widget>(m_LineWidget, "FriendIcon");
        }
Exemplo n.º 13
0
    protected override void OnViewShow()
    {
        m_PasswordLength = -1;

        CloudUser cloudUser = CloudUser.instance;

        if (cloudUser.GetLoginData(ref m_LoadedNickName,
                                   ref m_LoadedUserName,
                                   ref m_LoadedPassword,
                                   ref m_LoadedPasswordLength,
                                   ref m_LoadedRememberMe,
                                   ref m_LoadedAutoLogin) == false)
        {
            m_LoadedUserName       = m_UserName = s_DefaultUserNameText;
            m_LoadedPassword       = m_PasswordHash = s_DefaultPasswordText;
            m_LoadedPasswordLength = m_PasswordLength = 0;
            m_LoadedRememberMe     = m_RememberMe = true;
            m_LoadedAutoLogin      = m_AutoLogin = false;
        }
        else
        {
            m_UserName       = m_LoadedUserName.ToLower();
            m_PasswordHash   = m_LoadedPassword;
            m_RememberMe     = m_LoadedRememberMe;
            m_PasswordLength = m_LoadedPasswordLength;
            m_AutoLogin      = m_LoadedAutoLogin;
        }

        string userName = GuiBaseUtils.FixNameForGui(m_UserName);

        m_UserNameButton.SetNewText(userName);
        if (m_UserName != s_DefaultUserNameText)
        {
            m_UserNameButton.TextFieldText = userName;
        }

        m_PasswordButton.TextFieldText = "";
        m_PasswordButton.SetNewText(passwordGUIText);
        ;
        m_RememberMeButton.SetValue(m_RememberMe);
        m_AutoLoginButton.SetValue(m_AutoLogin);

        UpdateLoginButton();

#if UNITY_STANDALONE //there is no back on PC/MAC
        GetWidget("Back_Button").Show(false, true);
#endif
        base.OnViewShow();
    }
Exemplo n.º 14
0
    protected override void OnViewHide()
    {
        if (Layout != null)
        {
            if (Layout.GetComponent <AudioSource>() != null && Layout.GetComponent <AudioSource>().isPlaying == true)
            {
                Layout.GetComponent <AudioSource>().Stop();
            }

            GuiBaseUtils.RegisterButtonDelegate(Layout, "OK_Button", null, null);
            GuiBaseUtils.RegisterButtonDelegate(Layout, "Close_Button", null, null);
        }

        base.OnViewHide();
    }
Exemplo n.º 15
0
    public void InitGui(GUIBase_Layout layout, GUIBase_Widget widget, int slotId)
    {
        m_RootWidget = widget;
        m_NameLabel  = GuiBaseUtils.GetChildLabel(widget, "Item_Label");
        m_ItemSprite = GuiBaseUtils.GetChildSprite(widget, "Item_Sprite");
        m_LockSprite = GuiBaseUtils.GetChildSprite(widget, "Lock_Sprite");
        m_EmptyLabel = GuiBaseUtils.GetChildLabel(widget, "Empty_Label");
        m_CountText  = GuiBaseUtils.GetChildLabel(widget, "CountText");

        if (slotId == 1 || slotId == 2)
        {
            m_PremiumSprite       = GuiBaseUtils.GetChildSprite(widget, "PremiumOn_Sprite");
            m_PremiumLockedSprite = GuiBaseUtils.GetChildSprite(widget, "PremiumOnlyLocked_Sprite");
        }
    }
Exemplo n.º 16
0
    void InitAchievements()
    {
        m_LayoutAchievement = new GUIBase_Layout[s_AchievementsName.Length];
        m_PivotAchievements = MFGuiManager.Instance.GetPivot("Achievements");
        if (!m_PivotAchievements)
        {
            Debug.LogError("Pivot 'Achievements' not found! ");
            return;
        }

        for (int i = 0; i < m_LayoutAchievement.Length; i++)
        {
            m_LayoutAchievement[i] = GuiBaseUtils.GetLayout(s_AchievementsName[i], m_PivotAchievements);
        }
    }
Exemplo n.º 17
0
    // C-TOR

    public GadgetZoneControlState(GUIBase_Widget root)
    {
        m_Root = root;

        m_BlueTickets = GuiBaseUtils.GetChild <GUIBase_Label>(m_Root, "BlueSpawns");
        m_BlueState   = GuiBaseUtils.GetChild <GUIBase_Label>(m_Root, "BlueStand");

        m_RedTickets = GuiBaseUtils.GetChild <GUIBase_Label>(m_Root, "RedSpawns");
        m_RedState   = GuiBaseUtils.GetChild <GUIBase_Label>(m_Root, "RedStand");

        m_BlueTickets.Widget.Color = ZoneControlFlag.Colors[E_Team.Good];
        m_BlueState.Widget.Color   = ZoneControlFlag.Colors[E_Team.Good];
        m_RedTickets.Widget.Color  = ZoneControlFlag.Colors[E_Team.Bad];
        m_RedState.Widget.Color    = ZoneControlFlag.Colors[E_Team.Bad];
    }
    // -----
    public void Init(GUIBase_Layout layout)
    {
        m_Layout = layout;

        for (int i = 0; i < ResearchItem.MAX_PARAMS; i++)
        {
            m_Params[i]         = new Param();
            m_Params[i].Parent  = GuiBaseUtils.GetChild <GUIBase_Widget>(m_Layout, "Param" + (i + 1));
            m_Params[i].OrigPos = m_Params[i].Parent.transform.localPosition;
            m_Params[i].Name    = GuiBaseUtils.GetChildLabel(m_Params[i].Parent, "ParamName");
            m_Params[i].Value   = GuiBaseUtils.GetChildLabel(m_Params[i].Parent, "ParamValue");
        }
        m_Description = GuiBaseUtils.GetChild <GUIBase_TextArea>(m_Layout, "Description");
        m_Key         = GuiBaseUtils.GetChild <GUIBase_TextArea>(m_Layout, "Key");
    }
Exemplo n.º 19
0
        public void Update(Message message, int index)
        {
            m_MessageIndex = index;

            m_Subject.SetNewText(message != null ? GuiBaseUtils.TrimLongText(message.GetSubject(), MAX_SUBJECT_LENGTH) : "");
            m_Date.SetNewText(message != null ? message.m_SendTime.ToLongRegionalString() : "");
            m_Text.SetNewText(message != null ? message.GetMessage() : TextDatabase.instance[0104112]);

            bool showReply = m_MessageIndex >= 0 && message is FriendMessage ? true : false;

            if (showReply != m_Reply.Widget.Visible)
            {
                m_Reply.Widget.Show(showReply, true);
            }
        }
Exemplo n.º 20
0
    protected override void OnShow()
    {
        base.OnShow();

        m_MouseSelectionPos = 0;
        m_MouseSelection    = -1;

        IsShown = true;

        if (m_Menu != null)
        {
            m_Menu.Widget.ShowImmediate(true, false);
            GuiBaseUtils.RegisterButtonDelegate3(m_Menu, OnMenuPressed, OnMenuReleased, OnMenuCancelled);
        }
    }
Exemplo n.º 21
0
    protected override void OnViewInit()
    {
        GUIBase_Pivot pivot = MFGuiManager.Instance.GetPivot("ShopPopups");

        m_ScreenLayout = pivot.GetLayout("Buy_Layout");

        base.OnViewInit();

        m_Caption_Label = GuiBaseUtils.PrepareLabel(m_ScreenLayout, "Caption_Label");
        GuiBaseUtils.RegisterButtonDelegate(m_ScreenLayout, "Back_Button", null, OnCloseButton);
        GuiBaseUtils.RegisterButtonDelegate(m_ScreenLayout, "Accept_Button", null, OnAcceptButton);
        m_SaleRoot   = GetWidget("SaleRoot");
        m_Sale_Label = GuiBaseUtils.PrepareLabel(m_ScreenLayout, "Sale_Label");
        m_Cost       = new GuiShopFunds(GuiBaseUtils.PrepareSprite(m_ScreenLayout, "Cost_Sprite"));
    }
Exemplo n.º 22
0
//------------------------------------      MULTIPAGE INTERFACE
    protected override void OnViewInit()
    {
        base.OnViewInit();

        m_ScreenPivot = MFGuiManager.Instance.GetPivot("ShopMenu");

        //register buy button (pokud bude mit kazda page vlastni, tak to presunout do page tridy)
        GUIBase_Layout buyLayout = m_ScreenPivot.GetLayout("InfoScreen_Layout");

        m_BuyButton          = GuiBaseUtils.GetButton(buyLayout, BUY_BUTTON);
        m_Buy_Button_Label   = GuiBaseUtils.PrepareLabel(buyLayout, BUY_BUTTON_LABEL);
        m_Buy_Premium_Button = GuiBaseUtils.GetButton(buyLayout, "Buy_Premium_Button");

        CloudUser.premiumAcctChanged += OnUserPremiumAcctChanged;
    }
Exemplo n.º 23
0
        public void Update(Message message, int index, bool selected)
        {
            m_MessageIndex = index;

            m_Highlight.Show(m_Line.Visible && selected, true);
            m_Sender.SetNewText(GuiBaseUtils.FixNameForGui(message.GetSender()));
            m_Subject.SetNewText(GuiBaseUtils.TrimLongText(message.GetSubject(), MAX_SUBJECT_LENGTH));

            m_SenderIcon.State = message.GetMultiSpriteState();

            if (message.m_IsRead != m_IsReadIcon.Widget.Visible)
            {
                m_IsReadIcon.Widget.Show(message.m_IsRead, true);
            }
        }
Exemplo n.º 24
0
    protected override void OnViewHide()
    {
        // unbind buttons
        for (int idx = 0; idx < m_Buttons.Length; ++idx)
        {
            GuiBaseUtils.RegisterButtonDelegate(m_Buttons[idx], null, null);
        }
        RegisterButtonDelegate(RESET, null, null);

        // store options
        GuiOptions.Save();

        // call super
        base.OnViewHide();
    }
Exemplo n.º 25
0
    protected override void OnViewInit()
    {
        base.OnViewInit();

        if (m_ScreenLayout == null)
        {
            Debug.LogError("GuiConfirmDialog<" + name + "> :: There is not any layout specified for confirm dialog!");
            return;
        }

        m_OKButton     = GuiBaseUtils.GetControl <GUIBase_Button>(m_ScreenLayout, "OK_Button");
        m_CancelButton = GuiBaseUtils.GetControl <GUIBase_Button>(m_ScreenLayout, "Cancel_Button");
        m_Caption      = PrepareLabel(m_ScreenLayout, "Caption_Label");
        m_Message      = PrepareLabel(m_ScreenLayout, "Text_Label");
    }
Exemplo n.º 26
0
    void OnChatJoined(string primaryKey, string messageId, string messageText)
    {
        JsonData data   = JsonMapper.ToObject(messageText);
        string   master = data["master"].ToString();
        string   slave  = data["slave"].ToString();

        primaryKey = m_PrimaryKey == master ? slave : master;
        FriendInfo info = m_Friends.Find(obj => obj.PrimaryKey == primaryKey);

        if (info == null)
        {
            return;
        }

        AddSystemMessage(info, string.Format(TextDatabase.instance[0506011], GuiBaseUtils.FixNameForGui(info.Nickname)));
    }
Exemplo n.º 27
0
    // GUIVIEW INTERFACE
    protected override void OnViewInit()
    {
        base.OnViewInit();

        for (int i = 0; i < MAX_BUNDLE_ITEMS; i++)
        {
            BundleGui bg = new BundleGui();

            string bundleName = "Bundle" + i.ToString();
            bg.Root        = m_ScreenLayout.GetWidget(bundleName);
            bg.Label       = GuiBaseUtils.GetChildLabel(bg.Root, "Bundle_Name_Label");
            bg.Sprite      = GuiBaseUtils.GetChildSprite(bg.Root, "Bundle_Thumbnail_Default");
            bg.Owned       = GuiBaseUtils.GetChildSprite(bg.Root, "Owned_Sprite");
            m_BundleGui[i] = bg;
        }
    }
Exemplo n.º 28
0
    protected override void OnViewInit()
    {
        m_ScreenLayout = GetLayout("FriendList_Dialog", "AddNewFriend_Layout");

        base.OnViewInit();

        m_OKButton      = PrepareButton(m_ScreenLayout, "OK_Button", null, null);
        m_NameButton    = PrepareButton(m_ScreenLayout, "Username_Button", null, null);
        m_MessageButton = PrepareButton(m_ScreenLayout, "Message_Button", null, null);
        m_MessageText   = GuiBaseUtils.GetControl <GUIBase_TextArea>(m_ScreenLayout, "Message_Text");

        m_CancelButton = PrepareButton(m_ScreenLayout, "Cancel_Button", null, null);

        AddTextField(m_NameButton, Delegate_OnKeyboardClose, null, CloudUser.MAX_ACCOUNT_NAME_LENGTH);
        AddTextField(m_MessageButton, Delegate_OnKeyboardClose, m_MessageText, MAX_MESSAGE_LENGTH, 5);
    }
Exemplo n.º 29
0
    void OnDrawGizmosSelected()
    {
        GUIBase_Widget widget = Widget != null ? Widget : GetComponent <GUIBase_Widget>();

        if (widget == null)
        {
            return;
        }
        if (widget.Visible == false)
        {
            return;
        }

        GuiBaseUtils.RenderRect(GetClientRect(), Color.yellow);
        GuiBaseUtils.RenderRect(GetRect(), Color.green);
    }
Exemplo n.º 30
0
    public override void GUIView_Hide()
    {
        if (m_View.Visible == false)
        {
            return;
        }

        GuiBaseUtils.RegisterButtonDelegate(m_View, "AddByUsername_Button", null, null);

        m_Table.OnUpdateRow -= OnUpdateTableRow;

        GameCloudManager.friendList.FriendListChanged        -= OnFriendListChanged;
        GameCloudManager.friendList.PendingFriendListChanged -= OnFriendListChanged;

        MFGuiManager.Instance.ShowLayout(m_View, false);
    }