Example #1
0
    protected override void Awake()
    {
        base.Awake();
        //get component
        manorExpProgress = transform.Find("Manor/exp").GetComponent <UIProgressBar>();
        levelLabel       = transform.Find("Manor/level").GetComponent <UILabel>();
        IDLabel          = transform.Find("Manor/idlabel").GetComponent <UILabel>();
        mailTagLabel     = transform.Find("Mail/point/num").GetComponent <UILabel>();
        nameLabel        = transform.Find("Manor/name").GetComponent <UILabel>();
        mailTagGo        = transform.Find("Mail/point").gameObject;
        tableView        = transform.Find("Eventinfo/panel/tableview").GetComponent <NTableView>();
        //bind event
        UIButton button = transform.Find("News").GetComponent <UIButton>();

        button.onClick.Add(new EventDelegate(OnNews));
        button = transform.Find("Mail").GetComponent <UIButton>();
        button.onClick.Add(new EventDelegate(OnMail));
        button = transform.Find("ranking").GetComponent <UIButton>();
        button.onClick.Add(new EventDelegate(OnRanking));

        userPackage = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_User) as UserPackage;
        mailPackage = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_Mail) as MailPackage;

        FacadeSingleton.Instance.RegisterRPCResponce((short)Cmd.GETMESSAGETAG, OnGetMessgeTag);
        FacadeSingleton.Instance.RegisterEvent("RefreshMailTag", RefreshMailTag);
        FacadeSingleton.Instance.RegisterEvent("RefreshManorLevel", InitView);
        FacadeSingleton.Instance.RegisterEvent("RefreshEvent", ShowEventIcon);
    }
Example #2
0
    protected override void Awake()
    {
        base.Awake();
        contentLabel            = transform.Find("board/panel/label").GetComponent <UILabel>();
        scrollView              = transform.Find("board/panel").GetComponent <UIScrollView>();
        sanctuaryPackage        = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_Sanctuary) as SanctuaryPackage;
        mailPackage             = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_Mail) as MailPackage;
        userPackage             = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_User) as UserPackage;
        playerViewList[0].name  = transform.Find("grid/player0/name").GetComponent <UILabel>();
        playerViewList[1].name  = transform.Find("grid/player1/name").GetComponent <UILabel>();
        playerViewList[2].name  = transform.Find("grid/player2/name").GetComponent <UILabel>();
        playerViewList[3].name  = transform.Find("grid/player3/name").GetComponent <UILabel>();
        playerViewList[0].level = transform.Find("grid/player0/level").GetComponent <UILabel>();
        playerViewList[1].level = transform.Find("grid/player1/level").GetComponent <UILabel>();
        playerViewList[2].level = transform.Find("grid/player2/level").GetComponent <UILabel>();
        playerViewList[3].level = transform.Find("grid/player3/level").GetComponent <UILabel>();
        playerViewList[0].blood = transform.Find("grid/player0/health").GetComponent <UIProgressBar>();
        playerViewList[1].blood = transform.Find("grid/player1/health").GetComponent <UIProgressBar>();
        playerViewList[2].blood = transform.Find("grid/player2/health").GetComponent <UIProgressBar>();
        playerViewList[3].blood = transform.Find("grid/player3/health").GetComponent <UIProgressBar>();
        //bind event
        UIButton button = transform.Find("closebtn").GetComponent <UIButton>();

        button.onClick.Add(new EventDelegate(Close));
        FacadeSingleton.Instance.RegisterEvent("OpenInvadeResult", OpenInvadeResult);
    }
Example #3
0
    // Use this for initialization
    protected override void Awake()
    {
        nameLabel    = transform.Find("content/title").GetComponent <UILabel>();
        contentLabel = transform.Find("content/text").GetComponent <UILabel>();
        zombieNum    = transform.Find("content/num").GetComponent <UILabel>();
        zombiePower  = transform.Find("content/power").GetComponent <UILabel>();
        timeLabel    = transform.Find("time/receivetime").GetComponent <UILabel>();
        replayBtn    = transform.Find("replaybtn").GetComponent <UIButton>();
        replayBtn.onClick.Add(new EventDelegate(OnReplay));
        pointGo     = transform.Find("point").gameObject;
        mailPackage = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_Mail) as MailPackage;

        UIButton button = GetComponent <UIButton>();

        button.onClick.Add(new EventDelegate(OnClick));
    }
