UX: fix #2089, improve background selection hotkeys and add emoji to indicate categories of background layers

This commit is contained in:
Pieter Vander Vennet 2024-08-23 03:47:04 +02:00
parent 5b67ccc9e2
commit 2dc386fd9a
15 changed files with 600 additions and 525 deletions

View file

@ -1727,11 +1727,12 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
}
}
private static emojiRegex = /^\p{Extended_Pictographic}+$/u
private static emojiRegex = /[\p{Extended_Pictographic}🛰]$/u
/**
* Returns 'true' if the given string contains at least one and only emoji characters
* @param string
*
* Utils.isEmoji("⛰\uFE0F") // => true
*/
public static isEmoji(string: string) {
return Utils.emojiRegex.test(string)