示例#1
0
        private void DrawHeader(SpriteBatch sb, Rectangle dest)
        {
            int num1  = 4;
            int width = 200;

            sb.Draw(Utils.white, new Rectangle(dest.X + num1, dest.Y + 4, dest.Width - num1 * 2, 1), Color.White * 0.5f);
            Vector2 position = new Vector2((float)(dest.X + num1), (float)(dest.Y + 5));
            int     index    = 0;
            int     num2     = 7;

            while ((double)position.X + (double)(num2 * 2) < (double)(dest.X + dest.Width) && index < this.boardsListingString.Length)
            {
                sb.DrawString(GuiData.detailfont, string.Concat((object)this.boardsListingString[index]), position, Color.White * 0.6f);
                ++index;
                position.X += (float)num2;
            }
            sb.DrawString(GuiData.detailfont, "]", position, Color.White * 0.8f);
            try
            {
                if (this.BoardName == null)
                {
                    this.BoardName = this.name;
                }
                TextItem.doFontLabel(new Vector2((float)(dest.X + num1), (float)(dest.Y + 22)), this.BoardName, GuiData.font, new Color?(this.os.highlightColor), (float)(dest.Width - (width + 6 + 22)), (float)dest.Height, false);
            }
            catch (Exception ex)
            {
            }
            if (this.state != MessageBoardDaemon.MessageBoardState.Board && Button.doButton(1931655802, dest.X + dest.Width - width - 6, dest.Y + dest.Height / 2 - 4, width, 24, LocaleTerms.Loc("Back to Board"), new Color?(this.os.highlightColor)))
            {
                this.state = MessageBoardDaemon.MessageBoardState.Board;
            }
            sb.Draw(Utils.white, new Rectangle(dest.X + num1, dest.Y + dest.Height - 2, dest.Width - num1 * 2, 1), Color.White * 0.5f);
        }
示例#2
0
 public void ViewThread(MessageBoardThread thread, int width, int margin, int ImageSize, int headerOffset)
 {
     this.CurrentThreadHeight = 20;
     for (int index = 0; index < thread.posts.Count; ++index)
     {
         this.CurrentThreadHeight += this.MeasurePost(thread.posts[index], width, margin, ImageSize, headerOffset) + margin * 2;
     }
     this.state                = MessageBoardDaemon.MessageBoardState.Thread;
     this.viewingThread        = thread;
     this.ThreadScrollPosition = Vector2.Zero;
 }
示例#3
0
 public override void navigatedTo()
 {
     base.navigatedTo();
     this.state = MessageBoardDaemon.MessageBoardState.Board;
 }