Example #4
0
    protected override void Awake()
    {
        base.Awake();
        UIButton button = transform.Find("closebtn").GetComponent <UIButton>();

        button.onClick.Add(new EventDelegate(Close));
        button = transform.Find("index/next").GetComponent <UIButton>();
        button.onClick.Add(new EventDelegate(OnNextPage));
        button = transform.Find("index/pre").GetComponent <UIButton>();
        button.onClick.Add(new EventDelegate(OnPrePage));
        indexLabel = transform.Find("index/label").GetComponent <UILabel>();
        tableView  = transform.Find("mailview/panel/tableview").GetComponent <NTableView>();

        FacadeSingleton.Instance.RegisterRPCResponce((short)Cmd.GETPAGECOUNT, OnGetPageCount);
        FacadeSingleton.Instance.RegisterRPCResponce((short)Cmd.GETPAGELIST, OnGetPageList);
        userPackage = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_User) as UserPackage;
        mailPackage = FacadeSingleton.Instance.RetrieveData(ConstVal.Package_Mail) as MailPackage;
    }
Example #5
0
            public static MailPackage CreateFromXml(System.Xml.XmlElement n, Roar.DataConversion.IXCRMParser ixcrm_parser)
            {
                MailPackage retval = new MailPackage();

                retval.id          = n.GetAttribute("id");
                retval.type        = n.GetAttribute("type");
                retval.sender_id   = n.GetAttribute("sender_id");
                retval.sender_name = n.GetAttribute("sender_name");
                retval.message     = n.GetAttribute("message");
                System.Xml.XmlNodeList item_nodes = n.SelectNodes("./item");
                foreach (System.Xml.XmlElement item_node in item_nodes)
                {
                    retval.items.Add(InventoryItem.CreateFromXml(item_node, ixcrm_parser));
                }
                retval.tags      = ixcrm_parser.ParseTagList(n);
                retval.modifiers = ixcrm_parser.ParseModifierList(n.SelectSingleNode("./modifiers") as System.Xml.XmlElement);
                return(retval);
            }
