mirror of https://github.com/OpenRCT2/OpenRCT2.git
parent
60422960a3
commit
b15dc66acb
|
@ -387,22 +387,21 @@ void window_editor_bottom_toolbar_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER))
|
||||
{
|
||||
auto previousWidget = window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE];
|
||||
auto nextWidget = window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE];
|
||||
|
||||
if (drawPreviousButton)
|
||||
{
|
||||
gfx_filter_rect(
|
||||
dpi, window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].left + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + w->windowPos.y,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].right + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].bottom + w->windowPos.y, FilterPaletteID::Palette51);
|
||||
auto leftTop = w->windowPos + ScreenCoordsXY{ previousWidget.left, previousWidget.top };
|
||||
auto rightBottom = w->windowPos + ScreenCoordsXY{ previousWidget.right, previousWidget.bottom };
|
||||
gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51);
|
||||
}
|
||||
|
||||
if ((drawPreviousButton || drawNextButton) && gEditorStep != EditorStep::RollercoasterDesigner)
|
||||
{
|
||||
gfx_filter_rect(
|
||||
dpi, window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + w->windowPos.y,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].bottom + w->windowPos.y, FilterPaletteID::Palette51);
|
||||
auto leftTop = w->windowPos + ScreenCoordsXY{ nextWidget.left, nextWidget.top };
|
||||
auto rightBottom = w->windowPos + ScreenCoordsXY{ nextWidget.right, nextWidget.bottom };
|
||||
gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -607,7 +607,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window* w, rct_drawpix
|
|||
bottom = itemY;
|
||||
}
|
||||
|
||||
gfx_filter_rect(dpi, 0, top, boxWidth, bottom, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, top, boxWidth, bottom }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
if (researchItem == _editorInventionsListDraggedItem)
|
||||
|
|
|
@ -1228,7 +1228,7 @@ static void window_editor_object_selection_scrollpaint(rct_window* w, rct_drawpi
|
|||
if (highlighted)
|
||||
{
|
||||
auto bottom = screenCoords.y + (SCROLLABLE_ROW_HEIGHT - 1);
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, w->width, bottom, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, screenCoords.y, w->width, bottom }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
// Draw checkmark
|
||||
|
|
|
@ -1095,7 +1095,7 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window* w, rct
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
gfx_filter_rect(dpi, 0, y, w->width, y + 11, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, y, w->width, y + 11 }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
// Checkbox mark
|
||||
|
|
|
@ -350,26 +350,25 @@ void window_game_bottom_toolbar_invalidate_news_item()
|
|||
*/
|
||||
static void window_game_bottom_toolbar_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
{
|
||||
auto leftWidget = window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET];
|
||||
auto rightWidget = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET];
|
||||
auto middleWidget = window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET];
|
||||
|
||||
// Draw panel grey backgrounds
|
||||
gfx_filter_rect(
|
||||
dpi, w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].left,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].top,
|
||||
w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].right,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].bottom, FilterPaletteID::Palette51);
|
||||
gfx_filter_rect(
|
||||
dpi, w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].top,
|
||||
w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].bottom, FilterPaletteID::Palette51);
|
||||
auto leftTop = w->windowPos + ScreenCoordsXY{ leftWidget.left, leftWidget.top };
|
||||
auto rightBottom = w->windowPos + ScreenCoordsXY{ leftWidget.right, leftWidget.bottom };
|
||||
gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51);
|
||||
|
||||
leftTop = w->windowPos + ScreenCoordsXY{ rightWidget.left, rightWidget.top };
|
||||
rightBottom = w->windowPos + ScreenCoordsXY{ rightWidget.right, rightWidget.bottom };
|
||||
gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51);
|
||||
|
||||
if (ThemeGetFlags() & UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR)
|
||||
{
|
||||
// Draw grey background
|
||||
gfx_filter_rect(
|
||||
dpi, w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].left,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].top,
|
||||
w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].right,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].bottom, FilterPaletteID::Palette51);
|
||||
leftTop = w->windowPos + ScreenCoordsXY{ middleWidget.left, middleWidget.top };
|
||||
rightBottom = w->windowPos + ScreenCoordsXY{ middleWidget.right, middleWidget.bottom };
|
||||
gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51);
|
||||
}
|
||||
|
||||
WindowDrawWidgets(w, dpi);
|
||||
|
|
|
@ -1636,7 +1636,7 @@ void window_guest_rides_scroll_paint(rct_window* w, rct_drawpixelinfo* dpi, int3
|
|||
rct_string_id stringId = STR_BLACK_STRING;
|
||||
if (list_index == w->selected_list_item)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + 9, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, y, 800, y + 9 }, FilterPaletteID::PaletteDarken1);
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
||||
|
|
|
@ -675,7 +675,7 @@ private:
|
|||
rct_string_id format = STR_BLACK_STRING;
|
||||
if (index == _highlightedIndex)
|
||||
{
|
||||
gfx_filter_rect(&dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(&dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1);
|
||||
format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ private:
|
|||
rct_string_id format = STR_BLACK_STRING;
|
||||
if (index == _highlightedIndex)
|
||||
{
|
||||
gfx_filter_rect(&dpi, 0, y, 800, y + SUMMARISED_GUEST_ROW_HEIGHT, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(&dpi, { 0, y, 800, y + SUMMARISED_GUEST_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1);
|
||||
format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@ static void window_loadsave_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
gfx_filter_rect(dpi, 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
// display a marker next to the currently loaded game file
|
||||
if (_listItems[i].loaded)
|
||||
|
|
|
@ -603,7 +603,8 @@ static void window_multiplayer_players_scrollpaint(rct_window* w, rct_drawpixeli
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
gfx_filter_rect(
|
||||
dpi, 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
dpi, { 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 },
|
||||
FilterPaletteID::PaletteDarken1);
|
||||
buffer += network_get_player_name(i);
|
||||
colour = w->colours[2];
|
||||
}
|
||||
|
@ -905,7 +906,7 @@ static void window_multiplayer_groups_scrollpaint(rct_window* w, rct_drawpixelin
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
gfx_filter_rect(
|
||||
dpi, 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
dpi, { 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
if (screenCoords.y > dpi->y + dpi->height)
|
||||
{
|
||||
|
|
|
@ -578,7 +578,7 @@ static void window_ride_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
if (i == static_cast<size_t>(w->selected_list_item))
|
||||
{
|
||||
// Background highlight
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1);
|
||||
format = (_quickDemolishMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID);
|
||||
}
|
||||
|
||||
|
|
|
@ -596,7 +596,7 @@ static void window_scenarioselect_scrollpaint(rct_window* w, rct_drawpixelinfo*
|
|||
bool isHighlighted = w->highlighted_scenario == scenario;
|
||||
if (isHighlighted)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, w->width, y + scenarioItemHeight - 1, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, y, w->width, y + scenarioItemHeight - 1 }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
bool isCompleted = scenario->highscore != nullptr;
|
||||
|
|
|
@ -439,7 +439,7 @@ static void window_server_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi
|
|||
// Draw hover highlight
|
||||
if (highlighted)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, width, screenCoords.y + ITEM_HEIGHT, FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(dpi, { 0, screenCoords.y, width, screenCoords.y + ITEM_HEIGHT }, FilterPaletteID::PaletteDarken1);
|
||||
_version = serverDetails.Version;
|
||||
listWidget.tooltip = STR_NETWORK_VERSION_TIP;
|
||||
}
|
||||
|
|
|
@ -509,7 +509,7 @@ private:
|
|||
if (isHighlighted)
|
||||
{
|
||||
format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
gfx_filter_rect(&dpi, 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2), FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(&dpi, { 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2) }, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
auto bindingOffset = (scrollWidth * 2) / 3;
|
||||
|
|
|
@ -401,7 +401,7 @@ public:
|
|||
|
||||
if (i == _highlightedIndex)
|
||||
{
|
||||
gfx_filter_rect(&dpi, 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1), FilterPaletteID::PaletteDarken1);
|
||||
gfx_filter_rect(&dpi, { 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1) }, FilterPaletteID::PaletteDarken1);
|
||||
format = (_quickFireMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID);
|
||||
}
|
||||
|
||||
|
|
|
@ -867,31 +867,26 @@ void window_themes_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t sc
|
|||
if (i + 1 < get_colour_scheme_tab_count())
|
||||
{
|
||||
int32_t colour = w->colours[1];
|
||||
|
||||
auto leftTop = ScreenCoordsXY{ 0, screenCoords.y + _row_height - 2 };
|
||||
auto rightBottom = ScreenCoordsXY{ window_themes_widgets[WIDX_THEMES_LIST].right,
|
||||
screenCoords.y + _row_height - 2 };
|
||||
auto yPixelOffset = ScreenCoordsXY{ 0, 1 };
|
||||
|
||||
if (colour & COLOUR_FLAG_TRANSLUCENT)
|
||||
{
|
||||
translucent_window_palette windowPalette = TranslucentWindowPalettes[BASE_COLOUR(colour)];
|
||||
|
||||
gfx_filter_rect(
|
||||
dpi, 0, screenCoords.y + _row_height - 2, window_themes_widgets[WIDX_THEMES_LIST].right,
|
||||
screenCoords.y + _row_height - 2, windowPalette.highlight);
|
||||
gfx_filter_rect(
|
||||
dpi, 0, screenCoords.y + _row_height - 1, window_themes_widgets[WIDX_THEMES_LIST].right,
|
||||
screenCoords.y + _row_height - 1, windowPalette.shadow);
|
||||
gfx_filter_rect(dpi, { leftTop, rightBottom }, windowPalette.highlight);
|
||||
gfx_filter_rect(dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, windowPalette.shadow);
|
||||
}
|
||||
else
|
||||
{
|
||||
colour = ColourMapA[w->colours[1]].mid_dark;
|
||||
gfx_fill_rect(
|
||||
dpi,
|
||||
{ { 0, screenCoords.y + _row_height - 2 },
|
||||
{ window_themes_widgets[WIDX_THEMES_LIST].right, screenCoords.y + _row_height - 2 } },
|
||||
colour);
|
||||
gfx_fill_rect(dpi, { leftTop, rightBottom }, colour);
|
||||
|
||||
colour = ColourMapA[w->colours[1]].lightest;
|
||||
gfx_fill_rect(
|
||||
dpi,
|
||||
{ { 0, screenCoords.y + _row_height - 1 },
|
||||
{ window_themes_widgets[WIDX_THEMES_LIST].right, screenCoords.y + _row_height - 1 } },
|
||||
colour);
|
||||
gfx_fill_rect(dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, colour);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -690,7 +690,7 @@ public:
|
|||
{
|
||||
// Highlight
|
||||
gfx_filter_rect(
|
||||
&dpi, screenCoords.x, screenCoords.y, width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1,
|
||||
&dpi, { screenCoords, { width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } },
|
||||
FilterPaletteID::PaletteDarken1);
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ public:
|
|||
{
|
||||
// Highlight
|
||||
gfx_filter_rect(
|
||||
&dpi, screenCoords.x, screenCoords.y, width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1,
|
||||
&dpi, { screenCoords, { width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } },
|
||||
FilterPaletteID::PaletteDarken1);
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
|
|
@ -692,7 +692,6 @@ void gfx_draw_dashed_line(
|
|||
// rect
|
||||
void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour);
|
||||
void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour, uint8_t flags);
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FilterPaletteID palette);
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPaletteID palette);
|
||||
|
||||
// sprite
|
||||
|
|
|
@ -180,11 +180,6 @@ void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colou
|
|||
}
|
||||
}
|
||||
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FilterPaletteID palette)
|
||||
{
|
||||
gfx_filter_rect(dpi, { left, top, right, bottom }, palette);
|
||||
}
|
||||
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPaletteID palette)
|
||||
{
|
||||
auto drawingEngine = dpi->DrawingEngine;
|
||||
|
|
Loading…
Reference in New Issue