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

@@ -651,6 +651,22 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LiruCrosshairColor</key>
<map>
<key>Comment</key>
<string>Color of crosshairs in mouselook</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>LiruGridInTitle</key>
<map>
<key>Comment</key>

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);
}
}