public void Initialize(ScreenManager screenManager, SubsurfaceRenderer 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(_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(DefaultRenderer).GetField("BokehSize"), // SliderValue = (float)typeof(DefaultRenderer).GetField("BokehSize").GetValue(renderer) //}); renderer._backgroundTextureLoader = textureLoader; baseList.ParentResized(screenCanvas.Dimensions); }
public void Initialize(ScreenManager screenManager, SubsurfaceRenderer renderer) { _guiRenderer.Initialize(screenManager, renderer); }