Merge pull request #16992 from Broxzier/feature/16072-eye-glyph

This commit is contained in:
Hielke Morsink authored and GitHub committed 2022-05-02 23:07:05 +02:00
commit 766571ba2c
11 files changed
+38 -7

No files matched your search

+1 -1
View File
@@ -3544,7 +3544,7 @@ STR_6434 :Remove all bindings for this shortcut.
STR_6435 :{WINDOW_COLOUR_2}Vandals stopped: {BLACK}{COMMA32}
STR_6436 :Toggle invisibility
STR_6437 :Visible
STR_6438 :V
STR_6438 :{MOVE_X}{2}👁
STR_6439 :Tile Inspector: Toggle invisibility
STR_6440 :Transparent water
STR_6441 :At least one non-queue footpath surface object must be selected.
+1
View File
@@ -7,6 +7,7 @@
- Fix: [#17080] “Remove litter” cheat does not empty litter bins.
- Fix: [#17099] Object selection thumbnail box is one pixel too tall.
- Improved: [#16978] Tree placement is more natural during map generation.
- Improved: [#16992] The checkbox in the visibility column of the Tile Inspector has been replaced with an eye symbol.
- Improved: [#16999] The maximum price for the park entry has been raised to £999.
- Improved: [#17050] Transparency can be enabled directly without needing see-through enabled first.
- Removed: [#16864] Title sequence editor (replaced by plug-in).
Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

+18
View File
@@ -1127,6 +1127,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/eye.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/latin/ae-uc-bold.png",
"y_offset": 0,
@@ -1726,6 +1732,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/eye.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/latin/ae-uc-tiny.png",
"y_offset": 0,
@@ -2332,6 +2344,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/eye-tiny.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "support/flat_to_steep_1_1.png",
"x_offset": -32,
+8 -5
View File
@@ -197,9 +197,9 @@ constexpr auto ToolbarButtonOffsetX = ScreenSize{ -24, 0 };
// List's column offsets
constexpr auto InvisibleFlagColumnXY = ScreenCoordsXY{ 3, 42 };
constexpr auto InvisibleFlagColumnSize = ScreenSize{ 15, 14 };
constexpr auto InvisibleFlagColumnSize = ScreenSize{ 20, 14 };
constexpr auto TypeColumnXY = InvisibleFlagColumnXY + ScreenSize{ InvisibleFlagColumnSize.width, 0 };
constexpr auto TypeColumnSize = ScreenSize{ 257, 14 };
constexpr auto TypeColumnSize = ScreenSize{ 252, 14 };
constexpr auto BaseHeightColumnXY = TypeColumnXY + ScreenSize{ TypeColumnSize.width, 0 };
constexpr auto BaseHeightColumnSize = ScreenSize{ 30, 14 };
constexpr auto ClearanceHeightColumnXY = BaseHeightColumnXY + ScreenCoordsXY{ BaseHeightColumnSize.width, 0 };
@@ -1338,7 +1338,7 @@ static void WindowTileInspectorScrollmousedown(rct_window* w, int32_t scrollInde
// Because the list items are displayed in reverse order, subtract the calculated index from the amount of elements
const int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT - 1;
const ScreenRect checkboxColumnRect{ { 2, 0 }, { 11, screenCoords.y } };
const ScreenRect checkboxColumnRect{ { 2, 0 }, { 15, screenCoords.y } };
if (index >= 0 && checkboxColumnRect.Contains(screenCoords))
{ // Checkbox was clicked
WindowTileInspectorToggleInvisibility(index);
@@ -2299,10 +2299,13 @@ static void WindowTileInspectorScrollpaint(rct_window* w, rct_drawpixelinfo* dpi
checkboxFormatter.Add<char*>(CheckBoxMarkString);
// Draw checkbox and check if visible
gfx_fill_rect_inset(dpi, { { 2, screenCoords.y }, { 11, screenCoords.y + 10 } }, w->colours[1], INSET_RECT_F_E0);
gfx_fill_rect_inset(dpi, { { 2, screenCoords.y }, { 15, screenCoords.y + 11 } }, w->colours[1], INSET_RECT_F_E0);
if (!tileElement->IsInvisible())
{
DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 2, 0 }, stringFormat, checkboxFormatter);
auto eyeFormatter = Formatter();
eyeFormatter.Add<rct_string_id>(STR_STRING);
eyeFormatter.Add<char*>(EyeString);
DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 2, 1 }, stringFormat, eyeFormatter);
}
const auto type = tileElement->GetType();
+4
View File
@@ -800,6 +800,10 @@ static bool ShouldUseSpriteForCodepoint(char32_t codepoint)
case UnicodeChar::german_quote_open:
case UnicodeChar::plus:
case UnicodeChar::minus:
case UnicodeChar::variation_selector:
case UnicodeChar::eye:
case UnicodeChar::road:
case UnicodeChar::railway:
return true;
default:
return false;
+1
View File
@@ -219,6 +219,7 @@ static const std::unordered_map<char32_t, int32_t> codepointOffsetMap = {
// Emoji
{ UnicodeChar::cross, CSChar::cross - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::water, CSChar::water - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::eye, SPR_G2_EYE - SPR_CHAR_START },
{ UnicodeChar::road, CSChar::road - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::railway, CSChar::railway - CS_SPRITE_FONT_OFFSET },
+1
View File
@@ -320,6 +320,7 @@ namespace UnicodeChar
constexpr char32_t cross = 0x274C;
constexpr char32_t variation_selector = 0xFE0F;
constexpr char32_t water = 0x1F30A;
constexpr char32_t eye = 0x1F441;
constexpr char32_t road = 0x1F6E3;
constexpr char32_t railway = 0x1F6E4;
+1
View File
@@ -90,6 +90,7 @@ constexpr const char* BlackDownArrowString = u8"{BLACK}▼";
constexpr const char* BlackLeftArrowString = u8"{BLACK}◀";
constexpr const char* BlackRightArrowString = u8"{BLACK}▶";
constexpr const char* CheckBoxMarkString = u8"✓";
constexpr const char* EyeString = u8"👁";
uint8_t language_get_id_from_locale(const char* locale);
const char* language_get_string(rct_string_id id);
+3 -1
View File
@@ -1023,7 +1023,9 @@ enum
SPR_G2_RIGHT_BRACE,
SPR_G2_TILDE,
SPR_G2_GLYPH_COUNT = (SPR_G2_TILDE - SPR_G2_CHAR_BEGIN) + 1,
SPR_G2_EYE,
SPR_G2_GLYPH_COUNT = (SPR_G2_EYE - SPR_G2_CHAR_BEGIN) + 1,
SPR_G2_CHAR_END = SPR_G2_CHAR_BEGIN + SPR_G2_GLYPH_COUNT * 3,
SPR_G2_SUPPORT_BEGIN = SPR_G2_CHAR_END,