forked from rosebudai/OpenRCT2-Web
Move rectangle drawing into its own namespace
This commit is contained in:
45 files changed
+470
-391
No files matched your search
@@ -31,6 +31,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace OpenRCT2::Drawing;
|
||||
|
||||
namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
#ifndef DISABLE_HTTP
|
||||
@@ -511,7 +513,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
void onScrollDraw(const int32_t scrollIndex, RenderTarget& rt) override
|
||||
{
|
||||
auto rtCoords = ScreenCoordsXY{ rt.x, rt.y };
|
||||
GfxFillRect(
|
||||
Rect::fill(
|
||||
rt, { rtCoords, rtCoords + ScreenCoordsXY{ rt.width - 1, rt.height - 1 } },
|
||||
ColourMapA[colours[1].colour].mid_light);
|
||||
const int32_t listWidth = widgets[WIDX_SCROLL].width();
|
||||
@@ -530,11 +532,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
{ listWidth, screenCoords.y + kScrollableRowHeight - 1 } };
|
||||
// If hovering over item, change the color and fill the backdrop.
|
||||
if (i == selectedListItem)
|
||||
GfxFillRect(rt, screenRect, ColourMapA[colours[1].colour].darker);
|
||||
Rect::fill(rt, screenRect, ColourMapA[colours[1].colour].darker);
|
||||
else if (i == _highlightedIndex)
|
||||
GfxFillRect(rt, screenRect, ColourMapA[colours[1].colour].mid_dark);
|
||||
Rect::fill(rt, screenRect, ColourMapA[colours[1].colour].mid_dark);
|
||||
else if ((i & 1) != 0) // odd / even check
|
||||
GfxFillRect(rt, screenRect, ColourMapA[colours[1].colour].light);
|
||||
Rect::fill(rt, screenRect, ColourMapA[colours[1].colour].light);
|
||||
|
||||
// Draw the actual object entry's name...
|
||||
screenCoords.x = kNameColLeft - 3;
|
||||
|
||||
Reference in new issue
Block a user