Codechange: Don't use bytes for months in graph GUI
This commit is contained in:
@@ -185,7 +185,7 @@ protected:
|
|||||||
byte num_vert_lines;
|
byte num_vert_lines;
|
||||||
|
|
||||||
/* The starting month and year that values are plotted against. */
|
/* The starting month and year that values are plotted against. */
|
||||||
byte month;
|
TimerGameCalendar::Month month;
|
||||||
TimerGameCalendar::Year year;
|
TimerGameCalendar::Year year;
|
||||||
|
|
||||||
bool draw_dates = true; ///< Should we draw months and years on the time axis?
|
bool draw_dates = true; ///< Should we draw months and years on the time axis?
|
||||||
@@ -385,7 +385,7 @@ protected:
|
|||||||
if (this->draw_dates) {
|
if (this->draw_dates) {
|
||||||
x = r.left;
|
x = r.left;
|
||||||
y = r.bottom + ScaleGUITrad(2);
|
y = r.bottom + ScaleGUITrad(2);
|
||||||
byte month = this->month;
|
TimerGameCalendar::Month month = this->month;
|
||||||
TimerGameCalendar::Year year = this->year;
|
TimerGameCalendar::Year year = this->year;
|
||||||
for (int i = 0; i < this->num_on_x_axis; i++) {
|
for (int i = 0; i < this->num_on_x_axis; i++) {
|
||||||
SetDParam(0, month + STR_MONTH_ABBREV_JAN);
|
SetDParam(0, month + STR_MONTH_ABBREV_JAN);
|
||||||
@@ -502,7 +502,7 @@ public:
|
|||||||
|
|
||||||
/* Draw x-axis labels and markings for graphs based on financial quarters and years. */
|
/* Draw x-axis labels and markings for graphs based on financial quarters and years. */
|
||||||
if (this->draw_dates) {
|
if (this->draw_dates) {
|
||||||
byte month = this->month;
|
TimerGameCalendar::Month month = this->month;
|
||||||
TimerGameCalendar::Year year = this->year;
|
TimerGameCalendar::Year year = this->year;
|
||||||
for (int i = 0; i < this->num_on_x_axis; i++) {
|
for (int i = 0; i < this->num_on_x_axis; i++) {
|
||||||
SetDParam(0, month + STR_MONTH_ABBREV_JAN);
|
SetDParam(0, month + STR_MONTH_ABBREV_JAN);
|
||||||
|
Reference in New Issue
Block a user