mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Remove focus union and replace with typed focus (#15426)
* Remove focus union and replace with typed focus This if for the NSF to allow for CoordsXYZ * Remove legacy structures * Rework viewport_create to deduplicate logic * Simplify yet further * Apply review comments * Remove intermediate
This commit is contained in:
@@ -786,12 +786,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto wheight = viewportWidget->height() - 1;
|
||||
if (viewport == nullptr)
|
||||
{
|
||||
auto mapX = 0;
|
||||
auto mapY = 0;
|
||||
auto mapZ = 0;
|
||||
viewport_create(
|
||||
this, { left, top }, wwidth, wheight, 0, { mapX, mapY, mapZ }, VIEWPORT_FOCUS_TYPE_COORDINATE,
|
||||
SPRITE_INDEX_NULL);
|
||||
const auto focus = Focus2(CoordsXYZ(0, 0, 0));
|
||||
viewport_create(this, { left, top }, wwidth, wheight, focus);
|
||||
flags |= WF_NO_SCROLLING;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user