1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Rename DROPDOWN_HEIGHT to kDropdownHeight

This commit is contained in:
Harry-Hopkinson
2024-04-14 17:27:32 +00:00
parent 9fa917ae57
commit b294d97f03
13 changed files with 80 additions and 80 deletions

View File

@@ -583,7 +583,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
*/
ScreenSize OnScrollGetSize(int32_t scrollIndex) override
{
const auto newHeight = static_cast<int32_t>(_listItems.size() * kScrollableRowHeight);
const auto newHeight = static_cast<int32_t>(_listItems.size() * SCROLLABLE_ROW_HEIGHT);
return { 0, newHeight };
}
@@ -728,7 +728,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
for (size_t i = 0; i < _listItems.size(); i++)
{
const auto& listItem = _listItems[i];
if (screenCoords.y + kScrollableRowHeight >= dpi.y && screenCoords.y <= dpi.y + dpi.height)
if (screenCoords.y + SCROLLABLE_ROW_HEIGHT >= dpi.y && screenCoords.y <= dpi.y + dpi.height)
{
// Draw checkbox
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem.flags & 0x20))
@@ -740,7 +740,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
&& !(*listItem.flags & ObjectSelectionFlags::Flag6);
if (highlighted)
{
auto bottom = screenCoords.y + (kScrollableRowHeight - 1);
auto bottom = screenCoords.y + (SCROLLABLE_ROW_HEIGHT - 1);
GfxFilterRect(dpi, { 0, screenCoords.y, width, bottom }, FilterPaletteID::PaletteDarken1);
}
@@ -799,7 +799,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
ft.Add<const char*>(gCommonStringFormatBuffer);
DrawTextEllipsised(dpi, screenCoords, width_limit, STR_STRING, ft, { colour, FontStyle::Medium, darkness });
}
screenCoords.y += kScrollableRowHeight;
screenCoords.y += SCROLLABLE_ROW_HEIGHT;
}
}
@@ -1537,7 +1537,7 @@ static std::vector<Widget> _window_editor_object_selection_widgets = {
*/
int32_t GetObjectFromObjectSelection(ObjectType object_type, int32_t y)
{
int32_t listItemIndex = y / kScrollableRowHeight;
int32_t listItemIndex = y / SCROLLABLE_ROW_HEIGHT;
if (listItemIndex < 0 || static_cast<size_t>(listItemIndex) >= _listItems.size())
return -1;