Beispiel #1
0
        public void ctor(XmlElement xml, Atlas atlas, float delay, Action onDoneSlide = null, MapMetaCompleteScreen meta = null)
        {
            // Translates to : this(xml, atlas, delay, onDoneSlide)
            ctor(xml, atlas, delay, onDoneSlide);

            this.meta = meta;

            if (meta != null)
            {
                StartScroll  = meta.Start;
                CenterScroll = meta.Center;
                Offset       = meta.Offset;

                Layers.Clear();
                if (meta.Layers != null && meta.Layers.Length > 0)
                {
                    foreach (MapMetaCompleteScreenLayer layer in meta.Layers)
                    {
                        if (!string.IsNullOrEmpty(layer.Type) && layer.Type.Equals("ui", StringComparison.CurrentCultureIgnoreCase))
                        {
                            HasUI = true;
                            Layers.Add(new UILayerNoXML(this, layer));
                            continue;
                        }

                        Layers.Add(new ImageLayerNoXML(Offset, atlas, layer));
                    }
                }
            }

            // Let's just hope that the running SlideRoutine takes the changes into account.
        }
        public CustomScreenVignette(Session session, XmlElement xml = null, MapMetaCompleteScreen meta = null)
        {
            this.session = session;
            session.Audio.Apply();
            this.meta = meta;
            this.xml  = xml;

            RunThread.Start(LoadCompleteThread, "SUMMIT_VIGNETTE");
        }
Beispiel #3
0
        private void LoadCompleteThread()
        {
            AreaData area = AreaData.Get(session);

            if ((completeMeta = area.GetMeta()?.CompleteScreen) != null && completeMeta.Atlas != null)
            {
                completeAtlas = Atlas.FromAtlas(Path.Combine("Graphics", "Atlases", completeMeta.Atlas), Atlas.AtlasDataFormat.PackerNoAtlas);
            }
            else if ((completeXml = area.CompleteScreenXml) != null && completeXml.HasAttr("atlas"))
            {
                completeAtlas = Atlas.FromAtlas(Path.Combine("Graphics", "Atlases", completeXml.Attr("atlas")), Atlas.AtlasDataFormat.PackerNoAtlas);
            }

            completeLoaded = true;
        }
Beispiel #4
0
 /// <summary>
 /// Set the custom complete screen.
 /// </summary>
 public static AreaData SetCompleteScreenMeta(this AreaData self, MapMetaCompleteScreen value)
 {
     ((patch_AreaData)self).CompleteScreenMeta = value;
     return(self);
 }
Beispiel #5
0
 public patch_AreaComplete(Session session, XmlElement xml, Atlas atlas, HiresSnow snow, MapMetaCompleteScreen meta)
     : base(session, xml, atlas, snow)
 {
     // no-op. MonoMod ignores this - we only need this to make the compiler shut up.
 }
Beispiel #6
0
 public patch_CompleteRenderer(XmlElement xml, Atlas atlas, float delay, Action onDoneSlide = null, MapMetaCompleteScreen meta = null)
     : base(xml, atlas, delay, onDoneSlide)
 {
     // no-op. MonoMod ignores this - we only need this to make the compiler shut up.
     // meta parameter is included to allow instantiating CompleteRenderer with it
 }