Exemplo n.º 1
0
        public ItemDetailForm(string activeListType, LibraryUI libraryUI)
        {
            InitializeComponent();

            listType    = activeListType;
            callingForm = libraryUI;

            if (listType == "Anime")
            {
                currentItem = new AnimeModel();
                listHeaders = SqliteDataAccess.LoadAnimeListHeaders();
            }
            else if (listType == "Game")
            {
                currentItem = new GameModel();
                listHeaders = SqliteDataAccess.LoadGameListHeaders();
            }
            else if (listType == "Series")
            {
                currentItem = new SeriesModel();
                listHeaders = SqliteDataAccess.LoadSeriesListHeaders();
            }

            WireUpFrom();
            LoadForm(currentItem);
        }
Exemplo n.º 2
0
        public ItemDetailForm(string activeListType, ItemModel item, int index, LibraryUI libraryUI)
        {
            InitializeComponent();

            newitem     = false;
            itemIndex   = index;
            listType    = activeListType;
            callingForm = libraryUI;
            currentItem = item;

            pbDelete.Enabled = true;
            pbDelete.Visible = true;

            if (listType == "Anime")
            {
                listHeaders = SqliteDataAccess.LoadAnimeListHeaders();
            }
            else if (listType == "Game")
            {
                listHeaders = SqliteDataAccess.LoadGameListHeaders();
            }
            else if (listType == "Series")
            {
                listHeaders = SqliteDataAccess.LoadSeriesListHeaders();
            }

            WireUpFrom();
            LoadForm(currentItem);
        }
Exemplo n.º 3
0
        public ListMenuItem(string activeGroup, LibraryUI libraryUI)
        {
            InitializeComponent();

            callingForm = libraryUI;
            active      = activeGroup;

            lbListGroupName.Parent = panel1;
        }
Exemplo n.º 4
0
    /// <summary>
    ///
    /// Initialise the library tab
    ///
    /// </summary>
    /// <param name="_tabIndex">The index of the tab in the tab list</param>
    /// <param name="iconType">The type of icon that the tab is required to have</param>
    public void InitLibraryTab <T>(int _tabIndex, List <CardData> _tabCardList, LibraryUI _libraryUI, T iconType)
    {
        libraryUI   = _libraryUI;
        tabIndex    = _tabIndex;
        TabCardList = _tabCardList.ToList();

        gameObject.GetComponent <Image>().color = unselectedTabColour;
        tabImage.sprite = GameManager.instance.iconManager.GetIcon(iconType);
    }
Exemplo n.º 5
0
    void Awake()
    {
        if (instance != null)
        {
            Destroy(instance);
        }
        instance = this;

        Counters = new Dictionary <Transform, List <Counter> >();
    }
Exemplo n.º 6
0
    public void HealthChange(int current, int delta, float ratio)
    {
        healthTag.GetComponent <TextMeshProUGUI>().text = GetComponent <HealthController>().Health + "";
        healthBar.GetComponent <Slider>().value         = ratio;

        if (delta > 0)
        {
            LibraryUI.CreateDamageCounter(transform, delta);
        }
        else if (delta < 0)
        {
            LibraryUI.CreateHealCounter(transform, -delta);
        }
    }
Exemplo n.º 7
0
        public ListItem(LibraryUI libraryUI)
        {
            InitializeComponent();

            Color myColor = Color.FromArgb(180, 0, 0, 0);

            pbCheck.Parent        = pbListItem;
            pbNotes.Parent        = pbListItem;
            lbItemTitle.Parent    = pbListItem;
            lbItemTitle.BackColor = myColor;
            lbItemScore.Parent    = pbListItem;
            lbItemScore.BackColor = myColor;
            panel1.Parent         = pbListItem;
            panel1.BackColor      = myColor;
            pbDetails.Parent      = pbListItem;
            pbDetails.Location    = new Point(110, 0);
            pbDetails.BackColor   = myColor;

            callerForm = libraryUI;
        }
Exemplo n.º 8
0
    public void SpawnUI()
    {
        icon      = LibraryUI.CreateShipIcon(shipClass.name, shipClass.Fleet);
        panel     = LibraryUI.CreateShipPanel(icon);
        icon2     = LibraryUI.CreateIcon(panel);
        classTag  = LibraryUI.CreateShipTag(shipClass.Classification, panel);
        levelTag  = LibraryUI.CreateLevelTag(panel, "Lv " + shipClass.Level);
        healthTag = LibraryUI.CreateHealthTag(panel);
        healthTag.GetComponent <TextMeshProUGUI>().text = GetComponent <HealthController>().Health + "";
        if (shipClass.Fleet != null)
        {
            fleetTag = LibraryUI.CreateFleetTag(panel, shipClass.Fleet.name);
        }
        distanceTag = LibraryUI.CreateDistanceTag(panel);
        healthBar   = LibraryUI.CreateHealthBar(panel);


        icon.gameObject.SetActive(false);
        panel.gameObject.SetActive(false);
    }