public PeventEditor(Pevent pevent, SpriteBundle bundle, PeventClassBundle bundlec) { InitializeComponent(); using (XNAUtils utils = new XNAUtils()) { sBundle = bundle; pEvent = pevent; pSprite = pevent.pSprite; cBundle = bundlec; foreach (PeventClass pClass in cBundle.ListpEventClass) CB_Class.Items.Add(pClass); CB_Class.Text = pevent.Class.ToString(); CB_Direction.SelectedItem = pevent.Direction.ToString(); CHK_Flying.Checked = pevent.Flying; if (pSprite != null) PN_Graphics.BackgroundImage = utils.ConvertToImage(pevent.pSprite.SpriteImage); CB_MoveType.SelectedItem = pevent.MoveType.ToString(); TB_Name.Text = pevent.Name; TB_Script.Text = pevent.Script; LB_Position.Text = pevent.Position.X + " x " + pevent.Position.Y; NUM_Sight.Value = new Decimal(pEvent.Sight); CHK_Through.Checked = pevent.Through; CB_TriggerType.SelectedItem = pevent.TriggerType.ToString(); NUM_Speed.Value = new Decimal(pevent.Velocity); CHK_Disposable.Checked = pevent.Disposable; HasAccepted = false; this.CB_MoveType.SelectedIndexChanged += new System.EventHandler(this.CB_MoveType_SelectedIndexChanged); } }
public SpritePicker(SpriteBundle bundle) { InitializeComponent(); SpriteBundle = bundle; foreach (Sprite item in bundle.Sprites) { LBSprites.Items.Add(item); } }
public PopUpGraphics(Sprite ppSprite, SpriteBundle psBundle) { sBundle = psBundle; pSprite = ppSprite; InitializeComponent(); using (XNAUtils utils = new XNAUtils()) { if (pSprite != null) PN_Graphics.BackgroundImage = utils.ConvertToImage(pSprite.SpriteImage); } }
public ProjectRessources(SerializationInfo info, StreamingContext context) { Maps = (List<Map>)info.GetValue("Maps", typeof(List<Map>)); Sprites = (SpriteBundle)info.GetValue("Sprites", typeof(SpriteBundle)); CommunPevents = (List<Pevent>)info.GetValue("CommunPevents", typeof(List<Pevent>)); Songs = (SongBundle)info.GetValue("Songs", typeof(SongBundle)); Classes = (PeventClassBundle)info.GetValue("PeventClassBundle", typeof(PeventClassBundle)); Icons = (List<pIcon>)info.GetValue("Icons", typeof(List<pIcon>)); Sounds = (SoundBundle)info.GetValue("Sounds", typeof(SoundBundle)); Animations = (List<Animation>)info.GetValue("Animations", typeof(List<Animation>)); Elements = (List<Elemental>)info.GetValue("Elements", typeof(List<Elemental>)); Battlers = (List<Battler>)info.GetValue("Battlers", typeof(List<Battler>)); }
public ProjectRessources() { Maps = new List<Map>(); Sprites = new SpriteBundle(); CommunPevents = new List<Pevent>(); Songs = new SongBundle(); Classes = new PeventClassBundle(); Icons = new List<pIcon>(); Sounds = new SoundBundle(); Animations = new List<Animation>(); Elements = new List<Elemental>(); Battlers = new List<Battler>(); }
public PeventListEditor(List<Pevent> EventsToEdit, SpriteBundle bundle, PeventClassBundle bundlec, Map map) { InitializeComponent(); SaveCalled = false; sbundle = bundle; for (int i = 0; i < EventsToEdit.Count; i++) PeventListPanel.Controls.Add(new PeventListItem(EventsToEdit[i], bundle, bundlec, map)); if (PeventListPanel.Controls.Count <= (PeventListPanel.Height / PeventListPanel.Controls[0].Height)) PeventListPanel.Width -= SystemInformation.VerticalScrollBarWidth; InitiateGeneralModifier(bundlec); this.Controls.Add(GeneralModifier); }
public PeventEditor(Point position, SpriteBundle bundle, PeventClassBundle bundlec, Size map) { InitializeComponent(); HasAccepted = false; LB_Position.Text = position.X + " x " + position.Y; pEvent = new Pevent(); pEvent.Position = position; pEvent.ArretMouvement = new List<Point>(); sBundle = bundle; cBundle = bundlec; Map = map; foreach (PeventClass pClass in cBundle.ListpEventClass) CB_Class.Items.Add(pClass); this.CB_MoveType.SelectedIndexChanged += new System.EventHandler(this.CB_MoveType_SelectedIndexChanged); }
public PeventLister(List<Pevent> pListePevent, SpriteBundle pbundle, PeventClassBundle pbundlec, Map pmap) { map = pmap; bundle = pbundle; bundlec = pbundlec; InitializeComponent(); EventsToEdit = new List<Pevent>(); int i = 0; ListePevent = pListePevent; foreach (Pevent item in ListePevent) { CheckBox c = new CheckBox(); c.Width = Panel_pEvents.Width - SystemInformation.VerticalScrollBarWidth - 8; c.Name = i.ToString(); c.Text = item.Name; c.CheckedChanged += new System.EventHandler(CB_CheckChanged); Panel_pEvents.Controls.Add(c); i++; } }