Skip to content

Commit

Permalink
Remove sensor turrets property Sensor Power from design screen.
Browse files Browse the repository at this point in the history
Fixes ticket:4619.
  • Loading branch information
Forgon2100 authored and KJeff01 committed Aug 22, 2017
1 parent 26fccd4 commit c6b628e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
23 changes: 1 addition & 22 deletions src/design.cpp
Expand Up @@ -1226,16 +1226,8 @@ static bool intSetSystemForm(COMPONENT_STATS *psStats)
}
sBarInit.denominator = 0;
sBarInit.precision = 0;
sBarInit.id = IDDES_SENSORPOWER;
sBarInit.y = DES_STATBAR_Y2; //+= DES_CLICKBARHEIGHT + DES_CLICKGAP;
sBarInit.iRange = (UDWORD)getMaxSensorRange(); // FIXME: Remove
sBarInit.pTip = _("Sensor Power");
if (!widgAddBarGraph(psWScreen, &sBarInit))
{
return false;
}
sBarInit.id = IDDES_SENSORWEIGHT;
sBarInit.y = DES_STATBAR_Y3; //+= DES_CLICKBARHEIGHT + DES_CLICKGAP;
sBarInit.y = DES_STATBAR_Y2; //+= DES_CLICKBARHEIGHT + DES_CLICKGAP;
sBarInit.iRange = (UWORD)getMaxComponentWeight();//DBAR_MAXWEIGHT;
sBarInit.pTip = _("Weight");
if (!widgAddBarGraph(psWScreen, &sBarInit))
Expand All @@ -1251,14 +1243,6 @@ static bool intSetSystemForm(COMPONENT_STATS *psStats)
{
return false;
}
sLabInit.id = IDDES_SENSORPOWERLAB;
sLabInit.y += DES_CLICKBARHEIGHT + DES_CLICKGAP;
sLabInit.pTip = _("Sensor Power");
sLabInit.UserData = IMAGE_DES_POWER;
if (!widgAddLabel(psWScreen, &sLabInit))
{
return false;
}
sLabInit.id = IDDES_SENSORWEIGHTLAB;
sLabInit.y += DES_CLICKBARHEIGHT + DES_CLICKGAP;
sLabInit.pTip = _("Weight");
Expand Down Expand Up @@ -2139,8 +2123,6 @@ static void intSetSensorStats(SENSOR_STATS *psStats)

/* range */
widgSetBarSize(psWScreen, IDDES_SENSORRANGE, sensorRange(psStats, selectedPlayer));
/* power */
widgSetBarSize(psWScreen, IDDES_SENSORPOWER, 0); // FIXME: Remove
/* weight */
widgSetBarSize(psWScreen, IDDES_SENSORWEIGHT, psStats->weight);
}
Expand All @@ -2158,16 +2140,13 @@ static void intSetSensorShadowStats(SENSOR_STATS *psStats)
/* range */
widgSetMinorBarSize(psWScreen, IDDES_SENSORRANGE,
sensorRange(psStats, (UBYTE)selectedPlayer));
/* power */
widgSetMinorBarSize(psWScreen, IDDES_SENSORPOWER, 0); // FIXME: Remove
/* weight */
widgSetMinorBarSize(psWScreen, IDDES_SENSORWEIGHT, psStats->weight);
}
else
{
/* Remove the shadow bars */
widgSetMinorBarSize(psWScreen, IDDES_SENSORRANGE, 0);
widgSetMinorBarSize(psWScreen, IDDES_SENSORPOWER, 0);
widgSetMinorBarSize(psWScreen, IDDES_SENSORWEIGHT, 0);
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/design.h
Expand Up @@ -58,7 +58,6 @@
#define IDDES_PROPAIR 5108 // The propulsion air speed
#define IDDES_PROPWEIGHT 5109 // The propulsion weight
#define IDDES_SENSORRANGE 5110 // The sensor range
#define IDDES_SENSORPOWER 5111 // The sensor power
#define IDDES_SENSORWEIGHT 5112 // The sensor weight
#define IDDES_ECMPOWER 5115 // The ecm power
#define IDDES_ECMWEIGHT 5116 // The ecm weight
Expand All @@ -84,7 +83,6 @@
#define IDDES_PROPAIRLAB 5208 // The propulsion air speed label
#define IDDES_PROPWEIGHTLAB 5209 // The propulsion weight label
#define IDDES_SENSORRANGELAB 5210 // The sensor range label
#define IDDES_SENSORPOWERLAB 5211 // The sensor power label
#define IDDES_SENSORWEIGHTLAB 5212 // The sensor weight label
#define IDDES_ECMPOWERLAB 5215 // The ecm power label
#define IDDES_ECMWEIGHTLAB 5216 // The ecm weight label
Expand Down

0 comments on commit c6b628e

Please sign in to comment.