Quantcast
Channel: OTLand
Viewing all articles
Browse latest Browse all 32043

crossHair mousePos

$
0
0
Hi guys!

I try make this feature (setCrossHair), but something don't work. I created a method using g_painter but it is not rendering the image

Code:
void UIMap::setCrossHair(const Point& mousePos) {
    g_logger.debug(stdext::format("crossHair"));

    Rect r = Rect(mousePos.x, mousePos.y, 32, 32);
    g_painter->setColor(Color::white);
    g_painter->drawTexturedRect(r, g_textures.getTexture("/images/crosshair/default.png"));
}

Viewing all articles
Browse latest Browse all 32043

Trending Articles