Rename LIST_ROW_HEIGHT to kListRowHeight

This commit is contained in:
Harry-Hopkinson 2024-04-14 16:37:01 +00:00
parent c5cfc65317
commit f242bbf095
15 changed files with 137 additions and 137 deletions

View File

@ -26,7 +26,7 @@ using namespace OpenRCT2::Ui::Windows;
namespace OpenRCT2::Scripting
{
constexpr size_t COLUMN_HEADER_HEIGHT = LIST_ROW_HEIGHT + 1;
constexpr size_t COLUMN_HEADER_HEIGHT = kListRowHeight + 1;
template<> ColumnSortOrder FromDuk(const DukValue& d)
{
@ -416,7 +416,7 @@ ScreenSize CustomListView::GetSize()
}
if (Scrollbars == ScrollbarType::Vertical || Scrollbars == ScrollbarType::Both)
{
result.height = static_cast<int32_t>(Items.size() * LIST_ROW_HEIGHT);
result.height = static_cast<int32_t>(Items.size() * kListRowHeight);
if (ShowColumnHeaders)
{
result.height += COLUMN_HEADER_HEIGHT;
@ -563,7 +563,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
break;
}
if (y + LIST_ROW_HEIGHT >= dpi.y)
if (y + kListRowHeight >= dpi.y)
{
const auto& itemIndex = static_cast<int32_t>(SortedItems[i]);
const auto& item = Items[itemIndex];
@ -571,7 +571,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
if (item.IsSeparator)
{
const auto& text = item.Cells[0];
ScreenSize cellSize = { LastKnownSize.width, LIST_ROW_HEIGHT };
ScreenSize cellSize = { LastKnownSize.width, kListRowHeight };
PaintSeperator(dpi, { 0, y }, cellSize, text.c_str());
}
else
@ -583,19 +583,19 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
if (isSelected)
{
GfxFilterRect(
dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (LIST_ROW_HEIGHT - 1) } },
dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (kListRowHeight - 1) } },
FilterPaletteID::PaletteDarken2);
}
else if (isHighlighted)
{
GfxFilterRect(
dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (LIST_ROW_HEIGHT - 1) } },
dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (kListRowHeight - 1) } },
FilterPaletteID::PaletteDarken2);
}
else if (isStriped)
{
GfxFillRect(
dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (LIST_ROW_HEIGHT - 1) } },
dpi, { { dpi.x, y }, { dpi.x + dpi.width, y + (kListRowHeight - 1) } },
ColourMapA[w->colours[1]].lighter | 0x1000000);
}
@ -607,7 +607,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
const auto& text = item.Cells[0];
if (!text.empty())
{
ScreenSize cellSize = { std::numeric_limits<int32_t>::max(), LIST_ROW_HEIGHT };
ScreenSize cellSize = { std::numeric_limits<int32_t>::max(), kListRowHeight };
PaintCell(dpi, { 0, y }, cellSize, text.c_str(), isHighlighted);
}
}
@ -623,7 +623,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
const auto& text = item.Cells[j];
if (!text.empty())
{
ScreenSize cellSize = { column.Width, LIST_ROW_HEIGHT };
ScreenSize cellSize = { column.Width, kListRowHeight };
PaintCell(dpi, { x, y }, cellSize, text.c_str(), isHighlighted);
}
}
@ -633,7 +633,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
}
}
y += LIST_ROW_HEIGHT;
y += kListRowHeight;
}
if (ShowColumnHeaders)
@ -657,7 +657,7 @@ void CustomListView::Paint(WindowBase* w, DrawPixelInfo& dpi, const ScrollBar* s
}
bool isPressed = ColumnHeaderPressed == j && ColumnHeaderPressedCurrentState;
PaintHeading(w, dpi, { x, y }, { column.Width, LIST_ROW_HEIGHT }, column.Header, sortOrder, isPressed);
PaintHeading(w, dpi, { x, y }, { column.Width, kListRowHeight }, column.Header, sortOrder, isPressed);
x += columnWidth;
}
}
@ -771,7 +771,7 @@ std::optional<RowColumn> CustomListView::GetItemIndexAt(const ScreenCoordsXY& po
// Check if we pressed the header
auto& scroll = ParentWindow->scrolls[ScrollIndex];
int32_t absoluteY = pos.y - scroll.v_top;
if (ShowColumnHeaders && absoluteY >= 0 && absoluteY < LIST_ROW_HEIGHT)
if (ShowColumnHeaders && absoluteY >= 0 && absoluteY < kListRowHeight)
{
result = RowColumn();
result->Row = HEADER_ROW;
@ -780,7 +780,7 @@ std::optional<RowColumn> CustomListView::GetItemIndexAt(const ScreenCoordsXY& po
{
// Check what row we pressed
int32_t firstY = ShowColumnHeaders ? COLUMN_HEADER_HEIGHT : 0;
int32_t row = (pos.y - firstY) / LIST_ROW_HEIGHT;
int32_t row = (pos.y - firstY) / kListRowHeight;
if (row >= 0 && row < static_cast<int32_t>(Items.size()))
{
result = RowColumn();

View File

@ -640,7 +640,7 @@ static Widget _inventionListDragWidgets[] = {
do
{
res = inventionListWindow->GetResearchItemAt(newScreenCoords);
newScreenCoords.y += LIST_ROW_HEIGHT;
newScreenCoords.y += kListRowHeight;
} while (res.has_value() && res->research != nullptr && res->research->IsAlwaysResearched());
if (res.has_value())

View File

@ -1241,7 +1241,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
screenPos.y += DrawTextWrapped(
dpi, screenPos, _width2, STR_OBJECT_SELECTION_COMPAT_OBJECT_DESCRIPTION, {},
{ COLOUR_BRIGHT_RED })
+ LIST_ROW_HEIGHT;
+ kListRowHeight;
}
auto description = ObjectGetDescription(_loadedObject.get());
@ -1251,7 +1251,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
ft.Add<StringId>(STR_STRING);
ft.Add<const char*>(description.c_str());
screenPos.y += DrawTextWrapped(dpi, screenPos, _width2, STR_WINDOW_COLOUR_2_STRINGID, ft) + LIST_ROW_HEIGHT;
screenPos.y += DrawTextWrapped(dpi, screenPos, _width2, STR_WINDOW_COLOUR_2_STRINGID, ft) + kListRowHeight;
}
if (GetSelectedObjectType() == ObjectType::Ride)
{
@ -1305,14 +1305,14 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
void DrawDebugData(DrawPixelInfo& dpi)
{
ObjectListItem* listItem = &_listItems[selected_list_item];
auto screenPos = windowPos + ScreenCoordsXY{ width - 5, height - (LIST_ROW_HEIGHT * 6) };
auto screenPos = windowPos + ScreenCoordsXY{ width - 5, height - (kListRowHeight * 6) };
// Draw fallback image warning
if (_loadedObject && _loadedObject->UsesFallbackImages())
{
DrawTextBasic(dpi, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
}
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Draw ride type.
if (GetSelectedObjectType() == ObjectType::Ride)
@ -1321,12 +1321,12 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
DrawTextBasic(dpi, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
}
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Draw object source
auto stringId = ObjectManagerGetSourceGameString(listItem->repositoryItem->GetFirstSourceGame());
DrawTextBasic(dpi, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Draw object filename
{
@ -1337,7 +1337,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
DrawTextBasic(
dpi, { windowPos.x + this->width - 5, screenPos.y }, STR_WINDOW_COLOUR_2_STRINGID, ft,
{ COLOUR_BLACK, TextAlignment::RIGHT });
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
// Draw object author (will be blank space if no author in file or a non JSON object)

View File

@ -809,7 +809,7 @@ static Widget _windowFinancesResearchWidgets[] =
{
// Count number of active campaigns
int32_t numActiveCampaigns = static_cast<int32_t>(gMarketingCampaigns.size());
int32_t y = std::max(1, numActiveCampaigns) * LIST_ROW_HEIGHT + 92;
int32_t y = std::max(1, numActiveCampaigns) * kListRowHeight + 92;
// Update group box positions
_windowFinancesMarketingWidgets[WIDX_ACTIVE_CAMPAIGNS_GROUP].bottom = y - 22;
@ -886,13 +886,13 @@ static Widget _windowFinancesResearchWidgets[] =
dpi, screenCoords + ScreenCoordsXY{ 304, 0 },
weeksRemaining == 1 ? STR_1_WEEK_REMAINING : STR_X_WEEKS_REMAINING, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
if (noCampaignsActive)
{
DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, STR_MARKETING_CAMPAIGNS_NONE);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
screenCoords.y += 34;

View File

@ -1098,7 +1098,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
StatsBarsDraw(happiness, screenCoords, dpi, barColour, barBlink);
// Energy
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_ENERGY_LABEL);
int32_t energy = NormalizeGuestStatValue(peep->Energy - PEEP_MIN_ENERGY, PEEP_MAX_ENERGY - PEEP_MIN_ENERGY, 10);
@ -1107,7 +1107,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
StatsBarsDraw(energy, screenCoords, dpi, barColour, barBlink);
// Hunger
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_HUNGER_LABEL);
int32_t hunger = NormalizeGuestStatValue(peep->Hunger - 32, 158, 0);
@ -1117,7 +1117,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
StatsBarsDraw(hunger, screenCoords, dpi, barColour, barBlink);
// Thirst
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_THIRST_LABEL);
int32_t thirst = NormalizeGuestStatValue(peep->Thirst - 32, 158, 0);
@ -1127,7 +1127,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
StatsBarsDraw(thirst, screenCoords, dpi, barColour, barBlink);
// Nausea
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_NAUSEA_LABEL);
int32_t nausea = NormalizeGuestStatValue(peep->Nausea - 32, 223, 0);
@ -1136,7 +1136,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
StatsBarsDraw(nausea, screenCoords, dpi, barColour, barBlink);
// Toilet
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TOILET_LABEL);
int32_t toilet = NormalizeGuestStatValue(peep->Toilet - 64, 178, 0);
@ -1145,7 +1145,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
StatsBarsDraw(toilet, screenCoords, dpi, barColour, barBlink);
// Time in park
screenCoords.y += LIST_ROW_HEIGHT + 1;
screenCoords.y += kListRowHeight + 1;
int32_t guestEntryTime = peep->GetParkEntryTime();
if (guestEntryTime != -1)
{
@ -1155,14 +1155,14 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft);
}
screenCoords.y += LIST_ROW_HEIGHT + 9;
screenCoords.y += kListRowHeight + 9;
GfxFillRectInset(
dpi, { screenCoords - ScreenCoordsXY{ 0, 6 }, screenCoords + ScreenCoordsXY{ 179, -5 } }, colours[1],
INSET_RECT_FLAG_BORDER_INSET);
// Preferred Ride
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_PREFERRED_RIDE);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Intensity
{
@ -1193,7 +1193,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
STR_PEEP_STAT_NAUSEA_TOLERANCE_AVERAGE,
STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH,
};
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
auto nausea_tolerance = EnumValue(peep->NauseaTolerance) & 0x3;
auto ft = Formatter();
ft.Add<StringId>(_nauseaTolerances[nausea_tolerance]);
@ -1429,7 +1429,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
auto ft = Formatter();
ft.Add<money64>(peep->CashInPocket);
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_CASH_IN_POCKET, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Cash spent
@ -1437,7 +1437,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
auto ft = Formatter();
ft.Add<money64>(peep->CashSpent);
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_CASH_SPENT, ft);
screenCoords.y += LIST_ROW_HEIGHT * 2;
screenCoords.y += kListRowHeight * 2;
}
GfxFillRectInset(
@ -1449,7 +1449,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
auto ft = Formatter();
ft.Add<money64>(peep->PaidToEnter);
DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_ENTRANCE_FEE, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Paid on rides
{
@ -1464,7 +1464,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
{
DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_RIDE, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Paid on food
{
@ -1479,7 +1479,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
{
DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_FOOD, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Paid on drinks
@ -1495,7 +1495,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
{
DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_DRINK, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Paid on souvenirs
{
@ -1834,7 +1834,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
ft.Add<uint32_t>(peep->Id);
DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_SPRITE_INDEX, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
{
auto ft = Formatter();
ft.Add<int32_t>(peep->x);
@ -1842,7 +1842,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
ft.Add<int32_t>(peep->z);
DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_POSITION, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
{
auto ft = Formatter();
ft.Add<int32_t>(peep->NextLoc.x);
@ -1863,7 +1863,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
}
GfxDrawString(dpi, screenCoords, buffer, {});
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
{
auto ft = Formatter();
ft.Add<int32_t>(peep->DestinationX);
@ -1871,7 +1871,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
ft.Add<int32_t>(peep->DestinationTolerance);
DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_DEST, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
{
auto ft = Formatter();
ft.Add<int32_t>(peep->PathfindGoal.x);
@ -1880,9 +1880,9 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
ft.Add<int32_t>(peep->PathfindGoal.direction);
DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_GOAL, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
screenCoords.x += 10;
for (auto& point : peep->PathfindHistory)
@ -1893,7 +1893,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
ft.Add<int32_t>(point.z);
ft.Add<int32_t>(point.direction);
DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
screenCoords.x -= 10;
}

View File

@ -176,7 +176,7 @@ static Widget window_install_track_widgets[] = {
// Scenery not available
DrawTextEllipsised(
dpi, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE });
screenPos.y -= LIST_ROW_HEIGHT;
screenPos.y -= kListRowHeight;
}
}
@ -190,7 +190,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<const char*>(trackName);
DrawTextBasic(dpi, screenPos - ScreenCoordsXY{ 1, 0 }, STR_TRACK_DESIGN_NAME, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
// Friendly Track name
@ -211,7 +211,7 @@ static Widget window_install_track_widgets[] = {
}
DrawTextBasic(dpi, screenPos, STR_TRACK_DESIGN_TYPE, ft);
screenPos.y += LIST_ROW_HEIGHT + 4;
screenPos.y += kListRowHeight + 4;
}
// Stats
@ -220,21 +220,21 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<int32_t>(rating);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
{
fixed32_2dp rating = td6->intensity * 10;
auto ft = Formatter();
ft.Add<int32_t>(rating);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
{
fixed32_2dp rating = td6->nausea * 10;
auto ft = Formatter();
ft.Add<int32_t>(rating);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft);
screenPos.y += LIST_ROW_HEIGHT + 4;
screenPos.y += kListRowHeight + 4;
}
const auto& rtd = GetRideTypeDescriptor(td6->type);
@ -247,7 +247,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<uint16_t>(holes);
DrawTextBasic(dpi, screenPos, STR_HOLES, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
else
{
@ -257,7 +257,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<uint16_t>(speed);
DrawTextBasic(dpi, screenPos, STR_MAX_SPEED, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
// Average speed
{
@ -265,7 +265,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<uint16_t>(speed);
DrawTextBasic(dpi, screenPos, STR_AVERAGE_SPEED, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
}
@ -274,7 +274,7 @@ static Widget window_install_track_widgets[] = {
ft.Add<StringId>(STR_RIDE_LENGTH_ENTRY);
ft.Add<uint16_t>(td6->ride_length);
DrawTextEllipsised(dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (GetRideTypeDescriptor(td6->type).HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES))
@ -285,7 +285,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<int32_t>(gForces);
DrawTextBasic(dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
// Maximum negative vertical Gs
{
@ -293,7 +293,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<int32_t>(gForces);
DrawTextBasic(dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
// Maximum lateral Gs
{
@ -301,7 +301,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<int32_t>(gForces);
DrawTextBasic(dpi, screenPos, STR_MAX_LATERAL_G, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (td6->total_air_time != 0)
{
@ -310,7 +310,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<int32_t>(airTime);
DrawTextBasic(dpi, screenPos, STR_TOTAL_AIR_TIME, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
}
@ -321,11 +321,11 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<uint16_t>(drops);
DrawTextBasic(dpi, screenPos, STR_DROPS, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Drop height is multiplied by 0.75
DrawTextBasic(dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (td6->type != RIDE_TYPE_MINI_GOLF)
@ -337,7 +337,7 @@ static Widget window_install_track_widgets[] = {
auto ft = Formatter();
ft.Add<uint16_t>(inversions);
DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
}
screenPos.y += 4;
@ -349,7 +349,7 @@ static Widget window_install_track_widgets[] = {
ft.Add<uint16_t>(td6->space_required_x);
ft.Add<uint16_t>(td6->space_required_y);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (td6->cost != 0)

View File

@ -963,11 +963,11 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = {
GfxFillRect(
dpi, { screenCoords + ScreenCoordsXY{ 0, 2 }, screenCoords + ScreenCoordsXY{ 6, 8 } },
RideKeyColours[i]);
DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ LIST_ROW_HEIGHT, 0 }, MapLabels[i], {});
screenCoords.y += LIST_ROW_HEIGHT;
DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ kListRowHeight, 0 }, MapLabels[i], {});
screenCoords.y += kListRowHeight;
if (i == 3)
{
screenCoords += { _firstColumnWidth, -(LIST_ROW_HEIGHT * 4) };
screenCoords += { _firstColumnWidth, -(kListRowHeight * 4) };
}
}
}
@ -1468,14 +1468,14 @@ static constexpr ScreenCoordsXY MiniMapOffsets[] = {
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode)
widgets[WIDX_MAP].bottom = height - 1 - 72;
else if (selected_tab == PAGE_RIDES)
widgets[WIDX_MAP].bottom = height - 1 - (4 * LIST_ROW_HEIGHT + 4);
widgets[WIDX_MAP].bottom = height - 1 - (4 * kListRowHeight + 4);
else
widgets[WIDX_MAP].bottom = height - 1 - 14;
}
void CalculateTextLayout()
{
int32_t textOffset = 4 + LIST_ROW_HEIGHT;
int32_t textOffset = 4 + kListRowHeight;
_firstColumnWidth = 118;
for (uint32_t i = 0; i < 4; i++)
{

View File

@ -303,7 +303,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
{
int32_t numLines;
GfxWrapString(NetworkGetServerName(), baseWidth, FontStyle::Medium, nullptr, &numLines);
baseHeight += (numLines + 1) * lineHeight + (LIST_ROW_HEIGHT / 2);
baseHeight += (numLines + 1) * lineHeight + (kListRowHeight / 2);
}
// Likewise, for the optional server description -- which can be a little longer.
@ -312,22 +312,22 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
{
int32_t numLines;
GfxWrapString(descString, baseWidth, FontStyle::Medium, nullptr, &numLines);
baseHeight += (numLines + 1) * lineHeight + (LIST_ROW_HEIGHT / 2);
baseHeight += (numLines + 1) * lineHeight + (kListRowHeight / 2);
}
// Finally, account for provider info, if present.
{
const auto& providerName = NetworkGetServerProviderName();
if (!providerName.empty())
baseHeight += LIST_ROW_HEIGHT;
baseHeight += kListRowHeight;
const auto& providerEmail = NetworkGetServerProviderEmail();
if (!providerEmail.empty())
baseHeight += LIST_ROW_HEIGHT;
baseHeight += kListRowHeight;
const auto& providerWebsite = NetworkGetServerProviderWebsite();
if (!providerWebsite.empty())
baseHeight += LIST_ROW_HEIGHT;
baseHeight += kListRowHeight;
}
// TODO: Are these casts still neccessary?
@ -686,7 +686,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
auto ft = Formatter();
ft.Add<const char*>(name.c_str());
screenCoords.y += DrawTextWrapped(clippedDPI, screenCoords, newWidth, STR_STRING, ft, { colours[1] });
screenCoords.y += LIST_ROW_HEIGHT / 2;
screenCoords.y += kListRowHeight / 2;
}
const auto& description = NetworkGetServerDescription();
@ -695,7 +695,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
auto ft = Formatter();
ft.Add<const char*>(description.c_str());
screenCoords.y += DrawTextWrapped(clippedDPI, screenCoords, newWidth, STR_STRING, ft, { colours[1] });
screenCoords.y += LIST_ROW_HEIGHT / 2;
screenCoords.y += kListRowHeight / 2;
}
const auto& providerName = NetworkGetServerProviderName();
@ -704,7 +704,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
auto ft = Formatter();
ft.Add<const char*>(providerName.c_str());
DrawTextBasic(clippedDPI, screenCoords, STR_PROVIDER_NAME, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
const auto& providerEmail = NetworkGetServerProviderEmail();
@ -713,7 +713,7 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
auto ft = Formatter();
ft.Add<const char*>(providerEmail.c_str());
DrawTextBasic(clippedDPI, screenCoords, STR_PROVIDER_EMAIL, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
const auto& providerWebsite = NetworkGetServerProviderWebsite();

View File

@ -171,7 +171,7 @@ static Widget WindowNewsOptionsWidgets[] = {
checkboxWidget->left = baseCheckBox.left;
checkboxWidget->right = baseCheckBox.right;
checkboxWidget->top = y;
checkboxWidget->bottom = checkboxWidget->top + LIST_ROW_HEIGHT + 3;
checkboxWidget->bottom = checkboxWidget->top + kListRowHeight + 3;
checkboxWidget->text = ndef->caption;
const bool* configValue = GetNotificationValuePtr(ndef);
@ -179,7 +179,7 @@ static Widget WindowNewsOptionsWidgets[] = {
checkboxWidgetIndex++;
checkboxWidget++;
y += LIST_ROW_HEIGHT + 3;
y += kListRowHeight + 3;
}
// Remove unused checkboxes

View File

@ -992,7 +992,7 @@ static constexpr WindowParkAward _parkAwards[] = {
auto ft = Formatter();
ft.Add<uint32_t>(parkSize);
DrawTextBasic(dpi, screenCoords, stringIndex, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Draw number of rides / attractions
if (_numberOfRides != -1)
@ -1001,7 +1001,7 @@ static constexpr WindowParkAward _parkAwards[] = {
ft.Add<uint32_t>(_numberOfRides);
DrawTextBasic(dpi, screenCoords, STR_NUMBER_OF_RIDES_LABEL, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Draw number of staff
if (_numberOfStaff != -1)
@ -1010,13 +1010,13 @@ static constexpr WindowParkAward _parkAwards[] = {
ft.Add<uint32_t>(_numberOfStaff);
DrawTextBasic(dpi, screenCoords, STR_STAFF_LABEL, ft);
}
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Draw number of guests in park
ft = Formatter();
ft.Add<uint32_t>(gameState.NumGuestsInPark);
DrawTextBasic(dpi, screenCoords, STR_GUESTS_IN_PARK_LABEL, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<uint32_t>(gameState.TotalAdmissions);
@ -1116,7 +1116,7 @@ static constexpr WindowParkAward _parkAwards[] = {
// Your objective:
DrawTextBasic(dpi, screenCoords, STR_OBJECTIVE_LABEL);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Objective
ft = Formatter();

View File

@ -630,7 +630,7 @@ static Widget *window_player_page_widgets[] = {
ft.Add<uint32_t>(NetworkGetPlayerCommandsRan(player));
DrawTextBasic(dpi, screenCoords, STR_COMMANDS_RAN, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<uint32_t>(NetworkGetPlayerMoneySpent(player));

View File

@ -2805,7 +2805,7 @@ static_assert(std::size(RatingNames) == 6);
// Excitement Factor
if (rideEntry->excitement_multiplier != 0)
{
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<int16_t>(abs(rideEntry->excitement_multiplier));
@ -2821,7 +2821,7 @@ static_assert(std::size(RatingNames) == 6);
if (lineHeight != 10)
screenCoords.x += 150;
else
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<int16_t>(abs(rideEntry->intensity_multiplier));
@ -2835,7 +2835,7 @@ static_assert(std::size(RatingNames) == 6);
// Nausea Factor
if (rideEntry->nausea_multiplier != 0)
{
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<int16_t>(abs(rideEntry->nausea_multiplier));
@ -5336,7 +5336,7 @@ static_assert(std::size(RatingNames) == 6);
StringId stringId = !RideHasRatings(*ride) ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE
: STR_EXCITEMENT_RATING;
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Intensity
ratingName = GetRatingName(ride->intensity);
@ -5351,7 +5351,7 @@ static_assert(std::size(RatingNames) == 6);
stringId = STR_INTENSITY_RATING_RED;
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Nausea
ratingName = GetRatingName(ride->nausea);
@ -5360,7 +5360,7 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<StringId>(ratingName);
stringId = !RideHasRatings(*ride) ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING;
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += 2 * LIST_ROW_HEIGHT;
screenCoords.y += 2 * kListRowHeight;
// Horizontal rule
GfxFillRectInset(
@ -5375,7 +5375,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<uint16_t>(ride->holes);
DrawTextBasic(dpi, screenCoords, STR_HOLES, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
else
{
@ -5383,13 +5383,13 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<int32_t>((ride->max_speed * 9) >> 18);
DrawTextBasic(dpi, screenCoords, STR_MAX_SPEED, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Average speed
ft = Formatter();
ft.Add<int32_t>((ride->average_speed * 9) >> 18);
DrawTextBasic(dpi, screenCoords, STR_AVERAGE_SPEED, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Ride time
ft = Formatter();
@ -5429,7 +5429,7 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<uint16_t>(0);
ft.Add<uint16_t>(0);
DrawTextEllipsised(dpi, screenCoords, 308, STR_RIDE_TIME, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Ride length
@ -5470,7 +5470,7 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<uint16_t>(0);
DrawTextEllipsised(dpi, screenCoords, 308, STR_RIDE_LENGTH, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES))
{
@ -5480,7 +5480,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<fixed16_2dp>(ride->max_positive_vertical_g);
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Max. negative vertical G's
stringId = ride->max_negative_vertical_g <= RIDE_G_FORCES_RED_NEG_VERTICAL
@ -5489,7 +5489,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<int32_t>(ride->max_negative_vertical_g);
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Max lateral G's
stringId = ride->max_lateral_g > RIDE_G_FORCES_RED_LATERAL ? STR_MAX_LATERAL_G_RED
@ -5497,13 +5497,13 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<fixed16_2dp>(ride->max_lateral_g);
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Total 'air' time
ft = Formatter();
ft.Add<fixed32_2dp>(ride->total_air_time * 3);
DrawTextBasic(dpi, screenCoords, STR_TOTAL_AIR_TIME, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_DROPS))
@ -5513,14 +5513,14 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<uint16_t>(drops);
DrawTextBasic(dpi, screenCoords, STR_DROPS, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Highest drop height
auto highestDropHeight = (ride->highest_drop_height * 3) / 4;
ft = Formatter();
ft.Add<int32_t>(highestDropHeight);
DrawTextBasic(dpi, screenCoords, STR_HIGHEST_DROP_HEIGHT, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
if (ride->type != RIDE_TYPE_MINI_GOLF)
@ -5531,7 +5531,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<uint16_t>(ride->inversions);
DrawTextBasic(dpi, screenCoords, STR_INVERSIONS, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
}
}
@ -6393,7 +6393,7 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<money64>(ride->income_per_hour);
DrawTextBasic(dpi, screenCoords, STR_INCOME_PER_HOUR, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Running cost per hour
@ -6402,7 +6402,7 @@ static_assert(std::size(RatingNames) == 6);
auto ft = Formatter();
ft.Add<money64>(costPerHour);
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Profit per hour
if (ride->profit != kMoney64Undefined)
@ -6410,7 +6410,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<money64>(ride->profit);
DrawTextBasic(dpi, screenCoords, STR_PROFIT_PER_HOUR, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
screenCoords.y += 5;
@ -6550,14 +6550,14 @@ static_assert(std::size(RatingNames) == 6);
auto ft = Formatter();
ft.Add<int16_t>(ride->num_riders);
DrawTextBasic(dpi, screenCoords, STR_CUSTOMERS_ON_RIDE, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Customers per hour
auto ft = Formatter();
ft.Add<int32_t>(RideCustomersPerHour(*ride));
DrawTextBasic(dpi, screenCoords, STR_CUSTOMERS_PER_HOUR, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Popularity
popularity = ride->popularity;
@ -6573,7 +6573,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<int16_t>(popularity);
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Satisfaction
satisfaction = ride->satisfaction;
@ -6589,7 +6589,7 @@ static_assert(std::size(RatingNames) == 6);
ft = Formatter();
ft.Add<int16_t>(satisfaction);
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Queue time
if (ride->IsRide())
@ -6610,7 +6610,7 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<StringId>(GetShopItemDescriptor(shopItem).Naming.Plural);
ft.Add<uint32_t>(ride->no_primary_items_sold);
DrawTextBasic(dpi, screenCoords, STR_ITEMS_SOLD, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Secondary shop items sold / on-ride photos sold
@ -6622,14 +6622,14 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<StringId>(GetShopItemDescriptor(shopItem).Naming.Plural);
ft.Add<uint32_t>(ride->no_secondary_items_sold);
DrawTextBasic(dpi, screenCoords, STR_ITEMS_SOLD, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
// Total customers
ft = Formatter();
ft.Add<uint32_t>(ride->total_customers);
DrawTextBasic(dpi, screenCoords, STR_TOTAL_CUSTOMERS, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
// Guests favourite
if (ride->IsRide())
@ -6638,7 +6638,7 @@ static_assert(std::size(RatingNames) == 6);
ft.Add<uint32_t>(ride->guests_favourite);
stringId = ride->guests_favourite == 1 ? STR_FAVOURITE_RIDE_OF_GUEST : STR_FAVOURITE_RIDE_OF_GUESTS;
DrawTextBasic(dpi, screenCoords, stringId, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
screenCoords.y += 2;

View File

@ -936,13 +936,13 @@ static Widget _staffOptionsWidgets[] = {
auto ft = Formatter();
ft.Add<money64>(GetStaffWage(staff->AssignedStaffType));
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_WAGES, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
}
auto ft = Formatter();
ft.Add<int32_t>(staff->GetHireDate());
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_EMPLOYED_FOR, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
switch (staff->AssignedStaffType)
{
@ -950,17 +950,17 @@ static Widget _staffOptionsWidgets[] = {
ft = Formatter();
ft.Add<uint32_t>(staff->StaffLawnsMown);
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_LAWNS_MOWN, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<uint32_t>(staff->StaffGardensWatered);
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_GARDENS_WATERED, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<uint32_t>(staff->StaffLitterSwept);
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_LITTER_SWEPT, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<uint32_t>(staff->StaffBinsEmptied);
@ -970,7 +970,7 @@ static Widget _staffOptionsWidgets[] = {
ft = Formatter();
ft.Add<uint32_t>(staff->StaffRidesInspected);
DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_RIDES_INSPECTED, ft);
screenCoords.y += LIST_ROW_HEIGHT;
screenCoords.y += kListRowHeight;
ft = Formatter();
ft.Add<uint32_t>(staff->StaffRidesFixed);

View File

@ -547,17 +547,17 @@ static Widget _trackListWidgets[] = {
ft = Formatter();
ft.Add<fixed32_2dp>(_loadedTrackDesign->excitement * 10);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
ft = Formatter();
ft.Add<fixed32_2dp>(_loadedTrackDesign->intensity * 10);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
ft = Formatter();
ft.Add<fixed32_2dp>(_loadedTrackDesign->nausea * 10);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft);
screenPos.y += LIST_ROW_HEIGHT + 4;
screenPos.y += kListRowHeight + 4;
// Information for tracked rides.
if (GetRideTypeDescriptor(_loadedTrackDesign->type).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK))
@ -571,7 +571,7 @@ static Widget _trackListWidgets[] = {
ft = Formatter();
ft.Add<uint16_t>(_loadedTrackDesign->holes & 0x1F);
DrawTextBasic(dpi, screenPos, STR_HOLES, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
else
{
@ -579,13 +579,13 @@ static Widget _trackListWidgets[] = {
ft = Formatter();
ft.Add<uint16_t>(((_loadedTrackDesign->max_speed << 16) * 9) >> 18);
DrawTextBasic(dpi, screenPos, STR_MAX_SPEED, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Average speed
ft = Formatter();
ft.Add<uint16_t>(((_loadedTrackDesign->average_speed << 16) * 9) >> 18);
DrawTextBasic(dpi, screenPos, STR_AVERAGE_SPEED, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
// Ride length
@ -593,7 +593,7 @@ static Widget _trackListWidgets[] = {
ft.Add<StringId>(STR_RIDE_LENGTH_ENTRY);
ft.Add<uint16_t>(_loadedTrackDesign->ride_length);
DrawTextEllipsised(dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (GetRideTypeDescriptor(_loadedTrackDesign->type).HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES))
@ -602,19 +602,19 @@ static Widget _trackListWidgets[] = {
ft = Formatter();
ft.Add<int32_t>(_loadedTrackDesign->max_positive_vertical_g * 32);
DrawTextBasic(dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Maximum negative vertical Gs
ft = Formatter();
ft.Add<int32_t>(_loadedTrackDesign->max_negative_vertical_g * 32);
DrawTextBasic(dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Maximum lateral Gs
ft = Formatter();
ft.Add<int32_t>(_loadedTrackDesign->max_lateral_g * 32);
DrawTextBasic(dpi, screenPos, STR_MAX_LATERAL_G, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
if (_loadedTrackDesign->total_air_time != 0)
{
@ -622,7 +622,7 @@ static Widget _trackListWidgets[] = {
ft = Formatter();
ft.Add<int32_t>(_loadedTrackDesign->total_air_time * 25);
DrawTextBasic(dpi, screenPos, STR_TOTAL_AIR_TIME, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
}
@ -632,13 +632,13 @@ static Widget _trackListWidgets[] = {
ft = Formatter();
ft.Add<uint16_t>(_loadedTrackDesign->drops & 0x3F);
DrawTextBasic(dpi, screenPos, STR_DROPS, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
// Drop height is multiplied by 0.75
ft = Formatter();
ft.Add<uint16_t>((_loadedTrackDesign->highest_drop_height * 3) / 4);
DrawTextBasic(dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (_loadedTrackDesign->type != RIDE_TYPE_MINI_GOLF)
@ -650,7 +650,7 @@ static Widget _trackListWidgets[] = {
ft.Add<uint16_t>(inversions);
// Inversions
DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
}
screenPos.y += 4;
@ -663,7 +663,7 @@ static Widget _trackListWidgets[] = {
ft.Add<uint16_t>(_loadedTrackDesign->space_required_x);
ft.Add<uint16_t>(_loadedTrackDesign->space_required_y);
DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft);
screenPos.y += LIST_ROW_HEIGHT;
screenPos.y += kListRowHeight;
}
if (_loadedTrackDesign->cost != 0)

View File

@ -43,7 +43,7 @@ enum class CloseWindowModifier : uint8_t;
constexpr uint8_t CloseButtonWidth = 10;
constexpr uint8_t kScrollableRowHeight = 12;
#define LIST_ROW_HEIGHT 12
constexpr uint8_t kListRowHeight = 12;
#define TABLE_CELL_HEIGHT 12
#define BUTTON_FACE_HEIGHT 12
#define SPINNER_HEIGHT 12