Exemplo n.º 1
0
        private void setupUI()
        {
            gridOne = new UiGrid(assetMngr);
            OSTI    = new OnScreenTextInput();

            continueBtn = UiMngr.createUIObj(continueText, new InstructPtr(uiContinue), new Tuple <int, int>(0, -39), (SpaceMngr.scale / 23f));

            //Profile Select Test
            profileSelBtn    = UiMngr.createUIObj(blank, new InstructPtr(uiSelectList), new Tuple <int, int>(0, 30), (SpaceMngr.scale / 2f));
            createProfileBtn = UiMngr.createUIObj(continueText, new InstructPtr(createProfile), new Tuple <int, int>(0, -50), (SpaceMngr.scale / 23f));
        }
Exemplo n.º 2
0
        //Profile Selection List
        private void setProfileSelListUI()
        {
            uiProfilePtr profileFunc = new uiProfilePtr(uiProfile);

            gridProfileSel = new UiGrid(assetMngr);

            gridProfileSel.createGrid(1, profileMngr.getProfileNum()); Console.WriteLine("profile num: ");

            int profilePos = 0;
            int position   = 50;

            foreach (KeyValuePair <string, ProfileMngr.Profile> profile in profileMngr.profileLib)
            {
                string         profileName        = profile.Value.profileName;
                RenderTarget2D renderTargetString = new RenderTarget2D(assetMngr.gDevice, 2500, 200);

                assetMngr.spriteBatch.Begin();
                assetMngr.spriteBatch.DrawString(miramo, profileName, Vector2.Zero, Color.White, 0f, Vector2.Zero, 10f, new SpriteEffects(), 0f);

                assetMngr.gDevice.SetRenderTarget(renderTargetString);

                Texture2D profileNameText = (Texture2D)renderTargetString;

                assetMngr.gDevice.Clear(new Color(0, 0, 0, 0));
                assetMngr.spriteBatch.End();

                UIObj profileBtn = UiMngr.createUIObj(profileName, profileNameText, profileFunc, new Tuple <int, int>(0, position), (SpaceMngr.scale / 23f));

                gridProfileSel.setGrid(profileBtn, 0, profilePos);

                profilePos = profilePos + 1;
                position   = position - 10;
            }

            assetMngr.gDevice.SetRenderTarget(null);

            firstPass = false;
        }