Exemplo n.º 1
0
    private void OnReminderItemClicked(DetailedReminderUiItem item)
    {
        _reminderScreen.SetSelection(item.data);

        // open Reminder screen
        ScreenManager.Instance.Set(10);
    }
Exemplo n.º 2
0
    /// <summary>
    /// Gets the cell to be displayed. You can have numerous cell types, allowing variety in your list.
    /// Some examples of this would be headers, footers, and other grouping cells.
    /// </summary>
    /// <param name="scroller">The scroller requesting the cell</param>
    /// <param name="dataIndex">The index of the data that the scroller is requesting</param>
    /// <param name="cellIndex">The index of the list. This will likely be different from the dataIndex if the scroller is looping</param>
    /// <returns>The cell for the scroller to use</returns>
    public EnhancedScrollerCellView GetCellView(EnhancedScroller scroller, int dataIndex, int cellIndex)
    {
        // first, we get a cell from the scroller by passing a prefab.
        // if the scroller finds one it can recycle it will do so, otherwise
        // it will create a new cell.
        DetailedReminderUiItem cellView = scroller.GetCellView(cellViewPrefab) as DetailedReminderUiItem;

        // set the name of the game object to the cell's data index.
        // this is optional, but it helps up debug the objects in
        // the scene hierarchy.
        cellView.name = "Cell " + dataIndex.ToString();

        // update data and view
        cellView.SetData(_data[dataIndex], _lastSelectedDate);

        // return the cell to the scroller
        return(cellView);
    }
Exemplo n.º 3
0
    private void CellViewInstantiated(EnhancedScroller enhancedScroller, EnhancedScrollerCellView cellview)
    {
        DetailedReminderUiItem item = cellview as DetailedReminderUiItem;

        item.onReminderItemClicked = OnReminderItemClicked;
    }