예제 #1
0
파일: Text.cpp 프로젝트: Disasm/karya-valya
void TextPainter::Text::Update()
{
    //content_.clear();
    std::string new_content;
    updater_(&new_content);
    if (content_ == new_content)
        return;
    content_.clear();
    content_ = new_content;
    auto local = TTF_RenderText_Blended(master_->GetFont(font_name_, size_), content_.c_str(), color_);
              
    delete content_image_;
    content_image_ = nullptr;

    if (local)
        content_image_ = new ApproxGLImage(local);
}
예제 #2
0
void Actor::update(std::chrono::milliseconds elapsed)
	{
	animations_.setCurrentFrame(updater_(animations_, elapsed));
	}