Example #6
0
    protected override void DrawGUI(int windowId)
    {
        if (!IsLoggedIn) return;
        if (isFetching)
        {
            GUI.Label(new Rect(this.bounds.width/2f - 256,this.bounds.height/2f - 32,512,64), "Fetching Gifts...", "StatusNormal");
            return;
        }

        if( gifts==null)
        {
            GUI.Label(new Rect(this.bounds.width/2f - 256,this.bounds.height/2f - 32,512,64), "Error loading Gifts...", "StatusError");
            return;
        }

        float heightSoFar = 0;
        Rect currentRect = new Rect(interColumnSeprators, heightSoFar, fromColumnWidth, divideHeight);

        if(section == Section.Normal)
        {
            GUI.Box(new Rect(0, 0, contentBounds.width, divideHeight), new GUIContent(""), "DefaultSeparationBar");
            GUI.Label ( currentRect, "FROM", "DefaultSeparationBarText");
            currentRect.x += interColumnSeprators + fromColumnWidth;

            GUI.Label ( currentRect, "MESSAGE", "DefaultSeparationBarText");
            currentRect.x += interColumnSeprators + messageColumnWidth;

            GUI.Label ( currentRect, "TYPE", "DefaultSeparationBarText");
            currentRect.x += interColumnSeprators + typeColumnWidth;
            currentRect.x = interColumnSeprators;
            currentRect.y += divideHeight;
            currentRect.height = sectionHeight;

            internalScrollSize = GUI.BeginScrollView(new Rect(currentRect.x, currentRect.y, contentBounds.width, contentBounds.height - currentRect.y - verticalSeparators - labelHeight*2 -footerSpacing), internalScrollSize,
                new Rect(currentRect.x, currentRect.y, contentBounds.width - interColumnSeprators*2, sectionHeight*mailDict.Count));
            foreach (KeyValuePair<string,Roar.DomainObjects.MailPackage> f in mailDict)
            {
                currentRect.width = fromColumnWidth;
                GUI.Label(currentRect,  f.Value.sender_name, playerIdFormat );
                currentRect.x += interColumnSeprators + fromColumnWidth;
                currentRect.width = messageColumnWidth;
                GUI.Label(currentRect, f.Value.message, messageFormat );
                currentRect.x += interColumnSeprators + messageColumnWidth;
                currentRect.width = typeColumnWidth;
                GUI.Label(currentRect, f.Value.type, typeFormat );
                currentRect.x += interColumnSeprators + typeColumnWidth;

                currentRect.width = buttonWidth;
                currentRect.height = buttonHeight;
                if(GUI.Button(currentRect, "Open", buttonFormat))
                {
                    statusString = "";
                    mailBeingRead = f.Value;
                    section = Section.ReadingMail;
                    drawSubheading = true;
                    subheaderName = f.Value.sender_name+"'s Message";
                }
                currentRect.x = interColumnSeprators;

                currentRect.y += sectionHeight;
            }
            GUI.EndScrollView();

            currentRect.y += verticalSeparators;
            currentRect.width = contentBounds.width - interColumnSeprators*2;
            currentRect.height = labelHeight *2;

            GUI.Label(currentRect, statusString, "DefaultSmallStatusText");

            GUI.Box(new Rect(0, contentBounds.height - footerSpacing, contentBounds.width, footerSpacing), new GUIContent(""), "DefaultFooterStyle");
            currentRect.x = interColumnSeprators;
            currentRect.y = contentBounds.height - footerSpacing/2 - buttonHeight/2;
            currentRect.width = buttonWidth;
            currentRect.height = buttonHeight;

            if(GUI.Button(currentRect, "Send Gift", "DefaultButton"))
            {
                statusString = "";
                FetchMailable();
                section = Section.SendingMail;
                drawSubheading = true;
                subheaderName = "Send Gift";
            }
        }

        if(section == Section.ReadingMail)
        {
            currentRect.width = contentBounds.width;
            currentRect.height = divideHeight;
            currentRect.x = 0;
            GUI.Label(currentRect, statusString, "DefaultSmallStatusText");
            currentRect.y += divideHeight;

            currentRect.y += divideHeight;
            currentRect.x = interColumnSeprators;
            currentRect.width = 3*labelWidth + 2*interColumnSeprators;
            currentRect.height = labelHeight;

            GUI.Label(currentRect, "From: " + mailBeingRead.sender_name +"("+mailBeingRead.sender_id+")");
            currentRect.width = contentBounds.width - interColumnSeprators;
            currentRect.y += labelHeight;
            GUI.Label(currentRect, "Message: ", "DefaultLabel");
            currentRect.x += labelWidth+interColumnSeprators;
            currentRect.width = contentBounds.width - interColumnSeprators;
            GUI.Label(currentRect, mailBeingRead.message, "DefaultLabel");

            currentRect.y += labelHeight;
            currentRect.x = interColumnSeprators;

            CRMVisitor<string> visitorObject = new RoarTasksWidget.CRMToString();
            string modifierString = "Modifiers: \n";
            foreach(Modifier m in mailBeingRead.modifiers)
                modifierString += visitorObject.visit_modifier(m)+"\n";

            if(mailBeingRead.modifiers.Count == 0)
                modifierString += "None";

            Vector2 size = GUI.skin.FindStyle("DefaultLabel").CalcSize(new GUIContent(modifierString));

            currentRect.width = size.x;
            currentRect.height = size.y;
            GUI.Label(currentRect, modifierString, "DefaultLabel");

            currentRect.y += currentRect.height+verticalSeparators;
            currentRect.x = interColumnSeprators;

            string itemsString = "Items: \n";

            foreach(InventoryItem m in mailBeingRead.items)
                itemsString += m.label;

            Vector2 itemSize = GUI.skin.FindStyle("DefaultLabel").CalcSize(new GUIContent(itemsString));
            currentRect.width = itemSize.x;
            currentRect.height = itemSize.y;
            GUI.Label(currentRect, itemsString, "DefaultLabel");

            currentRect.y += currentRect.height+verticalSeparators;
            currentRect.x = interColumnSeprators;

            currentRect.width = buttonWidth;
            currentRect.height = buttonHeight;
            if(GUI.Button(currentRect, "Accept", "DefaultButton"))
            {
                gifts.AcceptGift(mailBeingRead.id, onRoarGiftsGiftAccepted);
                networkActionInProgress = true;
            }

            currentRect.x += buttonWidth + interColumnSeprators;
            if(GUI.Button(currentRect, "Back", "DefaultButton"))
            {
                statusString = "";
                drawSubheading = false;
                section = Section.Normal;
            }
            currentRect.x += interColumnSeprators + typeColumnWidth;
        }

        if(section == Section.SendingMail)
        {
            currentRect.y += verticalSeparators;
            currentRect.width = contentBounds.width;
            currentRect.height = divideHeight;
            currentRect.x = 0;
            GUI.Label(currentRect, statusString, "DefaultSmallStatusText");
            currentRect.y += divideHeight;

            currentRect.x = interColumnSeprators;
            currentRect.width = labelWidth;
            currentRect.height = labelHeight;
            GUI.Label(currentRect,"To: (PlayerID)");
            currentRect.x += labelWidth + interColumnSeprators;
            currentRect.width = contentBounds.width- currentRect.x  - interColumnSeprators - selectButtonWidth;
            currentRect.height = textBoxHeight;
            playerIdToSendTo = GUI.TextField(currentRect, playerIdToSendTo, "DefaultTextArea");
            currentRect.x += contentBounds.width- currentRect.x  - interColumnSeprators - selectButtonWidth;
            currentRect.width = selectButtonWidth;
            if(GUI.Button(currentRect, "?", "DefaultButton"))
            {
                Debug.Log("going");
                System.Action<string> act = (pid) => {
                    playerIdToSendTo = pid;
                };
                GameObject.Find("/PlayerSelectionWidget").SendMessage("setCallbackAndEnable", act);
            }
            currentRect.y += labelHeight+verticalSeparators;
            currentRect.x = interColumnSeprators;
            currentRect.width = labelWidth;
            currentRect.height = labelHeight;
            GUI.Label(currentRect, "Message: ", "DefaultLabel");
            currentRect.x += labelWidth + interColumnSeprators;
            currentRect.width = contentBounds.width -currentRect.x  - interColumnSeprators;
            currentRect.height = messageBoxHeight;
            messageToSend = GUI.TextArea(currentRect, messageToSend, "DefaultBigMessageBox");

            currentRect.y += messageBoxHeight+verticalSeparators;
            currentRect.x = interColumnSeprators;
            currentRect.width = buttonWidth;
            currentRect.height = buttonHeight;

            if(GUI.Button(currentRect, "Send", "DefaultButton"))
            {
                if(selectedMailable == null)
                {
                    statusString = "Please select an item to send with your gift";
                }
                else
                {
                    networkActionInProgress = true;
                    gifts.SendGift(playerIdToSendTo, selectedMailable.id, messageToSend, onRoarGiftsGiftSent);
                }
            }

            currentRect.x += buttonWidth + interColumnSeprators;
            if(GUI.Button(currentRect, "Back", "DefaultButton"))
            {
                statusString = "";
                drawSubheading = false;
                section = Section.Normal;
            }
            currentRect.x = interColumnSeprators;
            currentRect.y+= buttonHeight+verticalSeparators;
            internalScrollSize = GUI.BeginScrollView(new Rect(currentRect.x, currentRect.y, contentBounds.width, contentBounds.height - currentRect.y), internalScrollSize,
                new Rect(currentRect.x, currentRect.y, contentBounds.width - interColumnSeprators*2, sectionHeight*mailableDict.Count));

            foreach (KeyValuePair<string,Roar.DomainObjects.Mailable> f in mailableDict)
            {
                currentRect.width = fromColumnWidth;
                GUI.Label(currentRect,  f.Value.label, playerIdFormat );
                currentRect.x += interColumnSeprators + fromColumnWidth;
                currentRect.width = messageColumnWidth;
                GUI.Label(currentRect, f.Value.type, messageFormat );
                currentRect.x += interColumnSeprators + messageColumnWidth;

                if(GUI.Toggle(currentRect, (selectedMailable == f.Value)?true:false,"Select"))
                {
                    selectedMailable = f.Value;
                }
                currentRect.x = interColumnSeprators;

                currentRect.y += sectionHeight;
            }
            GUI.EndScrollView();
            currentRect.x += interColumnSeprators + typeColumnWidth;
        }
    }
