public override void OnActivate(params object[] args) { if (args.Length >= 1 && args[0] is SectorMap) { Map = (SectorMap)args[0]; } else { Map = new SectorMap(); } BackgroundImage = Root.Singleton.Material("img/box_text_sectors.png"); base.OnActivate(); var lblTitle = new Label(); lblTitle.X = 25; lblTitle.Y = 40; lblTitle.Text = "Choose the next sector:"; lblTitle.Font = Root.Singleton.Font("fonts/JustinFont12Bold.ttf"); lblTitle.AutoScale = false; lblTitle.Scale = 0.475f; lblTitle.Parent = Window; lblTitle.Init(); var nodes = Map.CurrentNode.NextNodes; for (int i = 0; i < nodes.Count; i++) { var node = nodes[i]; AddButton(80 + i * 25, "" + (i + 1) + ". " + node.Sector.Name); } var map = new SectorMapPanel(Map); Util.LayoutControl(map, 28, 210, 558, 148, ScreenRectangle); map.Parent = Window; map.Init(); }
public SectorMapPanel(SectorMap sectorMap) { this.sectorMap = sectorMap; }