Exemplo n.º 1
0
 void closeSwatch()
 {
     _isSwatchOpen = false;
     if (_openColorPicker != null)
     {
         _openColorPicker.Dispose();
         _openColorPicker = null;
     }
 }
Exemplo n.º 2
0
 void openSwatch()
 {
     _isSwatchOpen = true;
     if (_openColorPicker != null)
     {
         _openColorPicker.Dispose();
         _openColorPicker = null;
     }
     _openColorPicker = new ColorPicker(_owner, Page, _openArea, _hueSize.X, _hueSize.Y, _hues);
     _openColorPicker.OnMouseClick = onOpenSwatchClick;
     ((Gump)_owner).AddControl(_openColorPicker);
 }
Exemplo n.º 3
0
        public CreateCharAppearanceGump()
            : base(0, 0)
        {
            _renderFullScreen = false;
            // backdrop
            AddControl(new GumpPicTiled(this, 0, 0, 0, 640, 480, 9274));
            AddControl(new GumpPic(this, 0, 0, 0, 5500, 0));
            // character name
            AddControl(new GumpPic(this, 0, 280, 53, 1801, 0));
            _Name = new TextEntry(this, 0, 238, 70, 234, 20, 0, 0, 29, string.Empty);
            AddControl(new ResizePic(this, _Name));
            AddControl(_Name);
            // character window
            AddControl(new GumpPic(this, 0, 238, 98, 1800, 0));
            // paperdoll
            _paperdoll = new PaperdollLargeUninteractable(this, 0, 237, 97);
            _paperdoll.IsCharacterCreation = true;
            AddControl(_paperdoll);

            // left option window
            AddControl(new ResizePic(this, 0, 82, 125, 3600, 151, 310));
            // this is the place where you would put the race selector.
            // if you do add it, move everything else in this left window down by 45 pixels
            // gender
            AddControl(new TextLabelAscii(this, 1, 100, 141, 2037, 9, Data.StringList.Entry(3000120)));
            _Gender = new DropDownList(this, 0, 97, 154, 122, 0, 2, new string[] { Data.StringList.Entry(3000118), Data.StringList.Entry(3000119) }, false);
            AddControl(_Gender);
            // hair (male)
            AddControl(new TextLabelAscii(this, 1, 100, 186, 2037, 9, Data.StringList.Entry(3000121)));
            _HairMale = new DropDownList(this, 1, 97, 199, 122, 0, 6, Data.HairStyles.MaleHairNames, false);
            AddControl(_HairMale);
            // facial hair (male)
            AddControl(new TextLabelAscii(this, 1, 100, 231, 2037, 9, Data.StringList.Entry(3000122)));
            _FacialHairMale = new DropDownList(this, 1, 97, 244, 122, 0, 6, Data.HairStyles.FacialHair, false);
            AddControl(_FacialHairMale);
            // hair (female)
            AddControl(new TextLabelAscii(this, 2, 100, 186, 2037, 9, Data.StringList.Entry(3000121)));
            _HairFemale = new DropDownList(this, 2, 97, 199, 122, 0, 6, Data.HairStyles.FemaleHairNames, false);
            AddControl(_HairFemale);

            // right option window
            AddControl(new ResizePic(this, 0, 475, 125, 3600, 151, 310));
            // skin tone
            AddControl(new TextLabelAscii(this, 0, 489, 141, 2037, 9, Data.StringList.Entry(3000183)));
            _SkinHue = new ColorPicker(this, 0, new Rectangle(490, 154, 120, 24), new Rectangle(490, 140, 120, 280), 7, 8, Data.Hues.SkinTones);
            AddControl(_SkinHue);
            // hair color
            AddControl(new TextLabelAscii(this, 0, 489, 186, 2037, 9, Data.StringList.Entry(3000184)));
            _HairHue = new ColorPicker(this, 0, new Rectangle(490, 199, 120, 24), new Rectangle(490, 140, 120, 280), 8, 6, Data.Hues.HairTones);
            AddControl(_HairHue);
            // facial hair color (male)
            AddControl(new TextLabelAscii(this, 1, 489, 231, 2037, 9, Data.StringList.Entry(3000185)));
            _FacialHairHue = new ColorPicker(this, 1, new Rectangle(490, 244, 120, 24), new Rectangle(490, 140, 120, 280), 8, 6, Data.Hues.HairTones);
            AddControl(_FacialHairHue);

            // back button
            AddControl(new Button(this, 1, 586, 435, 5537, 5539, ButtonTypes.Activate, 0, (int)Buttons.BackButton));
            ((Button)LastControl).GumpOverID = 5538;
            // forward button
            AddControl(new Button(this, 1, 610, 435, 5540, 5542, ButtonTypes.Activate, 0, (int)Buttons.ForwardButton));
            ((Button)LastControl).GumpOverID = 5541;
            // quit button
            AddControl(new Button(this, 0, 554, 2, 5513, 5515, ButtonTypes.Activate, 0, (int)Buttons.QuitButton));
            ((Button)LastControl).GumpOverID = 5514;
        }