コード例 #1
0
        public static void Start()
        {
            var bridge = new MyGlfwTopWindowBridge.GlfwEventBridge();

            Size primScreenSize = UIPlatform.CurrentPlatform.GetPrimaryMonitorSize();
            var  form           = new GlFwForm(primScreenSize.Width, primScreenSize.Height, "GLES_GLFW", bridge);

            //
            Init(form);
            //------

            AppHost       appHost = new AppHost();
            AppHostConfig config  = new AppHostConfig();

            config.RootGfx = s_myRootGfx;
            config.ScreenW = primScreenSize.Width;
            config.ScreenH = primScreenSize.Height;
            appHost.Setup(config);
            //------
            Box bgBox = new Box(primScreenSize.Width, primScreenSize.Height);

            bgBox.BackColor = Color.White;
            s_myRootGfx.AddChild(bgBox.GetPrimaryRenderElement());
            //------


            //appHost.StartApp(new Demo_BoxEvents3());
            appHost.StartApp(new Demo_ScrollView());
            //appHost.StartApp(new Demo_MultipleLabels());
            //appHost.StartApp(new Demo_MultipleLabels2());
            //---------
        }
コード例 #2
0
        public static void dbugStart_Basic()
        {
            //demonstrate basic setup
            var  bridge         = new MyGlfwTopWindowBridge.GlfwEventBridge();
            Size primScreenSize = UIPlatform.CurrentPlatform.GetPrimaryMonitorSize();
            var  form           = new GlFwForm(primScreenSize.Width, primScreenSize.Height, "GLES_GLFW", bridge);

            Init(form);
            //------

            //this is an app detail
            Box bgBox = new Box(primScreenSize.Width, primScreenSize.Height);

            bgBox.BackColor = Color.White;
            s_myRootGfx.AddChild(bgBox.GetPrimaryRenderElement());

            //----------------------
            dbugMySprite sprite = new dbugMySprite(200, 300);
            dbugMyBoxUI  boxUI  = new dbugMyBoxUI();

            boxUI.SetRenderElement(sprite);
            sprite.SetController(boxUI);

            bgBox.Add(boxUI);
            //---------
        }