Codechange: use std::variant instead of using bitflags in the value (#11191)
This commit is contained in:
@@ -308,7 +308,11 @@ struct NewsWindow : Window {
|
||||
/* Initialize viewport if it exists. */
|
||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_N_VIEWPORT);
|
||||
if (nvp != nullptr) {
|
||||
nvp->InitializeViewport(this, ni->reftype1 == NR_VEHICLE ? 0x80000000 | ni->ref1 : (uint32_t)GetReferenceTile(ni->reftype1, ni->ref1),ScaleZoomGUI(ZOOM_LVL_NEWS));
|
||||
if (ni->reftype1 == NR_VEHICLE) {
|
||||
nvp->InitializeViewport(this, GetReferenceTile(ni->reftype1, ni->ref1), ScaleZoomGUI(ZOOM_LVL_NEWS));
|
||||
} else {
|
||||
nvp->InitializeViewport(this, static_cast<VehicleID>(ni->ref1), ScaleZoomGUI(ZOOM_LVL_NEWS));
|
||||
}
|
||||
if (this->ni->flags & NF_NO_TRANSPARENT) nvp->disp_flags |= ND_NO_TRANSPARENCY;
|
||||
if ((this->ni->flags & NF_INCOLOUR) == 0) {
|
||||
nvp->disp_flags |= ND_SHADE_GREY;
|
||||
|
Reference in New Issue
Block a user