Ejemplo n.º 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()));
    }
}
Ejemplo n.º 2
0
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()));
    }
}