示例#1
0
        public void AttribPage()
        {
            Title = "Attributes Selection";

            if (myNamePage != null)
            {
                myNamePage.Hide();
            }

            if (myAttribPage == null)
            {
                myAttribPage = new AttributeCreation(this, myOutput);
                AddChild(myAttribPage);
            }

            myAttribPage.Show();
            SetSize(myAttribPage.Width + PaddingLeft + PaddingRight, myAttribPage.Height + PaddingTop + PaddingBottom);
            Centre();
        }
示例#2
0
            public AttribRow(AttributeCreation parent, CharAttribute attrib, CharacterCreationOutput output)
            {
                myParent = parent;
                myOutput = output;

                myAttrib = attrib;

                myMinusButton = new UIButton(new Vector2(20, 20), new Vector2(LeftColumn, 0))
                {
                    Text       = "-",
                    CentreText = true
                };

                myPlusButton = new UIButton(new Vector2(20, 20), new Vector2(LeftColumn + RightColumn - 20, 0))
                {
                    Text       = "+",
                    CentreText = true
                };


                myLabel = new UILabel(Font.Large, new Vector2(0, 5))
                {
                    Text = attrib.ToString()
                };
                myValueLabel = new UILabel(Font.Large, new Vector2(LeftColumn + RightColumn / 2 - 10, 5))
                {
                    //Text = value.ToString()
                };

                AddChild(myMinusButton);
                AddChild(myPlusButton);
                AddChild(myLabel);
                AddChild(myValueLabel);

                Value = myOutput.GetAttributePoints(myAttrib);

                myMinusButton.Click += new MouseButtonEventHandler(myMinusButton_Click);
                myPlusButton.Click  += new MouseButtonEventHandler(myPlusButton_Click);
            }