Merge branch 'master' into jgrpp-beta
# Conflicts: # src/economy.cpp # src/elrail.cpp # src/graph_gui.cpp # src/linkgraph/linkgraph_gui.cpp # src/network/core/game_info.cpp # src/newgrf_station.cpp # src/saveload/saveload.cpp # src/settings.cpp # src/station_cmd.cpp # src/station_gui.cpp # src/strings_func.h # src/table/settings/network_settings.ini # src/table/settings/settings.ini
This commit is contained in:
@@ -102,7 +102,7 @@ private:
|
||||
void InitMaxWidgetWidth()
|
||||
{
|
||||
this->max_cargo_name_width = 0;
|
||||
for (int i = 0; i < _sorted_standard_cargo_specs_size; i++) {
|
||||
for (int i = 0; i < (int)_sorted_standard_cargo_specs.size(); i++) {
|
||||
SetDParam(0, _sorted_cargo_specs[i]->name);
|
||||
this->max_cargo_name_width = std::max(this->max_cargo_name_width, GetStringBoundingBox(STR_JUST_STRING).width);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
{
|
||||
StringID tooltip = STR_CARGO_TYPE_LOAD_ORDERS_DROP_TOOLTIP + this->variant;
|
||||
const Order *order = this->vehicle->GetOrder(this->order_id);
|
||||
for (int i = 0; i < _sorted_standard_cargo_specs_size; i++) {
|
||||
for (int i = 0; i < (int)_sorted_standard_cargo_specs.size(); i++) {
|
||||
const CargoSpec *cs = _sorted_cargo_specs[i];
|
||||
const CargoID cargo_id = cs->Index();
|
||||
uint8 order_type = (this->variant == CTOWV_LOAD) ? (uint8) order->GetCargoLoadTypeRaw(cargo_id) : (uint8) order->GetCargoUnloadTypeRaw(cargo_id);
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
this->CreateNestedTree(desc);
|
||||
this->GetWidget<NWidgetCore>(WID_CTO_CAPTION)->SetDataTip(STR_CARGO_TYPE_ORDERS_LOAD_CAPTION + this->variant, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
|
||||
this->GetWidget<NWidgetCore>(WID_CTO_HEADER)->SetDataTip(STR_CARGO_TYPE_ORDERS_LOAD_TITLE + this->variant, STR_NULL);
|
||||
this->GetWidget<NWidgetStacked>(WID_CTO_SELECT)->SetDisplayedPlane((_sorted_standard_cargo_specs_size >= 32) ? 0 : SZSP_NONE);
|
||||
this->GetWidget<NWidgetStacked>(WID_CTO_SELECT)->SetDisplayedPlane((_sorted_standard_cargo_specs.size() >= 32) ? 0 : SZSP_NONE);
|
||||
this->InitDropdownSelectedTypes();
|
||||
this->FinishInitNested(v->index);
|
||||
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
} else if (widget == WID_CTO_SET_TO_ALL_DROPDOWN) {
|
||||
ModifyOrder(this->vehicle, this->order_id, mof | (action_type << 4) | (CT_INVALID << 20));
|
||||
|
||||
for (int i = 0; i < _sorted_standard_cargo_specs_size; i++) {
|
||||
for (int i = 0; i < (int)_sorted_standard_cargo_specs.size(); i++) {
|
||||
const CargoSpec *cs = _sorted_cargo_specs[i];
|
||||
const CargoID cargo_id = cs->Index();
|
||||
if (action_type != this->GetOrderActionTypeForCargo(cargo_id)) {
|
||||
@@ -337,12 +337,12 @@ static NWidgetBase *MakeCargoTypeOrdersRows(int *biggest_index, bool right)
|
||||
|
||||
NWidgetVertical *ver = new NWidgetVertical;
|
||||
|
||||
const bool dual_column = (_sorted_standard_cargo_specs_size >= 32);
|
||||
const bool dual_column = (_sorted_standard_cargo_specs.size() >= 32);
|
||||
if (right && !dual_column) return ver;
|
||||
|
||||
const int increment = dual_column ? 2 : 1;
|
||||
|
||||
for (int i = (right ? 1 : 0); i < _sorted_standard_cargo_specs_size; i += increment) {
|
||||
for (int i = (right ? 1 : 0); i < (int)_sorted_standard_cargo_specs.size(); i += increment) {
|
||||
/* Cargo row */
|
||||
NWidgetBackground *panel = new NWidgetBackground(WWT_PANEL, COLOUR_GREY, WID_CTO_CARGO_ROW_FIRST + i);
|
||||
ver->Add(panel);
|
||||
@@ -2447,7 +2447,7 @@ public:
|
||||
case WID_O_COND_AUX_CARGO: {
|
||||
uint value = this->vehicle->GetOrder(this->OrderGetSel())->GetConditionValue();
|
||||
DropDownList list;
|
||||
for (size_t i = 0; i < _sorted_standard_cargo_specs_size; ++i) {
|
||||
for (size_t i = 0; i < _sorted_standard_cargo_specs.size(); ++i) {
|
||||
const CargoSpec *cs = _sorted_cargo_specs[i];
|
||||
list.emplace_back(new DropDownListStringItem(cs->name, cs->Index(), false));
|
||||
}
|
||||
|
Reference in New Issue
Block a user