Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3026

I am trying to change the text hue in this gump.

$
0
0
I am trying to change the text hue in this gump, i have made most the changes but cant figure out these two errors?
errors
virtuestatusgump.cs:cs1002: line 75, column 32) ; expected
virtuestatusgump.cs:cs1002: line 75, column 32) identifier expected

Code:

                case 1:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Humility", "Humility is perceiving one's place in the world, not according to one's own accomplishments, but according to the intrinsic value of all individuals. One gains Humility through helping young players.", m_Beholder.Virtues.Humility ) );
                    break;
                }

and here is the full script.
Code:

using System;
using Server;
using Server.Gumps;
using Server.Network;
 
namespace Server
{
    public class VirtueStatusGump : Gump
    {
        private Mobile m_Beholder;
 
        public VirtueStatusGump( Mobile beholder ) : base( 0, 0 )
        {
            m_Beholder = beholder;
 
            AddPage( 0 );
 
            AddImage( 30, 40, 2080 );
            AddImage( 47, 77, 2081 );
            AddImage( 47, 147, 2081 );
            AddImage( 47, 217, 2081 );
            AddImage( 47, 267, 2083 );
            AddImage( 70, 213, 2091 );
 
            AddPage( 1 );
 
//            AddHtml( 140, 73, 200, 20, "The Virtues", false, false );
            AddHtml( 140, 73, 200, 20, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "The Virtues" ), false, false );
 
//            AddHtmlLocalized( 80, 100, 100, 40, 1051000, false, false ); // Humility
            AddHtml( 80, 100, 100, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Humility" ), false, false );
//            AddHtmlLocalized( 80, 129, 100, 40, 1051001, false, false ); // Sacrifice
            AddHtml( 80, 129, 100, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Sacrifice" ), false, false );
//            AddHtmlLocalized( 80, 159, 100, 40, 1051002, false, false ); // Compassion
            AddHtml( 80, 159, 100, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Compassion" ), false, false );
//            AddHtmlLocalized( 80, 189, 100, 40, 1051003, false, false ); // Spirituality
            AddHtml( 80, 189, 100, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Spirituality" ), false, false );
//            AddHtmlLocalized( 200, 100, 200, 40, 1051004, false, false ); // Valor
            AddHtml( 200, 100, 200, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Valor" ), false, false );
//            AddHtmlLocalized( 200, 129, 200, 40, 1051005, false, false ); // Honor
            AddHtml( 200, 129, 200, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Honor" ), false, false );
//            AddHtmlLocalized( 200, 159, 200, 40, 1051006, false, false ); // Justice
            AddHtml( 200, 159, 200, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Justice" ), false, false );
//            AddHtmlLocalized( 200, 189, 200, 40, 1051007, false, false ); // Honesty
            AddHtml( 200, 189, 200, 40, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Honesty" ), false, false );
 
//            AddHtmlLocalized( 75, 224, 220, 60, 1052062, false, false ); // Click on a blue gem to view your status in that virtue.
            AddHtml( 75, 224, 220, 60, String.Format("<basefont color=#{0:X6}>{1}", System.Drawing.Color.LimeGreen.ToArgb(), "Click on a blue gem to view your status in that virtue." ), false, false );
 
            AddButton( 60, 100, 1210, 1210, 1, GumpButtonType.Reply, 0 );
            AddButton( 60, 129, 1210, 1210, 2, GumpButtonType.Reply, 0 );
            AddButton( 60, 159, 1210, 1210, 3, GumpButtonType.Reply, 0 );
            AddButton( 60, 189, 1210, 1210, 4, GumpButtonType.Reply, 0 );
            AddButton( 180, 100, 1210, 1210, 5, GumpButtonType.Reply, 0 );
            AddButton( 180, 129, 1210, 1210, 6, GumpButtonType.Reply, 0 );
            AddButton( 180, 159, 1210, 1210, 7, GumpButtonType.Reply, 0 );
            AddButton( 180, 189, 1210, 1210, 8, GumpButtonType.Reply, 0 );
 
            AddButton( 280, 43, 4014, 4014, 9, GumpButtonType.Reply, 0 );
        }
 
        public override void OnResponse( NetState state, RelayInfo info )
        {
            switch ( info.ButtonID )
            {
/*
                case 1:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051000, 1052051, m_Beholder.Virtues.Humility ) );
                    break;
                }
*/
                              case 1:
                              {
                                m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Humility", "Humility is perceiving one's place in the world, not according to one's own accomplishments, but according to the intrinsic value of all individuals. One gains Humility through helping young players.", m_Beholder.Virtues.Humility ) );
                                break;
                        }
/*
                case 2:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051001, 1052053, m_Beholder.Virtues.Sacrifice ) );
                    break;
                }
*/
                case 2:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Sacrifice", "Sacrifice is the courage to give of oneself in the name of love. One gains in Sacrifice by giving away their fame to certin monsters to save them from thier eternal torment.", m_Beholder.Virtues.Sacrifice ) );
                    break;
                }
/*
                case 3:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051002, 1053000, m_Beholder.Virtues.Compassion ) );
                    break;
                }
*/
                case 3:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Compassion", "Compassion is the nonjudgemental empathy for one's fellow creatures. You gain in Compassion by escorting NPCs and prisoners safely to their destinations.", m_Beholder.Virtues.Compassion ) );
                    break;
                }
/*
                case 4:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051003, 1052056, m_Beholder.Virtues.Spirituality ) );
                    break;
                }
*/
                case 4:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Spirituality", "Spirituality is the concern with one's inner being and how one deals with truth, love, and courage.", m_Beholder.Virtues.Spirituality ) );
                    break;
                }
/*
                case 5:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051004, 1054033, m_Beholder.Virtues.Valor ) );
                    break;
                }
*/
                case 5:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Valor", "Valor is the courage to take actions in support of one's convictions. You gain Valor by slaying creatures spawned in regions controlled by Champions of Evil.", m_Beholder.Virtues.Valor ) );
                    break;
                }
/*
                case 6:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051005, 1052058, m_Beholder.Virtues.Honor ) );
                    break;
                }
*/
                case 6:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Honor", "Honor is the courage to stand for truth, againts any odds.", m_Beholder.Virtues.Honor ) );
                    break;
                }
/*
                case 7:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051006, 1052059, m_Beholder.Virtues.Justice ) );
                    break;
                }
*/
                case 7:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Justice", "Justice is the devotion to truth, tempered by love.", m_Beholder.Virtues.Justice ) );
                    break;
                }
/*
                case 8:
                {
                    m_Beholder.SendGump( new VirtueInfoGump( m_Beholder, 1051007, 1052060, m_Beholder.Virtues.Honesty ) );
                    break;
                }
*/
                case 8:
                {
                    m_Beholder.SendGump String.Format( new VirtueInfoGump( m_Beholder, "Honesty", "Honesty is the scrupulous respect for truth, the willingness to never deceive oneself or another.", m_Beholder.Virtues.Honesty ) );
                    break;
                }
 
                case 9:
                {
                    m_Beholder.SendGump( new VirtueGump( m_Beholder, m_Beholder ) );
                    break;
                }
            }
        }
    }
}


Viewing all articles
Browse latest Browse all 3026

Trending Articles