Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/cargomonitor.cpp # src/core/CMakeLists.txt # src/economy.cpp # src/landscape.cpp # src/linkgraph/flowmapper.cpp # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/linkgraphschedule.cpp # src/misc_gui.cpp # src/newgrf_generic.cpp # src/newgrf_storage.cpp # src/rail_gui.cpp # src/saveload/afterload.cpp # src/saveload/station_sl.cpp # src/script/script_gui.cpp # src/station_cmd.cpp # src/station_gui.cpp # src/string_func.h # src/terraform_cmd.cpp
This commit is contained in:
@@ -537,14 +537,16 @@ public:
|
||||
icon.bottom = icon.top + this->legend.height - 1;
|
||||
|
||||
for (uint16 i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < this->vscroll->GetCount(); i++) {
|
||||
bool selected = this->selected_type == this->list[i];
|
||||
|
||||
const IndustrySpec *indsp = GetIndustrySpec(this->list[i]);
|
||||
IndustryType type = this->list[i];
|
||||
bool selected = this->selected_type == type;
|
||||
const IndustrySpec *indsp = GetIndustrySpec(type);
|
||||
|
||||
/* Draw the name of the industry in white is selected, otherwise, in orange */
|
||||
DrawString(text, indsp->name, selected ? TC_WHITE : TC_ORANGE);
|
||||
GfxFillRect(icon, selected ? PC_WHITE : PC_BLACK);
|
||||
GfxFillRect(icon.Shrink(WidgetDimensions::scaled.bevel), indsp->map_colour);
|
||||
SetDParam(0, Industry::GetIndustryTypeCount(type));
|
||||
DrawString(text, STR_JUST_COMMA, TC_BLACK, SA_RIGHT, false, FS_SMALL);
|
||||
|
||||
text = text.Translate(0, this->resize.step_height);
|
||||
icon = icon.Translate(0, this->resize.step_height);
|
||||
|
Reference in New Issue
Block a user