예제 #1
0
        public override bool UpdateGame()
        {
            if (SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection > -1)
            {
                Buttons[htButtons(ButtonPlayerName)].Text.Text = CProfiles.GetPlayerName(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                if (_EditMode == EEditMode.PlayerName)
                {
                    Buttons[htButtons(ButtonPlayerName)].Text.Text += "|";
                }

                SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection   = (int)CProfiles.GetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideActive)].Selection       = (int)CProfiles.GetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);

                int avatarNr = CProfiles.GetAvatarNr(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection = avatarNr;
                Statics[htStatics(StaticAvatar)].Texture = CProfiles.Avatars[avatarNr].Texture;
            }

            return(true);
        }
예제 #2
0
        private void LoadProfiles()
        {
            _EditMode = EEditMode.None;
            SelectSlides[htSelectSlides(SelectSlideProfiles)].Clear();

            for (int i = 0; i < CProfiles.NumProfiles; i++)
            {
                SelectSlides[htSelectSlides(SelectSlideProfiles)].AddValue(CProfiles.GetPlayerName(i));
            }

            if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0)
            {
                SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection   = (int)CProfiles.GetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideActive)].Selection       = (int)CProfiles.GetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection      = CProfiles.GetAvatarNr(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
            }
        }
예제 #3
0
        public override bool UpdateGame()
        {
            if (SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection > -1)
            {
                Buttons[htButtons(ButtonPlayerName)].Text.Text = CProfiles.GetPlayerName(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                if (_EditMode == EEditMode.PlayerName)
                {
                    Buttons[htButtons(ButtonPlayerName)].Text.Text += "|";
                }

                SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection   = (int)CProfiles.GetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideActive)].Selection       = (int)CProfiles.GetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);

                int avatarNr = CProfiles.GetAvatarNr(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
                SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection = avatarNr;
                if (CWebcam.GetDevices().Length > 0 && _WebcamTexture.index > 0)
                {
                    if (_Snapshot == null)
                    {
                        CWebcam.GetFrame(ref _WebcamTexture);
                    }
                    Statics[htStatics(StaticAvatar)].Texture = _WebcamTexture;

                    RectangleF bounds = new RectangleF(_WebcamTexture.rect.X, _WebcamTexture.rect.Y, _WebcamTexture.rect.W, _WebcamTexture.rect.H);
                    RectangleF rect   = new RectangleF(0f, 0f, _WebcamTexture.rect.W, _WebcamTexture.rect.H);
                    CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
                }
                else
                {
                    Statics[htStatics(StaticAvatar)].Texture = CProfiles.Avatars[avatarNr].Texture;
                }
            }

            return(true);
        }