Beispiel #1
0
        public TerrainPanel()
        {
            InitializeComponent();

            for (int i = 0; i < TerrainFlagInfo.Infos.Length; ++i)
            {
                TerrainFlagInfo info = TerrainFlagInfo.Infos[i];
                TerrainPanelEntry entry = new TerrainPanelEntry();
                entry.Load(info);
                entry.Index = i;
                EntryGroup.Children.Add(entry);

                entry.MouseDown += OnEntryMouseDown;
            }
        }
Beispiel #2
0
        private void SelectEntry(int index)
        {
            TerrainPanelEntry entry = EntryGroup.Children[index] as TerrainPanelEntry;

            if (selectedEntry != null)
                selectedEntry.Deselect();

            selectedEntry = entry;
            entry.Select();
            DetailPanels.Instance.ShowPanel(DetailPanelType.Terrain, index);
        }