Address Issue 1381: Mouse look cross hair coloration

Adds debug setting LiruCrosshairColor
This commit is contained in:
Inusaito Sayori
2014-02-07 14:59:03 -05:00
parent 3801949887
commit c4bfdcbeac
2 changed files with 21 additions and 2 deletions

View File

@@ -137,11 +137,14 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
void LLToolGun::draw()
{
if( gSavedSettings.getBOOL("ShowCrosshairs") )
static const LLCachedControl<bool> show("ShowCrosshairs");
if (show)
{
LLUIImagePtr crosshair = LLUI::getUIImage("UIImgCrosshairsUUID");
static const LLCachedControl<LLColor4> color("LiruCrosshairColor");
crosshair->draw(
( gViewerWindow->getWorldViewRectScaled().getWidth() - crosshair->getWidth() ) / 2,
( gViewerWindow->getWorldViewRectScaled().getHeight() - crosshair->getHeight() ) / 2);
( gViewerWindow->getWorldViewRectScaled().getHeight() - crosshair->getHeight() ) / 2,
color);
}
}