public override void Init(Texture2D appIcon, string postFix, float scaleFactor) { this.appIcon = appIcon; this.postFix = postFix; this.scaleFactor = scaleFactor; frameMyProfile = ((GameObject)Instantiate(prfbGUIFrameMyProfile)).GetComponent<FresviiGUIFrame>(); frameMyProfile.GetComponent<FresviiGUIMyProfile>().IsOriginal = true; frameMyProfile.Init(appIcon, postFix, scaleFactor, FASGui.GuiDepthBase); frameMyProfile.transform.parent = this.transform; frameMyProfile.Position = Vector2.zero; CurrentFrame = frameMyProfile; }
public void GoToFriendRequests() { frameFriendRequests = ((GameObject)Instantiate(prfbGUIFrameFriendRequests)).GetComponent<FresviiGUIFriendRequests>(); frameFriendRequests.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, GuiDepth - 10); frameFriendRequests.GetComponent<FresviiGUIFriendRequests>().SetGUIMyProfile(this); frameFriendRequests.transform.parent = this.transform; frameFriendRequests.SetDraw(true); tabBar.enabled = false; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), moveDelayTime, delegate() { this.SetDraw(false); }); frameFriendRequests.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, moveDelayTime, delegate() { }); }
public override void Init(Texture2D appIcon, string postFix, float scaleFactor, int guiDepth) { this.GuiDepth = guiDepth; this.scaleFactor = scaleFactor; this.postFix = postFix; textureCoordsBackground = FresviiGUIColorPalette.GetTextureCoods(FresviiGUIColorPalette.MainBackground); userProfileTopMenu = GetComponent<FresviiGUIMyProfileTopMenu>(); tabBar = GetComponent<FresviiGUITabBar>(); if (Application.platform == RuntimePlatform.IPhonePlayer) { guiStyleLabelUserName.font = null; guiStyleLabelUserName.fontStyle = FontStyle.Bold; guiStyleLabelUserProfile.font = null; guiStyleButtonFriend.font = null; guiStyleButtonMessage.font = null; guiStyleFriendNotification.font = null; guiStyleFriendMenuTitle.font = null; guiStyleFriendMenuTitle.fontStyle = FontStyle.Bold; guiStyleLabelUserCode.font = null; } palette = FresviiGUIColorPalette.Palette; userProfileTopMenu.Init(appIcon, postFix, scaleFactor,this, GuiDepth - 1); tabBar.Init(postFix, scaleFactor, this.GuiDepth - 1); sideMargin *= scaleFactor; vMargin *= scaleFactor; margin *= scaleFactor; miniMargin *= scaleFactor; profileImageBgMargin *= scaleFactor; myProfileImageSize *= scaleFactor; topMargin *= scaleFactor; friendNotificationHeight *= scaleFactor; friendMenuTitleBarHeight *= scaleFactor; hMargin *= scaleFactor; loadingSpinnerSize *= scaleFactor; profileImageSize *= scaleFactor; guiStyleLabelUserName.fontSize = (int)(guiStyleLabelUserName.fontSize * scaleFactor); guiStyleLabelUserName.normal.textColor = FresviiGUIColorPalette.GetColor(FresviiGUIColorPalette.ProfileUserName); guiStyleLabelUserCode.fontSize = (int)(guiStyleLabelUserCode.fontSize * scaleFactor); guiStyleLabelUserCode.normal.textColor = FresviiGUIColorPalette.GetColor(FresviiGUIColorPalette.ProfileUserName); guiStyleLabelUserProfile.fontSize = (int)(guiStyleLabelUserProfile.fontSize * scaleFactor); guiStyleLabelUserProfile.normal.textColor = FresviiGUIColorPalette.GetColor(FresviiGUIColorPalette.ProfileDescription); guiStyleFriendNotification.fontSize = (int)(guiStyleFriendNotification.fontSize * scaleFactor); guiStyleFriendNotification.normal.textColor = FresviiGUIColorPalette.GetColor(FresviiGUIColorPalette.ProfileNotificationText); guiStyleFriendMenuTitle.fontSize = (int)(guiStyleFriendMenuTitle.fontSize * scaleFactor); guiStyleFriendMenuTitle.normal.textColor = FresviiGUIColorPalette.GetColor(FresviiGUIColorPalette.ProfileFriendBarText); guiStyleFriendMenuTitle.padding = FresviiGUIUtility.RectOffsetScale(guiStyleFriendMenuTitle.padding, scaleFactor); textureMyProfileDefault = FresviiGUIManager.Instance.resourceManager.LoadTextureFromResource(FresviiGUIConstants.ResouceTextureFolderName + "/" + FresviiGUIConstants.UserTextureName + postFix, false); texCoordsNotificationBg = FresviiGUIColorPalette.GetTextureCoods(FresviiGUIColorPalette.ProfileNotificationBackground); texCoordsFriendTitleBg = FresviiGUIColorPalette.GetTextureCoods(FresviiGUIColorPalette.ProfileFriendBarBackground); texCoordsFriendTitleBgH = FresviiGUIColorPalette.GetTextureCoods(FresviiGUIColorPalette.ProfileFriendBarBackgroundH); texCoordsFriendTitleLine = FresviiGUIColorPalette.GetTextureCoods(FresviiGUIColorPalette.ProfileFriendBarLine); textureRight = FresviiGUIManager.Instance.resourceManager.LoadTextureFromResource(FresviiGUIConstants.ResouceTextureFolderName + "/" + FresviiGUIConstants.RightIconTextureName + postFix, false); scrollPosition = Vector2.zero; frameMyProfileEdit = ((GameObject)Instantiate(prfbGUIFrameMyProfileEdit)).GetComponent<FresviiGUIFrame>(); guiEdit = frameMyProfileEdit.gameObject.GetComponent<FresviiGUIMyProfileEdit>(); frameMyProfileEdit.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, GuiDepth - 20); frameMyProfileEdit.GetComponent<FresviiGUIMyProfileEdit>().SetGUIMyProfile(this); frameMyProfileEdit.transform.parent = this.transform; frameMyProfileEdit.SetDraw(false); textureMyProfileCircle = FresviiGUIManager.Instance.resourceManager.LoadTextureFromResource(FresviiGUIConstants.ResouceTextureFolderName + "/" + FresviiGUIConstants.UserCircleTextureName + postFix, false); loadingSpinnerPosition = new Rect(Screen.width * 0.5f - loadingSpinnerSize.x * 0.5f, Screen.height * 0.5f - loadingSpinnerSize.y * 0.5f, loadingSpinnerSize.x, loadingSpinnerSize.y); loadingSpinner = Fresvii.AppSteroid.Gui.LoadingSpinner.Show(loadingSpinnerPosition, FASGui.GuiDepthBase); GetAccout(); SetScrollSlider(scaleFactor * 2.0f); requestLabelContent = new GUIContent(FresviiGUIText.Get("FriendRequests")); friendCountLabelContent = new GUIContent(FresviiGUIText.Get("Friends")); videoListLabelContent = new GUIContent(FresviiGUIText.Get("Videos")); directMessageListLabelContent = new GUIContent(FresviiGUIText.Get("DirectMessages")); }
public void OnEditMemberTapped() { if (Group == null) return; ControlLock = true; frameEditGroupMember = ((GameObject)Instantiate(prfbGUIFrameGroupEditMember)).GetComponent<FresviiGUIEditGroupMember>(); frameEditGroupMember.transform.parent = this.transform; frameEditGroupMember.PostFrame = this; frameEditGroupMember.GetComponent<FresviiGUIEditGroupMember>().Group = this.Group; frameEditGroupMember.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, this.GuiDepth - 10); frameEditGroupMember.SetDraw(true); frameEditGroupMember.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { this.SetDraw(false); ControlLock = false; }); }