Beispiel #1
0
        private void ClickAndDisplay()
        {
            if (mouseLocation == null)
            {
                return;
            }

            WorldClickData clickData = worldController.GetObjectData(mouseLocation, shiftHeld);

            if (clickData != null && clickData.Data != null)
            {
                ShowDisplayPanel(clickData);
            }
        }
Beispiel #2
0
        private void ShowDisplayPanel(WorldClickData data)
        {
            if (data == null)
            {
                Console.WriteLine("Tried to display null data in Form1.ShowDisplayPanel()");
                return;
            }

            foreach (DisplayPanel d in displayPanels)
            {
                if (d.DataObject == data.DataObject)
                {
                    Console.WriteLine("Error: Attempted to create a duplicate display panel.");
                    return;
                }
            }

            AddDisplayPanel(data.DataObject, data.CanSwap, mouseLocation);
        }
Beispiel #3
0
        private void InventoryDisplay()
        {
            WorldClickData clickData = worldController.GetPlayerInventory(mouseLocation);

            ShowDisplayPanel(clickData);
        }