public void GoToUserProfile(FresviiGUIFrame frameProfile) { frameProfile.SetDraw(true); frameProfile.PostFrame = this; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), delegate() { this.SetDraw(false); }); frameProfile.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { }); }
public void GoToGroupChat(bool animation) { if (frameChat != null) Destroy(frameChat.gameObject); frameChat = ((GameObject)Instantiate(prfbFrameChat)).GetComponent<FresviiGUIFrame>(); frameChat.gameObject.GetComponent<FresviiGUIChat>().SetGroup(this.Group); frameChat.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, frameGroupMessage.GuiDepth - 1); frameChat.transform.parent = this.transform; frameChat.SetDraw(true); frameChat.PostFrame = frameGroupMessage; frameGroupMessage.ControlLock = true; if (frameGroupMessage.tabBar != null) { frameGroupMessage.tabBar.enabled = false; } if (animation) { frameGroupMessage.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), delegate() { frameGroupMessage.SetDraw(false); frameGroupMessage.ControlLock = false; }); frameChat.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { }); } else { frameGroupMessage.Tween(new Vector2(-Screen.width, 0.0f), new Vector2(-Screen.width, 0.0f), delegate() { frameGroupMessage.SetDraw(false); frameGroupMessage.ControlLock = false; }); frameChat.Tween(Vector2.zero, Vector2.zero, delegate() { }); } frameChat.gameObject.GetComponent<FresviiGUIChat>().OnAddGroupMessage += OnAddGroupMessage; }
private IEnumerator WaitForSend(Fresvii.AppSteroid.Models.Group group) { while (imageSending || commentSending) yield return 1; loadingSpinner.Hide(); ControlLock = false; Back(); if (!IsCreateFromPairGroup) { PostFrame.gameObject.GetComponent<FresviiGUIGroupMessage>().GoToGroupChat(group); } else { if (frameChat != null) Destroy(frameChat); frameChat = ((GameObject)Instantiate(prfbFrameChat)).GetComponent<FresviiGUIFrame>(); frameChat.gameObject.GetComponent<FresviiGUIChat>().SetGroup(group); frameChat.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, this.PostFrame.GuiDepth - 1); frameChat.transform.parent = this.transform; frameChat.SetDraw(true); frameChat.PostFrame = this.PostFrame; this.ControlLock = true; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), delegate() { this.SetDraw(false); this.ControlLock = false; }); frameChat.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { }); } }
void OnGUI() { GUI.DrawTextureWithTexCoords(backgroundRect, FresviiGUIColorPalette.Palette, textureCoordsBackground); if (isReady) { GUI.BeginGroup(baseRect); GUI.BeginGroup(scrollViewRect); // User Image if (Event.current.type == EventType.Repaint) { userMask.color = Color.white; Graphics.DrawTexture(userImagePosition, (textureMyProfile == null) ? textureMyProfileDefault : textureMyProfile, userMask); } Event e = Event.current; GUI.DrawTexture(userImagePosition, textureMyProfileCircle); // User Name GUI.Label(userNamePosition, userNameContent, guiStyleLabelUserName); // Holding - menu apper if (userNamePosition.Contains(e.mousePosition) && FASGesture.IsHolding && !FASGesture.IsDragging && !ControlLock) { List<string> buttons = new List<string>(); buttons.Add(FresviiGUIText.Get("Copy")); Vector2 postion = new Vector2(baseRect.x + scrollViewRect.x + userNamePosition.x + userNamePosition.width * 0.5f, baseRect.y + scrollViewRect.y + userNamePosition.y); ControlLock = true; popOverBalloonMenu = Fresvii.AppSteroid.Gui.PopOverBalloonMenu.Show(scaleFactor, postFix, this.GuiDepth - 30, postion, buttons.ToArray(), (selectedButton) => { ControlLock = false; if (selectedButton == FresviiGUIText.Get("Copy")) { Fresvii.AppSteroid.Util.Clipboard.SetText(currentUser.Name); } }); popOverBalloonMenu.Name = "UserName"; } // User Code GUI.Label(userCodePosition, userCodeContent, guiStyleLabelUserCode); // Holding - menu apper if (userCodePosition.Contains(e.mousePosition) && FASGesture.IsHolding && !FASGesture.IsDragging && !ControlLock) { List<string> buttons = new List<string>(); buttons.Add(FresviiGUIText.Get("Copy")); Vector2 postion = new Vector2(baseRect.x + scrollViewRect.x + userCodePosition.x + userCodePosition.width * 0.5f, baseRect.y + scrollViewRect.y + userCodePosition.y); ControlLock = true; popOverBalloonMenu = Fresvii.AppSteroid.Gui.PopOverBalloonMenu.Show(scaleFactor, postFix, this.GuiDepth - 30, postion, buttons.ToArray(), (selectedButton) => { ControlLock = false; if (selectedButton == FresviiGUIText.Get("Copy")) { Fresvii.AppSteroid.Util.Clipboard.SetText(currentUser.UserCode); } }); popOverBalloonMenu.Name = "UserCode"; } // User Description GUI.Label(userDescriptionPosition, currentUser.Description, guiStyleLabelUserProfile); // User FriendTitleBar GUI.DrawTextureWithTexCoords(friendMenuTitleBarPosition, palette, buttonFriendList.IsActive ? texCoordsFriendTitleBgH : texCoordsFriendTitleBg); GUI.Label(friendMenuTitleBarPosition, friendCountLabelContent, guiStyleFriendMenuTitle); GUI.DrawTexture(friendMenuRightIconPosition, textureRight); if (buttonFriendList.IsTap(e, friendMenuTitleBarPosition)) { frameFriendList = ((GameObject)Instantiate(prfbFriendList)).GetComponent<FresviiGUIFrame>(); frameFriendList.transform.parent = this.transform; frameFriendList.gameObject.GetComponent<FresviiGUIFriendList>().SetUser(currentUser); frameFriendList.Init(null, postFix, this.scaleFactor, this.GuiDepth - 1); frameFriendList.SetDraw(true); frameFriendList.PostFrame = this; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), moveDelayTime, delegate() { this.SetDraw(false); }); frameFriendList.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, moveDelayTime, delegate() { }); } // RequestTitleBar GUI.DrawTextureWithTexCoords(requestTitleBarPosition, palette, buttonFriendshipRequestList.IsActive ? texCoordsFriendTitleBgH : texCoordsFriendTitleBg); GUI.Label(requestTitleBarPosition, requestLabelContent, guiStyleFriendMenuTitle); GUI.DrawTexture(requestRightIconPosition, textureRight); if (buttonFriendshipRequestList.IsTap(e, requestTitleBarPosition)) { GoToFriendRequests(); } #if UNITY_IOS // VideoTitleBar if (FASConfig.Instance.videoEnable) { GUI.DrawTextureWithTexCoords(videoTitleBarPosition, palette, buttonVideoList.IsActive ? texCoordsFriendTitleBgH : texCoordsFriendTitleBg); GUI.Label(videoTitleBarPosition, videoListLabelContent, guiStyleFriendMenuTitle); GUI.DrawTexture(videoRightIconPosition, textureRight); if (buttonVideoList.IsTap(e, videoTitleBarPosition)) { GoToVideoList(true); } } #endif // DirectMessageTitleBar GUI.DrawTextureWithTexCoords(directMessageTitleBarPosition, palette, buttonDirectMessageList.IsActive ? texCoordsFriendTitleBgH : texCoordsFriendTitleBg); GUI.Label(directMessageTitleBarPosition, directMessageListLabelContent, guiStyleFriendMenuTitle); GUI.DrawTexture(directMessageRightIconPosition, textureRight); if (buttonDirectMessageList.IsTap(e, directMessageTitleBarPosition)) { GoToDirectMessageList(true); } GUI.EndGroup(); // scroll view rect GUI.EndGroup(); // base rect // Notification if (RequestedFriendsListMeta != null) { if (RequestedFriendsListMeta.TotalCount > 0) { GUI.DrawTextureWithTexCoords(friendNotificationPosition, palette, texCoordsNotificationBg); string friendRequestMessage = FresviiGUIText.Get("FriendRequestCount").Replace("#", RequestedFriendsListMeta.TotalCount.ToString()); GUI.Label(friendNotificationPosition, friendRequestMessage, guiStyleFriendNotification); if (buttonFriendNotification.IsTap(Event.current, friendNotificationPosition)) { GoToFriendRequests(); } } } } }
private void GoToGroupMessage(bool animation) { frameGroupList = ((GameObject)Instantiate(prfbGroupList)).GetComponent<FresviiGUIFrame>(); frameGroupList.transform.parent = this.transform; frameGroupList.Init(null, postFix, this.scaleFactor, this.GuiDepth - 1); frameGroupList.SetDraw(true); frameGroupList.PostFrame = this; if (animation) { this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), moveDelayTime, delegate() { this.SetDraw(false); }); frameGroupList.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, moveDelayTime, delegate() { }); } else { this.Position = new Vector2(-Screen.width, 0.0f); this.SetDraw(false); frameGroupList.Position = Vector2.zero; } }
private void GoToVideoList(bool animation) { frameVideoList = ((GameObject)Instantiate(prfbGUIFrameVideoList)).GetComponent<FresviiGUIFrame>(); FresviiGUIVideoList fresviiGUIVideoList = frameVideoList.gameObject.GetComponent<FresviiGUIVideoList>(); fresviiGUIVideoList.IsModal = false; fresviiGUIVideoList.mode = FresviiGUIVideoList.Mode.Share; frameVideoList.transform.parent = this.transform; frameVideoList.Init(null, postFix, this.scaleFactor, this.GuiDepth - 1); frameVideoList.SetDraw(true); frameVideoList.PostFrame = this; if (animation) { this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), moveDelayTime, delegate() { this.SetDraw(false); }); frameVideoList.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, moveDelayTime, delegate() { }); } else { frameVideoList.Position = Vector2.zero; this.SetDraw(false); } }
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 void OnCreateButtonTapped() { ControlLock = true; frameGroupMessageCreate = ((GameObject)Instantiate(prfbGUIFrameGroupMessageCreate)).GetComponent<FresviiGUIGroupMessageCreate>(); frameGroupMessageCreate.transform.parent = this.transform; frameGroupMessageCreate.PostFrame = this; frameGroupMessageCreate.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, this.GuiDepth - 10); frameGroupMessageCreate.SetDraw(true); frameGroupMessageCreate.Tween(new Vector2(0.0f, Screen.height), Vector2.zero, delegate() { this.SetDraw(false); ControlLock = false; }); }
public void GoToDirectMessage(bool animation) { if (frameDirectMessage != null) Destroy(frameDirectMessage.gameObject); frameDirectMessage = ((GameObject)Instantiate(prfbFrameDirectMessage)).GetComponent<FresviiGUIFrame>(); frameDirectMessage.gameObject.GetComponent<FresviiGUIDirectMessage>().DirectMessage = this.DirectMessage; frameDirectMessage.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, parentFrame.GuiDepth - 1); frameDirectMessage.transform.parent = this.transform; frameDirectMessage.SetDraw(true); frameDirectMessage.PostFrame = parentFrame; frameDirectMessage.ControlLock = true; /*if (parentFrame.tabBar != null) { frameGroupMessage.tabBar.enabled = false; }*/ parentFrame.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), delegate() { parentFrame.SetDraw(false); parentFrame.ControlLock = false; }); frameDirectMessage.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { }); if (DirectMessage.Unread) { DirectMessage.Unread = false; FresviiGUIManager.Instance.UnreadDirectMessageCount--; } }
void OnGUI() { GUI.DrawTextureWithTexCoords(backgroundRect, FresviiGUIColorPalette.Palette, textureCoordsBackground); if(user == null) return; if (!hasError) { GUI.depth = GuiDepth; GUI.BeginGroup(baseRect); GUI.BeginGroup(scrollViewRect); // User Image GUI.DrawTexture(userImagePosition, (textureUserProfile == null) ? textureUserProfileDefault : textureUserProfile, ScaleMode.ScaleToFit); Color tmp = GUI.color; GUI.color = bgColor; GUI.DrawTexture(userImagePosition, textureUserProfileMask, ScaleMode.ScaleToFit); GUI.color = tmp; GUI.DrawTexture(userImagePosition, textureUserProfileCircle, ScaleMode.ScaleToFit); // User name GUI.Label(userNamePosition, userNameContent, guiStyleLabelUserName); if (!string.IsNullOrEmpty(user.Description)) { GUI.Label(userDescriptionPosition, userDescriptionContent, guiStyleLabelUserProfile); } if (user.Official) { GUI.EndGroup(); GUI.EndGroup(); return; } Event e = Event.current; // Holding - menu apper if (userNamePosition.Contains(e.mousePosition) && FASGesture.IsHolding && !FASGesture.IsDragging && !ControlLock) { List<string> buttons = new List<string>(); buttons.Add(FresviiGUIText.Get("Copy")); Vector2 postion = new Vector2(baseRect.x + scrollViewRect.x + userNamePosition.x + userNamePosition.width * 0.5f, baseRect.y + scrollViewRect.y + userNamePosition.y); ControlLock = true; popOverBalloonMenu = Fresvii.AppSteroid.Gui.PopOverBalloonMenu.Show(scaleFactor, postFix, this.GuiDepth - 30, postion, buttons.ToArray(), (selectedButton) => { ControlLock = false; if (selectedButton == FresviiGUIText.Get("Copy")) { Fresvii.AppSteroid.Util.Clipboard.SetText(user.Name); } }); popOverBalloonMenu.Name = "UserName"; } // User Code GUI.Label(userCodePosition, userCodeContent, guiStyleLabelUserCode); // Holding - menu apper if (userCodePosition.Contains(e.mousePosition) && FASGesture.IsHolding && !FASGesture.IsDragging && !ControlLock) { List<string> buttons = new List<string>(); buttons.Add(FresviiGUIText.Get("Copy")); Vector2 postion = new Vector2(baseRect.x + scrollViewRect.x + userCodePosition.x + userCodePosition.width * 0.5f, baseRect.y + scrollViewRect.y + userCodePosition.y); ControlLock = true; popOverBalloonMenu = Fresvii.AppSteroid.Gui.PopOverBalloonMenu.Show(scaleFactor, postFix, this.GuiDepth - 30, postion, buttons.ToArray(), (selectedButton) => { ControlLock = false; if (selectedButton == FresviiGUIText.Get("Copy")) { Fresvii.AppSteroid.Util.Clipboard.SetText(user.UserCode); } }); popOverBalloonMenu.Name = "UserCode"; } if (userInfoEnable) { #region Friend button if (user.FriendStatus == Fresvii.AppSteroid.Models.User.FriendStatuses.Requesting) { guiStyleButtonFriend.normal.textColor = btnNegativeColor; buttonFriend.IsTap(e, friendButtonPosition, friendButtonPosition, FresviiGUIButton.ButtonType.FrameAndLabel, textureButton03, textureButton03, textureButton03, FresviiGUIText.Get("RequestSent"), guiStyleButtonFriend); } /*else if (user.FriendStatus == User.FriendStatuses.Requested) { guiStyleButtonFriend.normal.textColor = btnNegativeColor; buttonFriend.IsTap(e, friendButtonPosition, friendButtonPosition, FresviiGUIButton.ButtonType.FrameAndLabel, textureButton03, textureButton03, textureButton03, FresviiGUIText.Get("Requested"), guiStyleButtonFriend); }*/ else if (user.FriendStatus == Fresvii.AppSteroid.Models.User.FriendStatuses.Friend) { guiStyleButtonFriend.normal.textColor = btnPositiveColor; if (buttonFriend.IsTap(e, friendButtonPosition, friendButtonPosition, FresviiGUIButton.ButtonType.FrameAndLabel, textureButton01, textureButton01H, textureButton01H, FresviiGUIText.Get("Unfriend"), guiStyleButtonFriend)) { Fresvii.AppSteroid.Util.DialogManager.Instance.SetLabel(FresviiGUIText.Get("Unfriend"), FresviiGUIText.Get("Cancel"), FresviiGUIText.Get("Close")); Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSelectDialog(FresviiGUIText.Get("ConfirmUnfriend"), delegate(bool del) { #if UNITY_EDITOR if (true) #else if(del) #endif { if (Application.internetReachability == NetworkReachability.NotReachable) { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), delegate(bool _del) { }); } else { FASFriendship.UnFriend(this.user.Id, delegate(Fresvii.AppSteroid.Models.Error error) { if (error == null) { user.SetFriendStatus(Fresvii.AppSteroid.Models.FriendshipRequest.Statuses.none.ToString()); DeletePairGroupMessages(user.Id, deleteGroupRetryCount, deleteGroupRetryInterval); } else { if (FASConfig.Instance.logLevel <= FAS.LogLevels.Error) { Debug.LogError(error.ToString()); } Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("UnknownError"), delegate(bool _del) { }); } }); } } }); } } else { guiStyleButtonFriend.normal.textColor = btnPositiveColor; if (buttonFriend.IsTap(e, friendButtonPosition, friendButtonPosition, FresviiGUIButton.ButtonType.FrameAndLabel, textureButton01, textureButton01H, textureButton01H, FresviiGUIText.Get("AddFriend"), guiStyleButtonFriend)) { if (Application.internetReachability == NetworkReachability.NotReachable) { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), delegate(bool del) { }); } else { user.SetFriendStatus(Fresvii.AppSteroid.Models.FriendshipRequest.Statuses.requesting.ToString()); FASFriendship.SendFriendshipRequest(this.user.Id, delegate(Fresvii.AppSteroid.Models.FriendshipRequest friendshipRequest, Fresvii.AppSteroid.Models.Error error) { if (error == null) { user.SetFriendStatus(friendshipRequest.Status.ToString()); } else { if (FASConfig.Instance.logLevel <= FAS.LogLevels.Error) Debug.LogError(error.ToString()); Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("UnknownError"), delegate(bool del) { }); user.SetFriendStatus(Fresvii.AppSteroid.Models.FriendshipRequest.Statuses.none.ToString()); } }); } } } } #endregion #region Message button if (buttonMessage.IsTap(e, messageButtonPosition, messageButtonPosition, FresviiGUIButton.ButtonType.TextureOnly, textureIconMessage, textureIconMessage, textureIconMessage)) { if (Application.internetReachability == NetworkReachability.NotReachable) { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), delegate(bool del) { }); } else { FresviiGUIFrame framePairChat = ((GameObject)Instantiate(prfbGUIFramePairChat)).GetComponent<FresviiGUIFrame>(); framePairChat.transform.parent = this.transform; framePairChat.gameObject.GetComponent<FresviiGUIChat>().SetPairUser(this.user); framePairChat.Init(null, postFix, scaleFactor, this.GuiDepth - 1); framePairChat.SetDraw(true); framePairChat.PostFrame = this; this.tabBar.enabled = false; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), moveDelayTime, delegate() { this.SetDraw(false); }); framePairChat.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, moveDelayTime, delegate() { }); } } GUI.Label(messageLabelPosition, messageLabelContent, guiStyleButtonLabel); #endregion #region Call button #if GROUP_CONFERENCE if (!user.Official) { bool isCalling = FASConference.IsCalling(); Texture2D textureCall = (isCalling) ? textureIconCallD : textureIconCall; if (buttonMessage.IsTap(e, callButtonPosition, callButtonPosition, FresviiGUIButton.ButtonType.TextureOnly, textureCall, textureCall, textureCall)) { #if !UNITY_EDITOR if (isCalling) { Fresvii.AppSteroid.Util.DialogManager.Instance.SetLabel(FresviiGUIText.Get("OK"), FresviiGUIText.Get("Cancel"), FresviiGUIText.Get("Close")); Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("VoiceChatAlredayExists"), delegate(bool del) { }); return; } #endif if (Application.internetReachability == NetworkReachability.NotReachable) { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), delegate(bool del) { }); } else { 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, this.GuiDepth - 10); FASGroup.CreatePair(user.Id, delegate(Fresvii.AppSteroid.Models.Group group, Fresvii.AppSteroid.Models.Error error) { if (error != null) { loadingSpinner.Hide(); if (FASConfig.Instance.logLevel <= FAS.LogLevels.Error) { Debug.LogError("CreatePair : " + error.ToString()); } Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog("Error : CreatePair " + error.ToString(), delegate(bool del) { }); } else { loadingSpinner.Hide(); group.FetchMembers(delegate(Fresvii.AppSteroid.Models.Error error2) { if (error2 != null) { if (FASConfig.Instance.logLevel <= FAS.LogLevels.Error) { Debug.LogError("FetchMembers : " + error.ToString()); } Fresvii.AppSteroid.Util.DialogManager.Instance.SetLabel(FresviiGUIText.Get("OK"), FresviiGUIText.Get("Cancel"), FresviiGUIText.Get("Close")); if (error.Code == (int)Fresvii.AppSteroid.Models.Error.ErrorCode.NetworkNotReachable) { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), delegate(bool del) { }); } else { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(error.Detail, delegate(bool del) { }); } } else { OnCallButtonTapped(group); } }); } }); } } GUI.Label(callLabelPosition, callLabelContent, guiStyleButtonLabel); } #endif #endregion // User FriendTitleBar if (friendCountLabelContent != null) { GUI.DrawTextureWithTexCoords(friendMenuTitleBarPosition, palette, buttonFriendList.IsActive ? texCoordsFriendTitleBgH : texCoordsFriendTitleBg); GUI.Label(friendMenuTitleBarPosition, friendCountLabelContent, guiStyleFriendMenuTitle); GUI.DrawTexture(friendMenuRightIconPosition, textureRight); } #if UNITY_IOS // VideoTitleBar if (FASConfig.Instance.videoEnable) { GUI.DrawTextureWithTexCoords(videoTitleBarPosition, palette, buttonVideoList.IsActive ? texCoordsFriendTitleBgH : texCoordsFriendTitleBg); GUI.Label(videoTitleBarPosition, videoListLabelContent, guiStyleFriendMenuTitle); GUI.DrawTexture(videoRightIconPosition, textureRight); if (buttonVideoList.IsTap(e, videoTitleBarPosition)) { GoToVideoList(true); } } #endif if(buttonFriendList.IsTap(e, friendMenuTitleBarPosition)) { frameFriendList = ((GameObject)Instantiate(prfbFriendList)).GetComponent<FresviiGUIFrame>(); frameFriendList.transform.parent = this.transform; frameFriendList.gameObject.GetComponent<FresviiGUIFriendList>().SetUser(this.user); frameFriendList.Init(null, postFix, scaleFactor, this.GuiDepth - 1); frameFriendList.SetDraw(true); frameFriendList.PostFrame = this; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), delegate() { this.SetDraw(false); }); frameFriendList.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { }); } GUI.EndGroup(); GUI.EndGroup(); } }
void OnCallButtonTapped(Fresvii.AppSteroid.Models.Group group) { #if !UNITY_EDITOR if(group.MembersCount > 4) { Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("GroupConferenceMemberLimitation"), delegate(bool del) { }); return; } #endif ControlLock = true; frameGroupConference = ((GameObject)Instantiate(prfbGUIFrameGroupCall)).GetComponent<FresviiGUIGroupConference>(); frameGroupConference.gameObject.GetComponent<FresviiGUIGroupConference>().SetGroup(group); frameGroupConference.transform.parent = this.transform; frameGroupConference.PostFrame = this; frameGroupConference.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, this.GuiDepth - 10); frameGroupConference.SetDraw(true); frameGroupConference.Tween(new Vector2(0.0f, Screen.height), Vector2.zero, delegate() { this.SetDraw(false); ControlLock = false; }); }
public void OnCallButtonTapped() { if (Group == null) return; if (!(Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)) return; if(Group.MembersCount > 4) { Fresvii.AppSteroid.Util.DialogManager.Instance.SetLabel(FresviiGUIText.Get("OK"), FresviiGUIText.Get("Cancel"), FresviiGUIText.Get("Close")); Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("GroupConferenceMemberLimitation"), delegate(bool del) { }); return; } //DialogManager.Instance.SetLabel(FresviiGUIText.Get("Yes"), FresviiGUIText.Get("No"), FresviiGUIText.Get("Close")); Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSelectDialog(FresviiGUIText.Get("ConfirmToCall"), FresviiGUIText.Get("Yes"), FresviiGUIText.Get("No"), (del)=> //DialogManager.Instance.ShowSelectDialog(FresviiGUIText.Get("ConfirmToCall"), delegate(bool del) { if (del) { ControlLock = true; frameGroupConference = ((GameObject)Instantiate(prfbGUIFrameGroupCall)).GetComponent<FresviiGUIGroupConference>(); frameGroupConference.gameObject.GetComponent<FresviiGUIGroupConference>().SetGroup(this.Group); frameGroupConference.transform.parent = this.transform; frameGroupConference.PostFrame = this; frameGroupConference.Init(FresviiGUIManager.appIcon, FresviiGUIManager.postFix, FresviiGUIManager.scaleFactor, this.GuiDepth - 10); frameGroupConference.SetDraw(true); frameGroupConference.Tween(new Vector2(0.0f, Screen.height), Vector2.zero, delegate() { this.SetDraw(false); ControlLock = false; frameGroupConference.ControlLock = false; }); } }); }
public void OnProfileTapped() { if (Group.Pair) { frameProfile = ((GameObject)Instantiate(prfbGUIFrameUserProfile)).GetComponent<FresviiGUIFrame>(); if (Other != null) { frameProfile.gameObject.GetComponent<FresviiGUIUserProfile>().SetUser(Other); } else { foreach (Fresvii.AppSteroid.Models.Member member in Group.Members) { if (member.Id != FAS.CurrentUser.Id) { Other = member.ToUser(); } } frameProfile.gameObject.GetComponent<FresviiGUIUserProfile>().SetUser(Other); } Debug.Log(Other.Id + ", " + Other.ProfileImageUrl); frameProfile.Init(null, postFix, scaleFactor, this.GuiDepth - 10); frameProfile.transform.parent = this.transform; frameProfile.SetDraw(true); frameProfile.PostFrame = this; this.Tween(Vector2.zero, new Vector2(-Screen.width, 0.0f), delegate() { this.SetDraw(false); }); frameProfile.Tween(new Vector2(Screen.width, 0.0f), Vector2.zero, delegate() { }); } }
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; }); }