Esempio n. 1
0
void Theme::Style::Overlay::setImageRegion(const char* id, const Rectangle& region, float tw, float th)
{
    ThemeImage* image = _imageList->getImage(id);
    assert(image);
    image->_region.set(region);
    generateUVs(tw, th, region.x, region.y, region.width, region.height, &(image->_uvs));
}
Esempio n. 2
0
void Theme::Style::Overlay::setCursorRegion(const Rectangle& region, float tw, float th)
{
    assert(_cursor);
    _cursor->_region.set(region);
    generateUVs(tw, th, region.x, region.y, region.width, region.height, &(_cursor->_uvs));
}
Esempio n. 3
0
/*********************
 * Theme::ThemeImage *
 *********************/
Theme::ThemeImage::ThemeImage(float tw, float th, const Rectangle& region, const Vector4& color)
    : _region(region), _color(color)
{
    generateUVs(tw, th, region.x, region.y, region.width, region.height, &_uvs);
}