Started creating structure of bot interface
This commit is contained in:
parent
879a7981cd
commit
602e9b62d8
8 changed files with 122 additions and 0 deletions
15
modules/bot/front/src/KeyboardFactory.cpp
Normal file
15
modules/bot/front/src/KeyboardFactory.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include "KeyboardFactory.hpp"
|
||||
#include "constants.hpp"
|
||||
|
||||
TgBot::InlineKeyboardMarkup::Ptr KeyboardFactory::createMainMenu() {
|
||||
auto keyboard = std::make_shared<TgBot::InlineKeyboardMarkup>();
|
||||
TgBot::InlineKeyboardButton::Ptr button1(new TgBot::InlineKeyboardButton);
|
||||
button1->text = BotConstants::Button::FIND_ANIME;
|
||||
button1->callbackData = BotConstants::Callback::FIND_ANIME;
|
||||
TgBot::InlineKeyboardButton::Ptr button2(new TgBot::InlineKeyboardButton);
|
||||
button2->text = BotConstants::Button::MY_TITLES;
|
||||
button2->callbackData = BotConstants::Callback::MY_TITLES;
|
||||
|
||||
keyboard->inlineKeyboard = {{button1, button2}};
|
||||
return keyboard;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue