|
@@ -189,27 +189,29 @@ namespace MafiaTelegramBot.Resources
|
|
|
return inlineButtons;
|
|
|
}
|
|
|
|
|
|
- public static InlineKeyboardMarkup SettingsRoomKeyboard(long userId, string timerStatus, bool extendedRoom)
|
|
|
+ public static InlineKeyboardMarkup SettingsRoomKeyboard(long userId, string timerStatus)
|
|
|
{
|
|
|
-
|
|
|
- return extendedRoom
|
|
|
- ? new InlineKeyboardMarkup( new[]
|
|
|
- {
|
|
|
- new[] {InlineKeyboardButton.WithCallbackData(timerStatus, $"{Callback.SwitchTimer}|{userId}")},
|
|
|
- new[] {InlineKeyboardButton.WithCallbackData(strings.players_count, $"{Callback.PlayersCount}|{userId}")},
|
|
|
- new[] {InlineKeyboardButton.WithCallbackData(strings.change_roles, $"{Callback.ChangeRoles}|{userId}")}
|
|
|
- })
|
|
|
- : new InlineKeyboardMarkup( new[]
|
|
|
- {
|
|
|
- new[] {InlineKeyboardButton.WithCallbackData(timerStatus, $"{Callback.SwitchTimer}|{userId}")},
|
|
|
- new[] {InlineKeyboardButton.WithCallbackData(strings.players_count, $"{Callback.PlayersCount}|{userId}")}
|
|
|
+
|
|
|
+ return new (new[]
|
|
|
+ {
|
|
|
+ new[] { InlineKeyboardButton.WithCallbackData(timerStatus, $"{Callback.SwitchTimer}|{userId}") },
|
|
|
+ new[] { InlineKeyboardButton.WithCallbackData(strings.players_count, $"{Callback.PlayersCount}|{userId}") },
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ public static InlineKeyboardMarkup StartExtendedRoomKeyboard(long userId)
|
|
|
+ {
|
|
|
+ return new (new[]
|
|
|
+ {
|
|
|
+ new[] { InlineKeyboardButton.WithCallbackData(strings.run_game, $"{Callback.StartGame}|{userId}") },
|
|
|
+ new[] { InlineKeyboardButton.WithCallbackData(strings.change_roles, $"{Callback.ChangeRoles}|{userId}") }
|
|
|
});
|
|
|
}
|
|
|
|
|
|
public static InlineKeyboardMarkup ChangeRolesKeyboard(long userId, string roomKey, ExtendedGameRoom room)
|
|
|
{
|
|
|
var openedRoles = room.Owner.OpenedRoles.ToList();
|
|
|
- var keyboard = new InlineKeyboardButton[2+openedRoles.Count][];
|
|
|
+ var keyboard = new InlineKeyboardButton[3+openedRoles.Count][];
|
|
|
keyboard[0] = new[]
|
|
|
{
|
|
|
InlineKeyboardButton.WithCallbackData($"{roles.Mafia}-",
|
|
@@ -232,6 +234,8 @@ namespace MafiaTelegramBot.Resources
|
|
|
$"{Callback.ApplyRolesChange}|{userId}|{roomKey}|{openedRoles[i]}"
|
|
|
)};
|
|
|
}
|
|
|
+ keyboard[openedRoles.Count+2] = new[]
|
|
|
+ { InlineKeyboardButton.WithCallbackData(strings.run_game, $"{Callback.StartGame}|{userId}") };
|
|
|
return keyboard;
|
|
|
}
|
|
|
}
|