public SelectData(SelectScreen selectscreen, Input.ButtonMap buttonmap, TextSection textsection, String prefix, Boolean moveoverempty) { if (selectscreen == null) throw new ArgumentNullException("selectscreen"); if (buttonmap == null) throw new ArgumentNullException("buttonmap"); if (textsection == null) throw new ArgumentNullException("textsection"); if (prefix == null) throw new ArgumentNullException("prefix"); m_selectscreen = selectscreen; m_buttonmap = buttonmap; m_moveoverempty = moveoverempty; m_elements = new Elements.Collection(SelectScreen.SpriteManager, SelectScreen.AnimationManager, SelectScreen.SoundManager, SelectScreen.MenuSystem.FontMap); m_elements.Build("cursor.active", textsection, prefix + ".cursor.active"); m_elements.Build("cursor.done", textsection, prefix + ".cursor.done"); m_elements.Build("cursor.move", textsection, prefix + ".cursor.move"); m_elements.Build("random.move", textsection, prefix + ".random.move"); m_elements.Build("player.face", textsection, prefix + ".face"); m_elements.Build("player.name", textsection, prefix + ".name"); m_startcell = textsection.GetAttribute<Point>(prefix + ".cursor.startcell"); // X & Y seem to be reversed for this m_startcell = new Point(m_startcell.Y, m_startcell.X); Reset(); }
public SelectData(SelectScreen selectscreen, Input.ButtonMap buttonmap, TextSection textsection, String prefix, Boolean moveoverempty) { if (selectscreen == null) { throw new ArgumentNullException("selectscreen"); } if (buttonmap == null) { throw new ArgumentNullException("buttonmap"); } if (textsection == null) { throw new ArgumentNullException("textsection"); } if (prefix == null) { throw new ArgumentNullException("prefix"); } m_selectscreen = selectscreen; m_buttonmap = buttonmap; m_moveoverempty = moveoverempty; m_elements = new Elements.Collection(SelectScreen.SpriteManager, SelectScreen.AnimationManager, SelectScreen.SoundManager, SelectScreen.MenuSystem.FontMap); m_elements.Build("cursor.active", textsection, prefix + ".cursor.active"); m_elements.Build("cursor.done", textsection, prefix + ".cursor.done"); m_elements.Build("cursor.move", textsection, prefix + ".cursor.move"); m_elements.Build("random.move", textsection, prefix + ".random.move"); m_elements.Build("player.face", textsection, prefix + ".face"); m_elements.Build("player.name", textsection, prefix + ".name"); m_startcell = textsection.GetAttribute <Point>(prefix + ".cursor.startcell"); // X & Y seem to be reversed for this m_startcell = new Point(m_startcell.Y, m_startcell.X); Reset(); }