DialogScene::DialogScene(GameManager * manager, DialogBranch::Ref branch, Globals & globals) : GameScene(manager), m_topScene(manager->getTopScene()), m_branch(branch), m_iter(m_branch->begin()), m_globals(globals) { auto renderer = m_manager->getRenderer(); // init phrase types animation: m_percent = 1.0f; m_oldtype = m_iter->first; m_newtype = m_iter->first; // create font data: m_font = CL_Font_System(renderer->getGC(), "Microsoft Sans Serif", 32); // provide initial layout: updateRects(renderer->getGCSize()); updateLayout(); // attach input handlers: m_slots.connect(renderer->getIC().get_keyboard().sig_key_down(), this, &DialogScene::onKeyDown); m_slots.connect(renderer->getIC().get_mouse().sig_key_down(), this, &DialogScene::onKeyDown); }
OnScreenMessage::OnScreenMessage(CL_Pointf textPos, CL_FontDescription font, CL_Colorf color) : textPos(textPos), color(color), show(false), timeout(0.0f), hasTimeout(false) { fontSystem = CL_Font_System(Application::get()->getGC(), font); }