예제 #1
0
void EC_VideoSource::RegisterActions()
{
    Scene::Entity *entity = GetParentEntity();
    assert(entity);
    if (entity)
    {
        entity->ConnectAction("Play", this, SLOT(Play()));
        entity->ConnectAction("Stop", this, SLOT(Stop()));
        entity->ConnectAction("Pause", this, SLOT(Pause()));
    }
}
예제 #2
0
파일: EC_Touchable.cpp 프로젝트: A-K/naali
void EC_Touchable::RegisterActions()
{
    Scene::Entity *entity = GetParentEntity();
    assert(entity);
    if (entity)
    {
        // Generic actions
        entity->ConnectAction("Show", this, SLOT(Show()));
        entity->ConnectAction("Hide", this, SLOT(Hide()));
        // Mouse actions
        entity->ConnectAction("MouseHover", this, SLOT(OnHover()));
        entity->ConnectAction("MouseHoverIn", this, SLOT(OnHoverIn()));
        entity->ConnectAction("MouseHoverOut", this, SLOT(OnHoverOut()));
        entity->ConnectAction("MousePress", this, SLOT(OnClick()));
    }
}