public Editor() { Engine = FloodEngine.GetEngine(); InitializeGui(); ServerManager = new ServerManager(); ServerManager.CreateBuiltinServer(); }
public void Init(Renderer renderer, string textureName, Flood.GUI.Font defaultFont) { Renderer = renderer; var resMan = FloodEngine.GetEngine().ResourceManager; var options = new ResourceLoadOptions { Name = textureName, AsynchronousLoad = false }; var imageHandle = resMan.LoadResource <Image>(options); Skin = new TexturedSkin(renderer, imageHandle, defaultFont); Canvas = new Canvas(Skin); Init(); }
static public Window Create(RenderContext context) { var engine = FloodEngine.GetEngine(); var windowManager = engine.WindowManager; var settings = new WindowSettings { Width = 640, Height = 480, Title = "Pane", Styles = WindowStyles.TopLevel }; var window = windowManager.CreateWindow(settings); window.WindowClose += () => Log.Info("Window closed!"); window.WindowFocusChange += hasFocus => Log.Info("Window focus: " + hasFocus); window.TargetResize += s => Log.Info("Size: " + s.Width); window.Show(visible: true); window.Context = context; return(window); }