Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="level"></param>
        /// <param name="mapLocation"></param>
        /// <param name="currentSelection">Specifies currently selected item, so selection can be restored
        /// after reloading screen.</param>
        internal void LoadScreen(LevelIndex level, Point mapLocation, ItemScreenData currentRoom, ItemInstance currentSelection)
        {
            BeginUpdate();

            this.selectedItem = currentSelection;
            this.currentRoom  = currentRoom;

            // Check to see if screen is already loaded
            if (this.mapLocation != mapLocation)
            {
                this.mapLocation = mapLocation;

                lstItems.BeginUpdate();
                lstItems.Items.Clear();
                ItemSeeker items;
                ////if (rom.GetLevel(level).CheckForItemsAt(mapLocation, out items)) {
                LoadItemsForSelectedScreen();
                ////}
                lstItems.EndUpdate();
            }

            itemValueList.BeginUpdate();
            ShowSelectedItem();
            itemValueList.EndUpdate();

            EndUpdate();
        }
Пример #2
0
        ////ItemSeeker item;
        ////ItemRowEntry entry;

        public ItemScreenControl(ItemScreenData data)
        {
            this.ItemData = data;

            // Initialize
            Bounds = new Rectangle(ItemData.MapX * CellWidth, ItemData.MapY * CellHeight, CellWidth, CellHeight);
            ReloadImage();
        }
Пример #3
0
        public EditItemProperty(EditroidUndoRedoQueue q, Point MapLocation, ItemScreenData screen, ItemData item, ItemProperty prop, int newValue)
            : base(q, MapLocation)
        {
            this.prop   = prop;
            this.item   = item;
            this.screen = screen;

            this.newValue = newValue;
            this.oldValue = GetValue();
        }
Пример #4
0
 public EditItemProperty EditItemProperty(Point location, ItemScreenData screen, ItemData item, ItemProperty prop, int newValue)
 {
     return(new EditItemProperty(queue, location, screen, item, prop, newValue));
 }
Пример #5
0
 public ItemAction(EditroidUndoRedoQueue q, Level level, ItemScreenData screen, ItemData item)
     : base(q, level)
 {
     this.Screen = screen;
     this.Item   = item;
 }
Пример #6
0
        internal void LoadScreen(ItemScreenData screenData, ItemInstance selectedItem)
        {
            SelectedScreen    = screenData;
            this.SelectedItem = selectedItem.Data;

            ItemListCombo.BeginUpdate();
            ItemListCombo.Items.Clear();

            int selection = -1;

            for (int i = 0; i < screenData.Items.Count; i++)
            {
                ItemListCombo.Items.Add(screenData.Items[i].ItemType.ToString());
                if (selectedItem.Data == screenData.Items[i])
                {
                    selection = i;
                }
            }

            ItemListCombo.SelectedIndex = selection;
            ItemListCombo.EndUpdate();

            switch (selectedItem.Data.ItemType)
            {
            case ItemTypeIndex.Enemy:
                DisplayScheme(ItemUiScheme.Enemy);
                break;

            case ItemTypeIndex.PowerUp:
                DisplayScheme(ItemUiScheme.PowerUp);
                break;

            case ItemTypeIndex.Mella:
                DisplayScheme(ItemUiScheme.Blank);
                break;

            case ItemTypeIndex.Elevator:
                DisplayScheme(ItemUiScheme.Elevator);
                break;

            case ItemTypeIndex.Turret:
                DisplayScheme(ItemUiScheme.Turret);
                break;

            case ItemTypeIndex.MotherBrain:
                DisplayScheme(ItemUiScheme.Blank);
                break;

            case ItemTypeIndex.Zebetite:
                DisplayScheme(ItemUiScheme.Zebetite);
                break;

            case ItemTypeIndex.Rinkas:
                DisplayScheme(ItemUiScheme.Rinka);
                break;

            case ItemTypeIndex.Door:
                DisplayScheme(ItemUiScheme.Door);
                break;

            case ItemTypeIndex.PalSwap:
                DisplayScheme(ItemUiScheme.Blank);
                break;
            }
        }
Пример #7
0
 public ItemEditorScreenControl()
 {
     SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.UserPaint, true);
     Data = new ItemScreenData();
 }