public void Draw(float cardWidth) { if(deleteAnimationDone) return; if(Thread.User != null) { if (!string.IsNullOrEmpty(Thread.User.ProfileImageUrl) && userIcon == null && !userIconLoading) { LoadUserIcon(); } else if (userProfileUrl != Thread.User.ProfileImageUrl && !userIconLoading) { FresviiGUIManager.Instance.resourceManager.ReleaseTexture(userProfileUrl); LoadUserIcon(); } } menuButtonPosition = new Rect(cardWidth - menuButtonMargin - FresviiGUIForum.TexForumMenu.width, menuButtonMargin, FresviiGUIForum.TexForumMenu.width, FresviiGUIForum.TexForumMenu.height); menuButtonHitPosition = new Rect(cardWidth - 44f * scaleFactor, 0f, 44f * scaleFactor, 44f * scaleFactor); userNamePosition.width = cardWidth - userNamePosition.x - menuButtonHitPosition.width; SetUserName(); Rect drawPosition = GetPosition(); if (drawPosition.y + drawPosition.height < 0 || drawPosition.y > Screen.height) { return; } Event e = Event.current; Color origColor = GUI.color; GUI.color = new Color(origColor.r, origColor.g, origColor.b, cardAlpha); if ((!string.IsNullOrEmpty(Thread.Comment.ImageThumbnailUrl) || Thread.Comment.VideoState != Fresvii.AppSteroid.Models.Comment.VideoStatus.NA) && clipImage == null && !clipImageLoading) { ClipImageLoad(); } // Update proc if(Thread.User != null) { if (contentUserName.text != Thread.User.Name || preCardWidth != cardWidth) { SetUserName(); } } if (contentCommentText.text != Thread.Comment.Text || preCardWidth != cardWidth) { SetCommentText(cardWidth); } GUI.BeginGroup(position); // background GUI.DrawTextureWithTexCoords(new Rect(0, 0, position.width, position.height), palette, texCoordsLine); GUI.DrawTextureWithTexCoords(new Rect(position.width * 0.5f - lineWidth * 0.5f, position.height - bottomButtonHeight, lineWidth, bottomButtonHeight), palette, texCoordsLine); GUI.DrawTextureWithTexCoords(new Rect(0, 0, position.width, position.height - bottomButtonHeight - lineWidth), palette, texCoordsBackground); GUI.DrawTextureWithTexCoords(new Rect(0f, position.height - bottomButtonHeight, position.width, bottomButtonHeight), palette, texCoordsBackground); if(buttonUserIcon.IsTap(e, userIconHitPosition)) //if (buttonUserIcon.IsTap(e, userIconPosition, userIconHitPosition, FresviiGUIButton.ButtonType.TextureOnly, textureUserIcon, textureUserIcon, textureUserIcon)) { if(Application.internetReachability == NetworkReachability.NotReachable){ Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), FresviiGUIText.Get("OK"), FresviiGUIText.Get("OK"), FresviiGUIText.Get("OK"),delegate(bool del) { }); return; } if (frameProfile == null) { if (Thread.User.Id == FAS.CurrentUser.Id) { frameProfile = ((GameObject)Instantiate(prfbGUIFrameMyProfile)).GetComponent<FresviiGUIFrame>(); } else { frameProfile = ((GameObject)Instantiate(prfbGUIFrameUserProfile)).GetComponent<FresviiGUIFrame>(); frameProfile.gameObject.GetComponent<FresviiGUIUserProfile>().SetUser(Thread.User); } frameProfile.Init(null, postFix, scaleFactor, Forum.GuiDepth); frameProfile.transform.parent = this.transform; } Forum.GoToUserProfile(frameProfile); } // User Name GUI.Label(userNamePosition, contentUserName, guiStyleUserName); // Menu button if(buttonMenu.IsTap(e, menuButtonPosition, menuButtonHitPosition, FresviiGUIButton.ButtonType.TextureOnly, FresviiGUIForum.TexForumMenu, FresviiGUIForum.TexForumMenu, FresviiGUIForum.TexForumMenuH)) { List<string> buttons = new List<string>(); buttons.Add((IsSubscribed()) ? FresviiGUIText.Get("Unsubscribe") : FresviiGUIText.Get("Subscribe")); if(IsMine()) buttons.Add(FresviiGUIText.Get("Delete")); popUpBaloonMenu = ((GameObject)Instantiate(Resources.Load("GuiPrefabs/PopUpBalloonMenu"))).GetComponent<Fresvii.AppSteroid.Gui.PopUpBalloonMenu>(); Vector2 popupBalloonPosition = popUpOffset + new Vector2(scrollViewRect.x + menuButtonPosition.x, scrollViewRect.y - Forum.forumTopMenu.height + menuButtonPosition.y) + FresviiGUIFrame.OffsetPosition; popUpBaloonMenu.Show(buttons.ToArray(), popupBalloonPosition, scaleFactor, postFix, Forum.GuiDepth - 10, Color.black, Color.white, Color.white, delegate(string selectedButton) { if (selectedButton == FresviiGUIText.Get("Unsubscribe")) { this.Unsubscribe(); } else if (selectedButton == FresviiGUIText.Get("Subscribe")) { this.Subscribe(); } else if (selectedButton == FresviiGUIText.Get("Delete")) { this.DeleteThread(false); } }); } if (popUpBaloonMenu != null) { popUpBaloonMenu.SetPosition(popUpOffset + new Vector2(scrollViewRect.x + position.x + menuButtonPosition.x, scrollViewRect.y - Forum.forumTopMenu.height + position.y + menuButtonPosition.y + FresviiGUIFrame.OffsetPosition.y)); } // ----------------------- System.TimeSpan ts = Thread.CreateTimeSpan(); GUIContent contentTimeSpan; if (ts.Days > 1) contentTimeSpan = new GUIContent(ts.Days + " " + FresviiGUIText.Get("days") + FresviiGUIText.Get("ago")); else if (ts.Days > 0) contentTimeSpan = new GUIContent(ts.Days + " " + FresviiGUIText.Get("day") + FresviiGUIText.Get("ago")); else if (ts.Hours > 1) contentTimeSpan = new GUIContent(ts.Hours + " " + FresviiGUIText.Get("hours") + FresviiGUIText.Get("ago")); else if (ts.Hours > 0) contentTimeSpan = new GUIContent(ts.Hours + " " + FresviiGUIText.Get("hour") + FresviiGUIText.Get("ago")); else if (ts.Minutes > 1) contentTimeSpan = new GUIContent(ts.Minutes + " " + FresviiGUIText.Get("minutes") + FresviiGUIText.Get("ago")); else if (ts.Minutes > 0) contentTimeSpan = new GUIContent(ts.Minutes + " " + FresviiGUIText.Get("minute") + FresviiGUIText.Get("ago")); else contentTimeSpan = new GUIContent(FresviiGUIText.Get("now")); timespanPosition.width = guiStyleTimeSpan.CalcSize(contentTimeSpan).x; GUI.Label(timespanPosition, contentTimeSpan, guiStyleTimeSpan); likeCountIconPosition.x = timespanPosition.x + timespanPosition.width + margin; GUI.DrawTexture(likeCountIconPosition, FresviiGUIForum.TexForumLikeS); likeCountLabelPosition.x = likeCountIconPosition.x + FresviiGUIForum.TexForumLikeS.width + miniMargin; GUIContent contentLabelLikeCount = new GUIContent(Thread.Comment.LikeCount.ToString()); GUI.Label(likeCountLabelPosition, contentLabelLikeCount, guiStyleTimeSpan); commentCountIconPosition.x = likeCountLabelPosition.x + guiStyleTimeSpan.CalcSize(contentLabelLikeCount).x + margin; GUI.DrawTexture(commentCountIconPosition, FresviiGUIForum.TexForumCommentS); commentCountLabelPosition.x = commentCountIconPosition.x + FresviiGUIForum.TexForumCommentS.width + miniMargin; GUI.Label(commentCountLabelPosition, Thread.CommentCount.ToString(), guiStyleTimeSpan); // ----------------------- GUI.Label(commentTextPosition, contentCommentText, guiStyleCommentText); if (clipImage != null) { Color tmpColor = GUI.color; GUI.color = new Color(GUI.color.r, GUI.color.g, GUI.color.b, Mathf.Min(cardAlpha, clipAlpha)); clipImagePosition.x = drawPosition.width * 0.5f - imageHeight * 0.5f; clipImagePosition.width = clipImagePosition.height = imageHeight; GUI.DrawTexture(clipImagePosition, clipImage, ScaleMode.ScaleAndCrop); GUI.color = tmpColor; if (IsVideo && clipAlpha >= 0.9f && Thread.Comment.VideoState != Fresvii.AppSteroid.Models.Comment.VideoStatus.Removed) { videoPlaybackIconPosition = new Rect(clipImagePosition.x + 0.4f * clipImagePosition.width, clipImagePosition.y + 0.4f * clipImagePosition.height, 0.2f * clipImagePosition.width, 0.2f * clipImagePosition.height); GUI.DrawTexture(videoPlaybackIconPosition, FresviiGUIForum.TexVideoPlaybackIcon, ScaleMode.ScaleToFit); } if (dataUploading) { progressBarPosition = new Rect(clipImagePosition.x, clipImagePosition.y + clipImagePosition.height - scaleFactor * 1.0f, clipImagePosition.width * dataUploadingProgress, scaleFactor * 1.0f); GUI.DrawTextureWithTexCoords(progressBarPosition, palette, texCoodsProgressBar); } } // Line //GUI.DrawTextureWithTexCoords(new Rect(0, position.height - bottomButtonHeight - lineWidth, position.width, lineWidth), palette, texCoordsLine); // Comment button if (!string.IsNullOrEmpty(Thread.Id)) { Texture2D texComenntButton = FresviiGUIForum.TexForumCommentL; Rect commentButtonPosition = new Rect(position.width * 0.25f - texComenntButton.width * 0.5f, position.height - 0.5f * bottomButtonHeight - texComenntButton.height * 0.5f, texComenntButton.width, texComenntButton.height); Rect commentButtonHitPosition = new Rect(0f, position.height - bottomButtonHeight, position.width * 0.5f, bottomButtonHeight); if (buttonComment.IsTap(e, commentButtonPosition, commentButtonHitPosition, FresviiGUIButton.ButtonType.TextureOnly, FresviiGUIForum.TexForumCommentL, FresviiGUIForum.TexForumCommentL, FresviiGUIForum.TexForumCommentLH)) { if (frameThread == null) { frameThread = ((GameObject)Instantiate(prfbGUIFrameThread)).GetComponent<FresviiGUIThread>(); frameThread.SetThread(this); frameThread.Init(null, postFix, scaleFactor, Forum.GuiDepth); frameThread.transform.parent = this.transform; } Forum.GoToThread(frameThread, true); } } Texture2D texLikeButton = (isLike) ? FresviiGUIForum.TexForumLikeLH : FresviiGUIForum.TexForumLikeL; Rect likeButtonHitPosition = new Rect(position.width * 0.5f, position.height - bottomButtonHeight, position.width * 0.5f, bottomButtonHeight); Rect likeButtonPosition = new Rect(position.width * 0.75f - texLikeButton.width * 0.5f, position.height - 0.5f * bottomButtonHeight - texLikeButton.height * 0.5f, texLikeButton.width, texLikeButton.height); if(buttonLike.IsTap(e, likeButtonPosition, likeButtonHitPosition, FresviiGUIButton.ButtonType.TextureOnly, texLikeButton, texLikeButton, texLikeButton)) { isLike = !isLike; if (isLike) { Thread.Comment.LikeCount++; StartCoroutine(ThreadLikeCoroutine()); } else { if (Thread.Comment.LikeCount > 0) Thread.Comment.LikeCount--; StartCoroutine(ThreadUnlikeCoroutine()); } if (frameThread != null) { if (frameThread.Thread.Id == Thread.Id) { if (frameThread.cards.Count > 0) { frameThread.cards[0].isLike = isLike; if (isLike) { frameThread.cards[0].Comment.LikeCount++; } else { if (frameThread.cards[0].Comment.LikeCount > 0) { frameThread.cards[0].Comment.LikeCount--; } } } } } } // Line GUI.DrawTextureWithTexCoords(new Rect(position.width * 0.5f - lineWidth * 0.5f, position.height - bottomButtonHeight, lineWidth, bottomButtonHeight), palette, texCoordsLine); if (buttonCard.IsTap(e, new Rect(0, 0, position.width, position.height)) && !string.IsNullOrEmpty(Thread.Id)) { if(Application.internetReachability == NetworkReachability.NotReachable){ Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSubmitDialog(FresviiGUIText.Get("Offline"), FresviiGUIText.Get("OK"), FresviiGUIText.Get("OK"), FresviiGUIText.Get("OK"),delegate(bool del) { }); return; } if (frameThread == null) { frameThread = ((GameObject)Instantiate(prfbGUIFrameThread)).GetComponent<FresviiGUIThread>(); frameThread.SetThread(this); frameThread.Init(null, postFix, scaleFactor, Forum.GuiDepth); frameThread.transform.parent = this.transform; } else { frameThread.gameObject.SetActive(true); } Forum.GoToThread(frameThread, true); } // User Icon if (Event.current.type == EventType.Repaint) { userIconMaterial.color = new Color(1f, 1f, 1f, cardAlpha); Graphics.DrawTexture(userIconPosition, ((userIcon == null) ? userIconDefault : userIcon), userIconMaterial); } GUI.EndGroup(); GUI.color = origColor; preCardWidth = cardWidth; }
void OnGUI() { Event e = Event.current; GUI.depth = GuiDepth; GUI.DrawTextureWithTexCoords(new Rect(0, menuRect.y + menuRect.height, Screen.width, 1), palette, texCoordsBorderLine); // Mat GUI.DrawTextureWithTexCoords(menuRect, palette, texCoordsMenu); // Title GUI.Label(menuRect, title, guiStyleTitle); GUI.BeginGroup(menuRect); // BackIcon Color tempColor = GUI.color; GUI.color = normalColor; GUI.DrawTexture(backButtonPosition, backIcon); GUI.color = tempColor; if (e.type == EventType.MouseUp && backButtonHitPosition.Contains(e.mousePosition) && !FASGesture.IsDragging) { e.Use(); frameThread.BackToForum(); } GUI.Label(forumLabelPosition, forumLabelContent.text, guiStyleForumLabel); // NavIcon GUI.color = normalColor; GUI.DrawTexture(navButtonPosition, navDownIcon); GUI.color = tempColor; if (e.type == EventType.MouseUp && navButtonHitPosition.Contains(e.mousePosition) && !FASGesture.IsDragging) { e.Use(); Vector2 position = new Vector2(navButtonPosition.x, navButtonPosition.y); FresviiGUIThreadCard currentThreadCard = frameThread.threadCard; List<string> buttons = new List<string>(); buttons.Add((frameThread.threadCard.Thread.Subscribed) ? FresviiGUIText.Get("Unsubscribe") : FresviiGUIText.Get("Subscribe")); if (frameThread.threadCard.Thread.User.Id == FAS.CurrentUser.Id) { buttons.Add(FresviiGUIText.Get("Delete")); } popUpBaloonMenu = ((GameObject)Instantiate(Resources.Load("GuiPrefabs/PopUpBalloonMenu"))).GetComponent<Fresvii.AppSteroid.Gui.PopUpBalloonMenu>(); popUpBaloonMenu.Show(buttons.ToArray(), popUpOffset + position + FresviiGUIFrame.OffsetPosition, scaleFactor, postFix, this.GuiDepth - 10, Color.black, Color.white, Color.white, delegate(string selectedButton) { if (selectedButton == FresviiGUIText.Get("Unsubscribe")) { currentThreadCard.Unsubscribe(); } else if (selectedButton == FresviiGUIText.Get("Subscribe")) { currentThreadCard.Subscribe(); } else if (selectedButton == FresviiGUIText.Get("Delete")) { currentThreadCard.DeleteThread(true); } }); } if (popUpBaloonMenu != null) { popUpBaloonMenu.SetPosition(popUpOffset + new Vector2(navButtonPosition.x, navButtonPosition.y) + FresviiGUIFrame.OffsetPosition); } if (topMenuScrollResetButton.IsTap(e, menuRect)) { frameThread.ResetScrollPositionTween(); } GUI.EndGroup(); }
public void OnGUI() { GUI.depth = guiDepth; GUI.DrawTextureWithTexCoords(new Rect(menuRect.x, menuRect.height + menuRect.y, Screen.width, 1), palette, texCoordsBorderLine); editButtonPosition.x = Screen.width - editButtonPosition.width - hMargin; // Mat GUI.DrawTextureWithTexCoords(menuRect, palette, texCoordsMenu); GUI.BeginGroup(menuRect); // Title GUI.Label(titleRect, title, guiStyleTitle); if (!frameChat.IsModal) { Color tmpColor = GUI.color; GUI.color = colorNormal; GUI.DrawTexture(backButtonPosition, backIcon); GUI.color = tmpColor; Event e = Event.current; if (e.type == EventType.MouseUp && backButtonHitPosition.Contains(e.mousePosition) && !FASGesture.IsDragging && !frameChat.ControlLock) { e.Use(); frameChat.BackToPostFrame(); } Color tmp = GUI.color; GUI.color = iconColor; GUI.DrawTexture(navButtonPosition, navDownIcon); GUI.color = tmp; if (e.type == EventType.MouseUp && navButtonHitPosition.Contains(e.mousePosition) && !FASGesture.IsDragging && !frameChat.ControlLock) { e.Use(); Vector2 position = new Vector2(navButtonPosition.x, navButtonPosition.y); List<string> buttons = new List<string>(); if (enableEditMember) { buttons.Add(FresviiGUIText.Get("MemberList")); buttons.Add(FresviiGUIText.Get("Add")); } else { buttons.Add(FresviiGUIText.Get("Profile")); } #if GROUP_CONFERENCE if(!(frameChat.Group.Pair && frameChat.Group.Members[0].Official)) buttons.Add(FresviiGUIText.Get("Call")); #endif popUpBaloonMenu = ((GameObject)Instantiate(Resources.Load("GuiPrefabs/PopUpBalloonMenu"))).GetComponent<Fresvii.AppSteroid.Gui.PopUpBalloonMenu>(); popUpBaloonMenu.Show(buttons.ToArray(), popUpOffset + position + FresviiGUIFrame.OffsetPosition, scaleFactor, postFix, this.GuiDepth - 10, Color.grey, Color.white, Color.white, delegate(string selectedButton) { if (selectedButton == FresviiGUIText.Get("MemberList")) { frameChat.OnEditMemberTapped(); } else if (selectedButton == FresviiGUIText.Get("Add")) { frameChat.OnAddMemberTapped(); } else if (selectedButton == FresviiGUIText.Get("Profile")) { frameChat.OnProfileTapped(); } #if GROUP_CONFERENCE else if (selectedButton == FresviiGUIText.Get("Call")) { if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { if (FASConference.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; } frameChat.OnCallButtonTapped(); } } #endif }); } if (popUpBaloonMenu != null) { popUpBaloonMenu.SetPosition(popUpOffset + new Vector2(navButtonPosition.x, navButtonPosition.y) + FresviiGUIFrame.OffsetPosition); } } else { if (GUI.Button(doneButtonPosition, FresviiGUIText.Get("Done"), guiStyleDoneButton)) { frameChat.BackToPostFrame(); } } GUI.EndGroup(); }
public void Draw(Rect position, Rect scrollViewRect, int guiDepth, float topMenuHeight) { Color tmpColor = GUI.color; GUI.color = new Color(tmpColor.r, tmpColor.g, tmpColor.b, alpha); if (!string.IsNullOrEmpty(Video.ThumbnailUrl) && !thumbnailLoaded && !videoThumbnailLoading) { LoadVideoThumbnail(); } CalcLayout(position.width); GUI.BeginGroup(position); // Background GUI.DrawTextureWithTexCoords(new Rect(0, 0, position.width, position.height), palette, texCoordsBackground); // Progressbar if (downloading) { progressBarPosition = new Rect(0, position.height - FresviiGUIManager.Instance.ScaleFactor, position.width * downloadingProgress, FresviiGUIManager.Instance.ScaleFactor); GUI.DrawTextureWithTexCoords(progressBarPosition, palette, texCoordsProgressBar); } if (Event.current.type == EventType.Repaint) { if (videoThumbnail != null) { videoThumbnailMaterial.color = new Color(1f, 1f, 1f, alpha); if(videoThumbnail.width > videoThumbnail.height) { Vector2 offset = new Vector2((float)(videoThumbnail.width - videoThumbnail.height) / (float)videoThumbnail.width * 0.5f, 0f); Vector2 scale = new Vector2( 1.0f - offset.x * 2f, 1.0f); videoThumbnailMaterial.mainTextureOffset = offset; videoThumbnailMaterial.mainTextureScale = scale; } else { Vector2 offset = new Vector2(0f, (float)(videoThumbnail.height - videoThumbnail.width) /(float) videoThumbnail.height * 0.5f); Vector2 scale = new Vector2(1.0f, 1.0f - offset.y * 2f); videoThumbnailMaterial.mainTextureOffset = offset; videoThumbnailMaterial.mainTextureScale = scale; } Graphics.DrawTexture(videoThumbnailPosition, videoThumbnail, videoThumbnailMaterial); //GUI.DrawTexture(videoThumbnailPosition, videoThumbnail, ScaleMode.ScaleAndCrop); } } GUI.DrawTexture(videoPlaybackIconPositon, FresviiGUIVideoList.TexVideoPlaybackIcon, ScaleMode.StretchToFill); // videoTitle ----------------------- GUI.Label(videoTitlePosition, contentVideoTitle, guiStyleVideoTitle); GUI.Label(uplodedDateTimePosition, contentUpdatedDateTime, guiStyleUpdatedDateTime); GUI.Label(durationPosition, contentDuration, guiStyleUpdatedDateTime); GUI.DrawTexture(watchedIconPosition, FresviiGUIVideoList.TexVideoEyeIcon); GUI.Label(watchedCountPosition, contentPlaybackCount, guiStyleUpdatedDateTime); GUI.DrawTexture(likeIconPosition, FresviiGUIVideoList.TexVideoHeartIcon); GUI.Label(likeCountPositon, contentLikeCount, guiStyleUpdatedDateTime); if (buttonShare.IsTap(Event.current, videoShareButtonPosition, videoShareButtonPosition, FresviiGUIButton.ButtonType.FrameAndLabel, FresviiGUIVideoList.TexButtonShare, FresviiGUIVideoList.TexButtonShareH, FresviiGUIVideoList.TexButtonShareH, (mode == FresviiGUIVideoList.Mode.Share || mode == FresviiGUIVideoList.Mode.FromUploded) ? FresviiGUIText.Get("Share") : FresviiGUIText.Get("Select"), guiStyleButtonShare)) { isSelected = true; if (mode == FresviiGUIVideoList.Mode.Share || mode == FresviiGUIVideoList.Mode.FromUploded) { parentFrame.Share(Video, videoThumbnail); } else if (mode == FresviiGUIVideoList.Mode.Select) { parentFrame.Select(Video, videoThumbnail); } } if (GUI.Button(videoThumbnailPosition, "", GUIStyle.none)) { FASVideo.Play(Video.VideoUrl); FASVideo.IncrementVideoPlaybackCount(Video.Id, (video, error) => { if (error == null) { Video = video; } }); } // Menu button if (parentFrame.IsMine) { if (buttonMenu.IsTap(Event.current, menuButtonPosition, menuButtonHitPosition, FresviiGUIButton.ButtonType.TextureOnly, FresviiGUIVideoList.TexMenu, FresviiGUIVideoList.TexMenu, FresviiGUIVideoList.TexMenuH)) { List<string> buttons = new List<string>(); if(!downloading) buttons.Add(FresviiGUIText.Get("CopyToCameraRoll")); buttons.Add(FresviiGUIText.Get("Delete")); popUpBaloonMenu = ((GameObject)Instantiate(Resources.Load("GuiPrefabs/PopUpBalloonMenu"))).GetComponent<Fresvii.AppSteroid.Gui.PopUpBalloonMenu>(); Vector2 popupBalloonPosition = popUpOffset + new Vector2(scrollViewRect.x + menuButtonPosition.x, scrollViewRect.y - topMenuHeight + menuButtonPosition.y) + FresviiGUIFrame.OffsetPosition; popUpBaloonMenu.Show(buttons.ToArray(), popupBalloonPosition, FresviiGUIManager.scaleFactor, FresviiGUIManager.postFix, guiDepth - 10, Color.black, Color.white, Color.white, delegate(string selectedButton) { if (selectedButton == FresviiGUIText.Get("CopyToCameraRoll")) { downloading = true; FASVideo.DownloadAndCopyToAlbum(Video.VideoUrl, () => { downloading = false; } , (progress) => { downloadingProgress = progress; } ); } else if (selectedButton == FresviiGUIText.Get("Delete")) { Fresvii.AppSteroid.Util.DialogManager.Instance.SetLabel(FresviiGUIText.Get("Delete"), FresviiGUIText.Get("Cancel"), FresviiGUIText.Get("Close")); Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSelectDialog(FresviiGUIText.Get("ConfirmDeleteVideo"), delegate(bool del) { if (del) { parentFrame.DeleteVideo(this); } }); } }); } } if (popUpBaloonMenu != null) { popUpBaloonMenu.SetPosition(popUpOffset + new Vector2(scrollViewRect.x + position.x + menuButtonPosition.x, scrollViewRect.y - topMenuHeight + position.y + menuButtonPosition.y + FresviiGUIFrame.OffsetPosition.y)); } GUI.EndGroup(); GUI.color = tmpColor; }