Example #1
0
        private void LoadScreen(ItemSeeker seeker, int mapY)
        {
            ItemEditorScreenControl control = new ItemEditorScreenControl();
            var data = control.Data;

            control.MapLocation = new Point(seeker.MapX, mapY);


            var item = LoadItem(seeker);

            if (item != null)
            {
                data.Items.Add(item);
            }

            while (seeker.MoreItemsPresent)
            {
                seeker.NextItem();
                item = LoadItem(seeker);
                if (item != null)
                {
                    data.Items.Add(item);
                }
            }

            AddScreenControl(control);
        }
Example #2
0
        private void lstItems_SelectedIndexChanged(object sender, EventArgs e)
        {
            currentRoom.SeekToFirstItemInScreen();
            for (int i = 0; i < lstItems.SelectedIndex; i++)
            {
                currentRoom.NextItem();
            }

            DisplaySelectedItem();
        }