Exemplo n.º 1
0
    void OnIconList(DialogMenuItem _item)
    {
        Dialog newDialog = Dialog.Create(DialogType.DialogIconList);

        newDialog.SetDialogText(DialogTextType.Title, "アイコンリスト");
        for (int i = 0; i < 16; i++)
        {
            DialogIconItem item = new DialogIconItem();
            newDialog.IconList.Add(item);
        }
        newDialog.SetDialogText(DialogTextType.YesText, "はい");
        newDialog.SetDialogText(DialogTextType.NoText, "いいえ");
        newDialog.Show();
    }
Exemplo n.º 2
0
    private void openSaleWarningDialog()
    {
        Dialog _newDialog = Dialog.Create(DialogType.DialogIconList).SetStrongYes();

        for (int i = 0; i < m_UnitSale.UnitList.Count; i++)
        {
            if (m_UnitSale.UnitList[i].m_UniqueId == 0)
            {
                continue;
            }

            PacketStructUnit     partsUnit   = UserDataAdmin.Instance.SearchChara(m_UnitSale.UnitList[i].m_UniqueId);
            MasterDataParamChara partsMaster = MasterFinder <MasterDataParamChara> .Instance.Find((int)partsUnit.id);

            DialogIconItem iconItem = new DialogIconItem();

            //アイコン
            UnitIconImageProvider.Instance.Get(
                partsUnit.id,
                (sprite) =>
            {
                iconItem.IconImage = sprite;
            });


            //LV+PLUS表示
            iconItem.ParamValue = (partsUnit.level >= partsMaster.level_max) ? GameTextUtil.GetText("unit_status18")
                                : string.Format(GameTextUtil.GetText("uniticon_flag2"), partsUnit.level); // レベル
            uint plus = partsUnit.add_hp + partsUnit.add_pow;
            if (plus != 0)
            {
                string format = GameTextUtil.GetText("uniticon_flag3");
                iconItem.ParamValue += string.Format(format, plus);
            }

            _newDialog.IconList.Add(iconItem);
        }

        string mainText = "";

        if (m_WarningRarity ||
            m_WarningBuildup)
        {
            if (m_WarningBuildup)
            {
                mainText += GameTextUtil.GetText("unit_sale_01") + "\n";
            }
            if (m_WarningRarity)
            {
                mainText += GameTextUtil.GetText("unit_sale_02") + "\n";
            }
            mainText += GameTextUtil.GetText("unit_sale_03");

            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "unit_sale_title");
        }
        else
        {
            mainText = GameTextUtil.GetText("unitsold_text2");

            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "unit_sale_04");
        }


        _newDialog.SetDialogObjectEnabled(DialogObjectType.UnderText, true);
        _newDialog.SetDialogText(DialogTextType.UnderText, mainText);

        _newDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
        _newDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");
        _newDialog.SetDialogEvent(DialogButtonEventType.YES, () =>
        {
            SaleUnit();
        });
        _newDialog.EnableFadePanel();
        _newDialog.Show();
    }