Example #7
0
    protected override void DrawGUI(int windowId)
    {
        if (!IsLoggedIn)
        {
            return;
        }
        if (isFetching)
        {
            GUI.Label(new Rect(this.bounds.width / 2f - 256, this.bounds.height / 2f - 32, 512, 64), "Fetching Gifts...", "StatusNormal");
            return;
        }

        if (gifts == null)
        {
            GUI.Label(new Rect(this.bounds.width / 2f - 256, this.bounds.height / 2f - 32, 512, 64), "Error loading Gifts...", "StatusError");
            return;
        }

        float heightSoFar = 0;
        Rect  currentRect = new Rect(interColumnSeprators, heightSoFar, fromColumnWidth, divideHeight);

        if (section == Section.Normal)
        {
            GUI.Box(new Rect(0, 0, contentBounds.width, divideHeight), new GUIContent(""), "DefaultSeparationBar");
            GUI.Label(currentRect, "FROM", "DefaultSeparationBarText");
            currentRect.x += interColumnSeprators + fromColumnWidth;

            GUI.Label(currentRect, "MESSAGE", "DefaultSeparationBarText");
            currentRect.x += interColumnSeprators + messageColumnWidth;

            GUI.Label(currentRect, "TYPE", "DefaultSeparationBarText");
            currentRect.x     += interColumnSeprators + typeColumnWidth;
            currentRect.x      = interColumnSeprators;
            currentRect.y     += divideHeight;
            currentRect.height = sectionHeight;

            internalScrollSize = GUI.BeginScrollView(new Rect(currentRect.x, currentRect.y, contentBounds.width, contentBounds.height - currentRect.y - verticalSeparators - labelHeight * 2 - footerSpacing), internalScrollSize,
                                                     new Rect(currentRect.x, currentRect.y, contentBounds.width - interColumnSeprators * 2, sectionHeight * mailDict.Count));
            foreach (KeyValuePair <string, Roar.DomainObjects.MailPackage> f in mailDict)
            {
                currentRect.width = fromColumnWidth;
                GUI.Label(currentRect, f.Value.sender_name, playerIdFormat);
                currentRect.x    += interColumnSeprators + fromColumnWidth;
                currentRect.width = messageColumnWidth;
                GUI.Label(currentRect, f.Value.message, messageFormat);
                currentRect.x    += interColumnSeprators + messageColumnWidth;
                currentRect.width = typeColumnWidth;
                GUI.Label(currentRect, f.Value.type, typeFormat);
                currentRect.x += interColumnSeprators + typeColumnWidth;

                currentRect.width  = buttonWidth;
                currentRect.height = buttonHeight;
                if (GUI.Button(currentRect, "Open", buttonFormat))
                {
                    statusString   = "";
                    mailBeingRead  = f.Value;
                    section        = Section.ReadingMail;
                    drawSubheading = true;
                    subheaderName  = f.Value.sender_name + "'s Message";
                }
                currentRect.x = interColumnSeprators;

                currentRect.y += sectionHeight;
            }
            GUI.EndScrollView();

            currentRect.y     += verticalSeparators;
            currentRect.width  = contentBounds.width - interColumnSeprators * 2;
            currentRect.height = labelHeight * 2;

            GUI.Label(currentRect, statusString, "DefaultSmallStatusText");

            GUI.Box(new Rect(0, contentBounds.height - footerSpacing, contentBounds.width, footerSpacing), new GUIContent(""), "DefaultFooterStyle");
            currentRect.x      = interColumnSeprators;
            currentRect.y      = contentBounds.height - footerSpacing / 2 - buttonHeight / 2;
            currentRect.width  = buttonWidth;
            currentRect.height = buttonHeight;

            if (GUI.Button(currentRect, "Send Gift", "DefaultButton"))
            {
                statusString = "";
                FetchMailable();
                section        = Section.SendingMail;
                drawSubheading = true;
                subheaderName  = "Send Gift";
            }
        }

        if (section == Section.ReadingMail)
        {
            currentRect.width  = contentBounds.width;
            currentRect.height = divideHeight;
            currentRect.x      = 0;
            GUI.Label(currentRect, statusString, "DefaultSmallStatusText");
            currentRect.y += divideHeight;

            currentRect.y     += divideHeight;
            currentRect.x      = interColumnSeprators;
            currentRect.width  = 3 * labelWidth + 2 * interColumnSeprators;
            currentRect.height = labelHeight;

            GUI.Label(currentRect, "From: " + mailBeingRead.sender_name + "(" + mailBeingRead.sender_id + ")");
            currentRect.width = contentBounds.width - interColumnSeprators;
            currentRect.y    += labelHeight;
            GUI.Label(currentRect, "Message: ", "DefaultLabel");
            currentRect.x    += labelWidth + interColumnSeprators;
            currentRect.width = contentBounds.width - interColumnSeprators;
            GUI.Label(currentRect, mailBeingRead.message, "DefaultLabel");

            currentRect.y += labelHeight;
            currentRect.x  = interColumnSeprators;

            CRMVisitor <string> visitorObject = new RoarTasksWidget.CRMToString();
            string modifierString             = "Modifiers: \n";
            foreach (Modifier m in mailBeingRead.modifiers)
            {
                modifierString += visitorObject.visit_modifier(m) + "\n";
            }

            if (mailBeingRead.modifiers.Count == 0)
            {
                modifierString += "None";
            }

            Vector2 size = GUI.skin.FindStyle("DefaultLabel").CalcSize(new GUIContent(modifierString));

            currentRect.width  = size.x;
            currentRect.height = size.y;
            GUI.Label(currentRect, modifierString, "DefaultLabel");

            currentRect.y += currentRect.height + verticalSeparators;
            currentRect.x  = interColumnSeprators;

            string itemsString = "Items: \n";

            foreach (InventoryItem m in mailBeingRead.items)
            {
                itemsString += m.label;
            }

            Vector2 itemSize = GUI.skin.FindStyle("DefaultLabel").CalcSize(new GUIContent(itemsString));
            currentRect.width  = itemSize.x;
            currentRect.height = itemSize.y;
            GUI.Label(currentRect, itemsString, "DefaultLabel");

            currentRect.y += currentRect.height + verticalSeparators;
            currentRect.x  = interColumnSeprators;

            currentRect.width  = buttonWidth;
            currentRect.height = buttonHeight;
            if (GUI.Button(currentRect, "Accept", "DefaultButton"))
            {
                gifts.AcceptGift(mailBeingRead.id, onRoarGiftsGiftAccepted);
                networkActionInProgress = true;
            }

            currentRect.x += buttonWidth + interColumnSeprators;
            if (GUI.Button(currentRect, "Back", "DefaultButton"))
            {
                statusString   = "";
                drawSubheading = false;
                section        = Section.Normal;
            }
            currentRect.x += interColumnSeprators + typeColumnWidth;
        }

        if (section == Section.SendingMail)
        {
            currentRect.y     += verticalSeparators;
            currentRect.width  = contentBounds.width;
            currentRect.height = divideHeight;
            currentRect.x      = 0;
            GUI.Label(currentRect, statusString, "DefaultSmallStatusText");
            currentRect.y += divideHeight;

            currentRect.x      = interColumnSeprators;
            currentRect.width  = labelWidth;
            currentRect.height = labelHeight;
            GUI.Label(currentRect, "To: (PlayerID)");
            currentRect.x     += labelWidth + interColumnSeprators;
            currentRect.width  = contentBounds.width - currentRect.x - interColumnSeprators - selectButtonWidth;
            currentRect.height = textBoxHeight;
            playerIdToSendTo   = GUI.TextField(currentRect, playerIdToSendTo, "DefaultTextArea");
            currentRect.x     += contentBounds.width - currentRect.x - interColumnSeprators - selectButtonWidth;
            currentRect.width  = selectButtonWidth;
            if (GUI.Button(currentRect, "?", "DefaultButton"))
            {
                Debug.Log("going");
                System.Action <string> act = (pid) => {
                    playerIdToSendTo = pid;
                };
                GameObject.Find("/PlayerSelectionWidget").SendMessage("setCallbackAndEnable", act);
            }
            currentRect.y     += labelHeight + verticalSeparators;
            currentRect.x      = interColumnSeprators;
            currentRect.width  = labelWidth;
            currentRect.height = labelHeight;
            GUI.Label(currentRect, "Message: ", "DefaultLabel");
            currentRect.x     += labelWidth + interColumnSeprators;
            currentRect.width  = contentBounds.width - currentRect.x - interColumnSeprators;
            currentRect.height = messageBoxHeight;
            messageToSend      = GUI.TextArea(currentRect, messageToSend, "DefaultBigMessageBox");

            currentRect.y     += messageBoxHeight + verticalSeparators;
            currentRect.x      = interColumnSeprators;
            currentRect.width  = buttonWidth;
            currentRect.height = buttonHeight;

            if (GUI.Button(currentRect, "Send", "DefaultButton"))
            {
                if (selectedMailable == null)
                {
                    statusString = "Please select an item to send with your gift";
                }
                else
                {
                    networkActionInProgress = true;
                    gifts.SendGift(playerIdToSendTo, selectedMailable.id, messageToSend, onRoarGiftsGiftSent);
                }
            }

            currentRect.x += buttonWidth + interColumnSeprators;
            if (GUI.Button(currentRect, "Back", "DefaultButton"))
            {
                statusString   = "";
                drawSubheading = false;
                section        = Section.Normal;
            }
            currentRect.x      = interColumnSeprators;
            currentRect.y     += buttonHeight + verticalSeparators;
            internalScrollSize = GUI.BeginScrollView(new Rect(currentRect.x, currentRect.y, contentBounds.width, contentBounds.height - currentRect.y), internalScrollSize,
                                                     new Rect(currentRect.x, currentRect.y, contentBounds.width - interColumnSeprators * 2, sectionHeight * mailableDict.Count));

            foreach (KeyValuePair <string, Roar.DomainObjects.Mailable> f in mailableDict)
            {
                currentRect.width = fromColumnWidth;
                GUI.Label(currentRect, f.Value.label, playerIdFormat);
                currentRect.x    += interColumnSeprators + fromColumnWidth;
                currentRect.width = messageColumnWidth;
                GUI.Label(currentRect, f.Value.type, messageFormat);
                currentRect.x += interColumnSeprators + messageColumnWidth;

                if (GUI.Toggle(currentRect, (selectedMailable == f.Value)?true:false, "Select"))
                {
                    selectedMailable = f.Value;
                }
                currentRect.x = interColumnSeprators;

                currentRect.y += sectionHeight;
            }
            GUI.EndScrollView();
            currentRect.x += interColumnSeprators + typeColumnWidth;
        }
    }