Rename GuiSpeedometer::mColor to mNeedleColor to avoid clash with parent

This commit is contained in:
Lukas Joergensen 2019-08-03 12:41:27 +02:00 committed by Lukas Aldershaab
parent a241d27b58
commit 5a994bdddc

View file

@ -41,7 +41,7 @@ class GuiSpeedometerHud : public GuiBitmapCtrl
F32 mMaxAngle; ///< Max pos of needle F32 mMaxAngle; ///< Max pos of needle
F32 mMinAngle; ///< Min pos of needle F32 mMinAngle; ///< Min pos of needle
Point2F mCenter; ///< Center of needle rotation Point2F mCenter; ///< Center of needle rotation
LinearColorF mColor; ///< Needle Color LinearColorF mNeedleColor; ///< Needle Color
F32 mNeedleLength; F32 mNeedleLength;
F32 mNeedleWidth; F32 mNeedleWidth;
F32 mTailLength; F32 mTailLength;
@ -103,7 +103,7 @@ GuiSpeedometerHud::GuiSpeedometerHud()
mNeedleWidth = 3; mNeedleWidth = 3;
mNeedleLength = 10; mNeedleLength = 10;
mTailLength = 5; mTailLength = 5;
mColor.set(1,0,0,1); mNeedleColor.set(1,0,0,1);
} }
void GuiSpeedometerHud::initPersistFields() void GuiSpeedometerHud::initPersistFields()
@ -122,7 +122,7 @@ void GuiSpeedometerHud::initPersistFields()
"Angle (in radians) of the needle when the Vehicle speed is >= maxSpeed. " "Angle (in radians) of the needle when the Vehicle speed is >= maxSpeed. "
"An angle of 0 points right, 90 points up etc)." ); "An angle of 0 points right, 90 points up etc)." );
addField("color", TypeColorF, Offset( mColor, GuiSpeedometerHud ), addField("color", TypeColorF, Offset( mNeedleColor, GuiSpeedometerHud ),
"Color of the needle" ); "Color of the needle" );
addField("center", TypePoint2F, Offset( mCenter, GuiSpeedometerHud ), addField("center", TypePoint2F, Offset( mCenter, GuiSpeedometerHud ),
@ -210,7 +210,7 @@ void GuiSpeedometerHud::onRender(Point2I offset, const RectI &updateRect)
GFX->setTexture(0, NULL); GFX->setTexture(0, NULL);
// Render the needle // Render the needle
PrimBuild::color4f(mColor.red, mColor.green, mColor.blue, mColor.alpha); PrimBuild::color4f(mNeedleColor.red, mNeedleColor.green, mNeedleColor.blue, mNeedleColor.alpha);
PrimBuild::begin(GFXLineStrip, 5); PrimBuild::begin(GFXLineStrip, 5);
for(int k=0; k<5; k++){ for(int k=0; k<5; k++){
rotMatrix.mulP(vertList[k]); rotMatrix.mulP(vertList[k]);