Removed NWST_STEP and min_step, we don't need two variables doing the same thing
This commit is contained in:
@@ -129,7 +129,7 @@ struct SubsidyListWindow : Window {
|
||||
{
|
||||
if (widget != WID_SUL_PANEL) return;
|
||||
Dimension d = maxdim(GetStringBoundingBox(STR_SUBSIDIES_OFFERED_TITLE), GetStringBoundingBox(STR_SUBSIDIES_SUBSIDISED_TITLE));
|
||||
d.height = GetMinSizing(NWST_STEP, d.height);
|
||||
d.height = GetMinSizing(NWST_BUTTON, d.height);
|
||||
|
||||
resize->height = d.height;
|
||||
|
||||
@@ -149,13 +149,13 @@ struct SubsidyListWindow : Window {
|
||||
int right = r.right - WD_FRAMERECT_RIGHT;
|
||||
int y = r.top + WD_FRAMERECT_TOP;
|
||||
int x = r.left + WD_FRAMERECT_LEFT;
|
||||
y = Center(y, GetMinSizing(NWST_STEP));
|
||||
y = Center(y, GetMinSizing(NWST_BUTTON));
|
||||
|
||||
int pos = -this->vscroll->GetPosition();
|
||||
const int cap = this->vscroll->GetCapacity();
|
||||
|
||||
/* Section for drawing the offered subsidies */
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_STEP), STR_SUBSIDIES_OFFERED_TITLE);
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_BUTTON), STR_SUBSIDIES_OFFERED_TITLE);
|
||||
pos++;
|
||||
|
||||
uint num = 0;
|
||||
@@ -165,7 +165,7 @@ struct SubsidyListWindow : Window {
|
||||
/* Displays the two offered towns */
|
||||
SetupSubsidyDecodeParam(s, true);
|
||||
SetDParam(7, _date - ymd.day + s->remaining * 32);
|
||||
DrawString(x, right, y + pos * GetMinSizing(NWST_STEP), STR_SUBSIDIES_OFFERED_FROM_TO);
|
||||
DrawString(x, right, y + pos * GetMinSizing(NWST_BUTTON), STR_SUBSIDIES_OFFERED_FROM_TO);
|
||||
}
|
||||
pos++;
|
||||
num++;
|
||||
@@ -173,13 +173,13 @@ struct SubsidyListWindow : Window {
|
||||
}
|
||||
|
||||
if (num == 0) {
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_STEP), STR_SUBSIDIES_NONE);
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_BUTTON), STR_SUBSIDIES_NONE);
|
||||
pos++;
|
||||
}
|
||||
|
||||
/* Section for drawing the already granted subsidies */
|
||||
pos++;
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_STEP), STR_SUBSIDIES_SUBSIDISED_TITLE);
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_BUTTON), STR_SUBSIDIES_SUBSIDISED_TITLE);
|
||||
pos++;
|
||||
num = 0;
|
||||
|
||||
@@ -191,7 +191,7 @@ struct SubsidyListWindow : Window {
|
||||
SetDParam(8, _date - ymd.day + s->remaining * 32);
|
||||
|
||||
/* Displays the two connected stations */
|
||||
DrawString(x, right, y + pos * GetMinSizing(NWST_STEP), STR_SUBSIDIES_SUBSIDISED_FROM_TO);
|
||||
DrawString(x, right, y + pos * GetMinSizing(NWST_BUTTON), STR_SUBSIDIES_SUBSIDISED_FROM_TO);
|
||||
}
|
||||
pos++;
|
||||
num++;
|
||||
@@ -199,7 +199,7 @@ struct SubsidyListWindow : Window {
|
||||
}
|
||||
|
||||
if (num == 0) {
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_STEP), STR_SUBSIDIES_NONE);
|
||||
if (IsInsideMM(pos, 0, cap)) DrawString(x, right, y + pos * GetMinSizing(NWST_BUTTON), STR_SUBSIDIES_NONE);
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user