示例#1
0
    public void test_resource_api()
    {
        int start = OS.GetTicksMsec();

        for (int i = 0; i < 100000; i++)
        {
            Control c     = new Control();
            Theme   theme = new Theme();
            theme.SetName("My Beautiful Theme");
            ImageTexture tex = new ImageTexture();
            tex.SetName("xxx.png");
            theme.SetIcon("Button", "Normal", tex);
            c.SetTheme(theme);
            string name = c.GetTheme().GetIcon("Button", "Normal").GetName();
            c.Free();
        }

        GD.Printt("C#:", OS.GetTicksMsec() - start);
    }