Exemplo n.º 1
0
        public void LoadContent(bool reload)
        {
            Texture2D textFieldDefault  = ConversionManager.BitmapToTexture(Resource1.textfield_default_9, this.main.GraphicsDevice);
            Texture2D textFieldSelected = ConversionManager.BitmapToTexture(Resource1.textfield_selected_9, this.main.GraphicsDevice);
            Texture2D textFieldRight    = ConversionManager.BitmapToTexture(Resource1.textfield_selected_right_9, this.main.GraphicsDevice);
            Texture2D textFieldWrong    = ConversionManager.BitmapToTexture(Resource1.textfield_selected_wrong_9, this.main.GraphicsDevice);

            Texture2D windowSelected   = ConversionManager.BitmapToTexture(Resource1.window_selected_9, this.main.GraphicsDevice);
            Texture2D windowUnselected = ConversionManager.BitmapToTexture(Resource1.window_unselected_9, this.main.GraphicsDevice);

            Texture2D panelSelected   = ConversionManager.BitmapToTexture(Resource1.panel_selected_9, this.main.GraphicsDevice);
            Texture2D panelUnselected = ConversionManager.BitmapToTexture(Resource1.panel_unselected_9, this.main.GraphicsDevice);

            Texture2D dropdown = ConversionManager.BitmapToTexture(Resource1.dropdown, this.main.GraphicsDevice);

            Texture2D btnDefault = ConversionManager.BitmapToTexture(Resource1.btn_default_9, this.main.GraphicsDevice);
            Texture2D btnClicked = ConversionManager.BitmapToTexture(Resource1.btn_clicked_9, this.main.GraphicsDevice);
            Texture2D btnHover   = ConversionManager.BitmapToTexture(Resource1.btn_hover_9, this.main.GraphicsDevice);

            Texture2D sliderRange = ConversionManager.BitmapToTexture(Resource1.sliderRange_9, this.main.GraphicsDevice);

            TextureSliderDefault  = ConversionManager.BitmapToTexture(Resource1.slider, this.main.GraphicsDevice);
            TextureSliderSelected = ConversionManager.BitmapToTexture(Resource1.sliderSelected, this.main.GraphicsDevice);

            NinePatchSliderRange.LoadFromTexture(sliderRange);

            TextureCheckBoxDefault         = ConversionManager.BitmapToTexture(Resource1.checkbox_default, this.main.GraphicsDevice);
            TextureCheckBoxSelected        = ConversionManager.BitmapToTexture(Resource1.checkbox_default_selected, this.main.GraphicsDevice);
            TextureCheckBoxDefaultChecked  = ConversionManager.BitmapToTexture(Resource1.checkbox_checked, this.main.GraphicsDevice);
            TextureCheckBoxSelectedChecked = ConversionManager.BitmapToTexture(Resource1.checkbox_checked_selected, this.main.GraphicsDevice);

            NinePatchTextFieldDefault.LoadFromTexture(textFieldDefault);
            NinePatchTextFieldSelected.LoadFromTexture(textFieldSelected);
            NinePatchTextFieldRight.LoadFromTexture(textFieldRight);
            NinePatchTextFieldWrong.LoadFromTexture(textFieldWrong);

            NinePatchWindowSelected.LoadFromTexture(windowSelected);
            NinePatchWindowUnselected.LoadFromTexture(windowUnselected);

            NinePatchPanelUnselected.LoadFromTexture(panelUnselected);
            NinePatchPanelSelected.LoadFromTexture(panelSelected);

            NinePatchDropDown.LoadFromTexture(dropdown);

            NinePatchBtnDefault.LoadFromTexture(btnDefault);
            NinePatchBtnClicked.LoadFromTexture(btnClicked);
            NinePatchBtnHover.LoadFromTexture(btnHover);

            NinePatchTabDefault.LoadFromTexture(btnDefault);
            NinePatchTabSelected.LoadFromTexture(btnHover);

            foreach (View v in this.GetAllViews(this.RootView))
            {
                v.LoadContent(reload);
            }

            White = new Texture2D(this.main.GraphicsDevice, 1, 1);
            White.SetData(new Color[] { Color.White });
        }