本文整理汇总了C++中Card::example_translation方法的典型用法代码示例。如果您正苦于以下问题:C++ Card::example_translation方法的具体用法?C++ Card::example_translation怎么用?C++ Card::example_translation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card::example_translation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrintCard
void MainScreenHandler::PrintCard (const Card& card, bool convert_to_romaji)
{
DrawBgImage ();
ResetTextBoxesPositions ();
if (screen_mode_ == MainScreenMode::KANJI)
{
kanji_->text(card.symbol());
on_reading_->text(card.reading(), convert_to_romaji);
kun_reading_->text(card.reading2(), convert_to_romaji);
translation_->text(card.translation());
example_kanji_->text(card.example_symbol());
example_reading_->text(card.example_reading(), convert_to_romaji);
example_translation_->text(card.example_translation());
// Make all but the kanji and its caption invisible.
caption_on_reading_->visible(false);
caption_kun_reading_->visible(false);
caption_translation_->visible(false);
caption_example_->visible(false);
on_reading_->visible(false);
kun_reading_->visible(false);
translation_->visible(false);
example_kanji_->visible(false);
example_reading_->visible(false);
example_translation_->visible(false);
screens_handler_->tbh()->PrintAll(Screen::MAIN);
}
else if (screen_mode_ == MainScreenMode::VERTICAL_TEXTBOXES ||
screen_mode_ == MainScreenMode::VERTICAL_TEXTBOXES_VISIBLE)
{
bool convert_to_romaji1, convert_to_romaji2, convert_to_romaji3;
convert_to_romaji1 = convert_to_romaji2 = convert_to_romaji3 = false;
std::string box1text, box2text, box3text;
if (game_mode_ == GameMode::KANJI_QUIZ)
{
box1text = card.translation();
box2text = card.reading();
box3text = card.reading2();
convert_to_romaji2 = convert_to_romaji3 = convert_to_romaji;
}
else if (game_mode_ == GameMode::VOCABULARY)
{
box1text = card.symbol();
box2text = card.reading();
box3text = card.translation();
convert_to_romaji2 = convert_to_romaji;
}
else if (game_mode_ == GameMode::VOCABULARY_QUIZ)
{
box1text = card.translation();
box2text = card.reading();
convert_to_romaji2 = convert_to_romaji;
}
if (boxes_number_ >= 1)
{
box1_->text(box1text, convert_to_romaji1);
if (boxes_number_ >= 2)
{
box2_->text(box2text, convert_to_romaji2);
if (boxes_number_ >= 3)
box3_->text(box3text, convert_to_romaji3);
}
}
if (screen_mode_ == MainScreenMode::VERTICAL_TEXTBOXES)
{
if (boxes_number_ >= 2)
{
caption_box2_->visible(false);
box2_->visible(false);
if (boxes_number_>= 3)
{
caption_box3_->visible(false);
box3_->visible(false);
}
}
}
screens_handler_->tbh()->PrintAll(Screen::MAIN);
}
}