|
@@ -338,8 +338,7 @@ namespace CardCollector.Resources
|
|
/* Клавиатура, отображаемая вместе с сообщением профиля */
|
|
/* Клавиатура, отображаемая вместе с сообщением профиля */
|
|
public static InlineKeyboardMarkup GetProfileKeyboard(int income, int privilegeLevel)
|
|
public static InlineKeyboardMarkup GetProfileKeyboard(int income, int privilegeLevel)
|
|
{
|
|
{
|
|
- var keyboard = new List<InlineKeyboardButton[]>
|
|
|
|
- {
|
|
|
|
|
|
+ var keyboard = new List<InlineKeyboardButton[]> {
|
|
new[] {InlineKeyboardButton.WithCallbackData($"{Text.collect} {income}{Text.coin}", Command.collect_income)},
|
|
new[] {InlineKeyboardButton.WithCallbackData($"{Text.collect} {income}{Text.coin}", Command.collect_income)},
|
|
new[] {InlineKeyboardButton.WithCallbackData(Text.daily_tasks, Command.daily_tasks)},
|
|
new[] {InlineKeyboardButton.WithCallbackData(Text.daily_tasks, Command.daily_tasks)},
|
|
new[] {InlineKeyboardButton.WithCallbackData(Text.my_packs, Command.my_packs)},
|
|
new[] {InlineKeyboardButton.WithCallbackData(Text.my_packs, Command.my_packs)},
|
|
@@ -348,5 +347,35 @@ namespace CardCollector.Resources
|
|
new[] {InlineKeyboardButton.WithCallbackData(Text.control_panel, Command.control_panel)});
|
|
new[] {InlineKeyboardButton.WithCallbackData(Text.control_panel, Command.control_panel)});
|
|
return new InlineKeyboardMarkup(keyboard);
|
|
return new InlineKeyboardMarkup(keyboard);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public static InlineKeyboardMarkup ShopKeyboard(IEnumerable<ShopEntity> specialOffers)
|
|
|
|
+ {
|
|
|
|
+ var keyboard = new List<InlineKeyboardButton[]>();
|
|
|
|
+ foreach (var offer in specialOffers)
|
|
|
|
+ keyboard.Add(new []{InlineKeyboardButton.WithCallbackData(offer.Title,
|
|
|
|
+ $"{Command.select_offer}={offer.Id}")
|
|
|
|
+ });
|
|
|
|
+ keyboard.Add(new []{InlineKeyboardButton.WithCallbackData(Text.buy_pack, Command.buy_pack)});
|
|
|
|
+ keyboard.Add(new []{InlineKeyboardButton.WithCallbackData(Text.buy_gems, Command.buy_gems)});
|
|
|
|
+ keyboard.Add(new []{InlineKeyboardButton.WithCallbackData(Text.cancel, Command.cancel)});
|
|
|
|
+ return new InlineKeyboardMarkup(keyboard);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static InlineKeyboardMarkup OfferKeyboard(ShopEntity offerInfo)
|
|
|
|
+ {
|
|
|
|
+ var keyboard = new List<InlineKeyboardButton[]>();
|
|
|
|
+ if (offerInfo.PriceCoins >= 0)
|
|
|
|
+ keyboard.Add(new [] {
|
|
|
|
+ InlineKeyboardButton.WithCallbackData($"{Text.buy} {offerInfo.ResultPriceCoins}{Text.coin}",
|
|
|
|
+ Command.buy_by_coins)
|
|
|
|
+ });
|
|
|
|
+ if (offerInfo.PriceGems >= 0)
|
|
|
|
+ keyboard.Add(new [] {
|
|
|
|
+ InlineKeyboardButton.WithCallbackData($"{Text.buy} {offerInfo.ResultPriceGems}{Text.gem}",
|
|
|
|
+ Command.buy_by_gems)
|
|
|
|
+ });
|
|
|
|
+ keyboard.Add(new []{InlineKeyboardButton.WithCallbackData(Text.cancel, Command.cancel)});
|
|
|
|
+ return new InlineKeyboardMarkup(keyboard);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|