Beispiel #1
0
        public void Initialize(ScreenManager screenManager, FTRenderer renderer)
        {
            _renderer      = renderer;
            _screenManager = screenManager;

            screenCanvas = new GUICanvas(Vector2.Zero, new Vector2(GameSettings.g_ScreenWidth, GameSettings.g_ScreenHeight), 0, GUIStyle.GUIAlignment.None);

            var baseList = new GuiListToggle(Vector2.Zero, new Vector2(200, 30), 0, GUIStyle.GUIAlignment.TopRight, screenCanvas.Dimensions);

            screenCanvas.AddElement(baseList);

            baseList.AddElement(new GUITextBlockButton(Vector2.Zero, new Vector2(200, 35), "return", GUIRenderer.MonospaceFont, Color.Gray, Color.White)
            {
                ButtonObject = this,
                ButtonMethod = this.GetType().GetMethod("MainMenu")
            });


            GuiTextBlockLoadDialog textureLoader;

            baseList.AddElement(textureLoader = new GuiTextBlockLoadDialog(Vector2.Zero, new Vector2(200, 35), "image: ", _guiContentLoader, GuiTextBlockLoadDialog.ContentType.Texture2D, GUIRenderer.MonospaceFont, Color.Gray, Color.White)
                                );

            baseList.AddElement(new GUITextBlockButton(Vector2.Zero, new Vector2(200, 35), "CreateDFT", GUIRenderer.MonospaceFont, Color.Gray, Color.White)
            {
                ButtonObject = renderer,
                ButtonMethod = renderer.GetType().GetMethod("CreateDFT")
            });

            //baseList.AddElement(_sizeBlock = new GUITextBlock(Vector2.Zero, new Vector2(200, 25), "Intensity: ", GUIRenderer.MonospaceFont, Color.Gray, Color.White));
            //baseList.AddElement(new GuiSliderFloat(Vector2.Zero, new Vector2(200, 35), 2, 20, Color.Gray, Color.White)
            //{
            //    SliderObject = renderer,
            //    SliderField = typeof(FTRenderer).GetField("BokehSize"),
            //    SliderValue = (float)typeof(FTRenderer).GetField("BokehSize").GetValue(renderer)
            //});

            renderer._backgroundTextureLoader = textureLoader;

            baseList.ParentResized(screenCanvas.Dimensions);
        }
Beispiel #2
0
 public void Initialize(ScreenManager screenManager, FTRenderer renderer)
 {
     _guiGuiRenderer.Initialize(screenManager, renderer);
 }