Exemple #1
0
        public Editor()
        {
            Engine = FloodEngine.GetEngine();

            InitializeGui();

            ServerManager = new ServerManager();
            ServerManager.CreateBuiltinServer();
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        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);
        }