示例#1
0
        protected Application(Type windowType)
        {
#if DEBUG
            using Profiler fullProfiler = new Profiler(GetType());
#endif
            CultureInfo.DefaultThreadCurrentCulture   = CultureInfo.InvariantCulture;
            CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;
            Logger.Init();
            Logger.Assert(App == null, "App already initialized");
            App                  = this;
            LayerStack           = new LayerStack();
            Window               = WindowBase.CreateMainWindow(windowType);
            Window.EventCallback = OnEvent;
            ImGuiLayer           = new ImGuiLayer();
            LayerStack.PushOverlay(ImGuiLayer);
        }
示例#2
0
 public void PushOverlay(Layer overlay) => LayerStack.PushOverlay(overlay);
示例#3
0
 public void PushOverlay(Layer overlay)
 {
     _layers.PushOverlay(overlay);
     overlay.OnAttach();
 }
示例#4
0
 public void PushOverlay(ILayer layer)
 {
     layerStack.PushOverlay(layer);
     layer.OnAttach();
 }