Exemplo n.º 1
0
        public static UITextureAtlas LoadResources()
        {
            if (atlas == null)
            {
                string[] spriteNames = new string[]
                {
                    "FindIt",
                    "FindItDisabled",
                    "FindItFocused",
                    "FindItHovered",
                    "FindItPressed",
                    "Tag",
                    "ZoningCommercialEco",
                    "ZoningCommercialLeisure",
                    "ZoningCommercialTourist",
                    "ZoningOfficeHightech",
                    "ZoningResidentialHighEco",
                    "ZoningResidentialLowEco",
                    "ToolbarIconPropsBillboards",
                    "ToolbarIconPropsSpecialBillboards",
                    "ExtraFilters",
                    "Dice",
                    "TreeLg",
                    "TreeMd",
                    "TreeSm",
                    "TinyRoads",
                    "QuickMenu",
                    "Clear",
                    "Oneway",
                    "Parking",
                    "NoParking",
                    "GrwbRico",
                    "Runway",
                    "RunwayDisabled",
                    "RunwayFocused",
                    "RunwayHovered",
                    "RunwayPressed",
                    "Taxiway",
                    "TaxiwayDisabled",
                    "TaxiwayFocused",
                    "TaxiwayHovered",
                    "TaxiwayPressed"
                };

                atlas = ResourceLoader.CreateTextureAtlas("FindItAtlas", spriteNames, "FindIt.Icons.");

                UITextureAtlas defaultAtlas = ResourceLoader.GetAtlas("Ingame");
                Texture2D[]    textures     = new Texture2D[]
                {
                    defaultAtlas["ToolbarIconGroup6Focused"].texture,
                    defaultAtlas["ToolbarIconGroup6Hovered"].texture,
                    defaultAtlas["ToolbarIconGroup6Normal"].texture,
                    defaultAtlas["ToolbarIconGroup6Pressed"].texture
                };

                ResourceLoader.AddTexturesInAtlas(atlas, textures);
            }

            return(atlas);
        }
Exemplo n.º 2
0
        public static UITextureAtlas LoadResources()
        {
            if (atlas == null)
            {
                string[] spriteNames = new string[]
                {
                    "FindIt",
                    "FindItDisabled",
                    "FindItFocused",
                    "FindItHovered",
                    "FindItPressed",
                    "Tag",
                    "IconPolicyLeisureDisabled",
                    "IconPolicyTouristDisabled"
                };

                atlas = ResourceLoader.CreateTextureAtlas("FindItAtlas", spriteNames, "FindIt.Icons.");

                UITextureAtlas defaultAtlas = ResourceLoader.GetAtlas("Ingame");
                Texture2D[]    textures     = new Texture2D[]
                {
                    defaultAtlas["ToolbarIconGroup6Focused"].texture,
                    defaultAtlas["ToolbarIconGroup6Hovered"].texture,
                    defaultAtlas["ToolbarIconGroup6Normal"].texture,
                    defaultAtlas["ToolbarIconGroup6Pressed"].texture,
                    defaultAtlas["IconPolicyLeisure"].texture,
                    defaultAtlas["IconPolicyTourist"].texture
                };

                ResourceLoader.AddTexturesInAtlas(atlas, textures);
            }

            return(atlas);
        }