Merge pull request #454 from AaronVanGeffen/colour-flags
Introduce colour flags for outline and inset
This commit is contained in:
commit
eeff6fdcf5
2 changed files with 14 additions and 3 deletions
|
@ -9,6 +9,8 @@ namespace openloco
|
|||
|
||||
namespace colour
|
||||
{
|
||||
constexpr uint8_t outline_flag = 1 << 5;
|
||||
constexpr uint8_t inset_flag = 1 << 6;
|
||||
constexpr uint8_t translucent_flag = 1 << 7;
|
||||
|
||||
constexpr colour_t black = 0;
|
||||
|
@ -43,7 +45,16 @@ namespace openloco
|
|||
constexpr colour_t dark_pink = 29;
|
||||
constexpr colour_t bright_pink = 30;
|
||||
constexpr colour_t light_pink = 31;
|
||||
constexpr colour_t white_black_outline = 32;
|
||||
|
||||
constexpr colour_t outline(colour_t c)
|
||||
{
|
||||
return c | outline_flag;
|
||||
}
|
||||
|
||||
constexpr colour_t inset(colour_t c)
|
||||
{
|
||||
return c | inset_flag;
|
||||
}
|
||||
|
||||
constexpr colour_t translucent(colour_t c)
|
||||
{
|
||||
|
|
|
@ -518,7 +518,7 @@ namespace openloco::ui::windows::station
|
|||
const auto& widget = self->widgets[widx::scrollview];
|
||||
auto xPos = widget.width() - 14;
|
||||
|
||||
gfx::draw_string_494C78(*dpi, xPos, y, colour::white_black_outline, cargoStr, &args);
|
||||
gfx::draw_string_494C78(*dpi, xPos, y, colour::outline(colour::black), cargoStr, &args);
|
||||
y += 10;
|
||||
if (cargo.origin != self->number)
|
||||
{
|
||||
|
@ -527,7 +527,7 @@ namespace openloco::ui::windows::station
|
|||
args2.push(originStation->name);
|
||||
args2.push(originStation->town);
|
||||
|
||||
gfx::draw_string_494C78(*dpi, xPos, y, colour::white_black_outline, string_ids::station_cargo_en_route_end, &args2);
|
||||
gfx::draw_string_494C78(*dpi, xPos, y, colour::outline(colour::black), string_ids::station_cargo_en_route_end, &args2);
|
||||
y += 10;
|
||||
}
|
||||
y += 2;
|
||||
|
|
Loading…
Reference in a new issue