Moved the visible boolean config option's meta up a bit, as it didn't really fit in the text object example with the new stuff added, and updated it from the deprecated ElementTag.contains to contains_text.
Documented the new options in the text map object meta exmaple.
Removed the String text when creating a new MapText in MapScriptContainer in favor of just having the getString calls in-line (one was already in-line and I just made the new ones in-line as well as there's not much point in variables there, lmk if they should all be in variables instead though).
Replaced objectsData.getX(objectKey + ".KEY") in DenizenMapManager with getting the object's ConfigurationSection and getting stuff from that, which is a little cleaner - let me know if there's any reason it was that way.
Added fontTag, sizeTag, and styleTag fields to MapText, for the new options.
MapText#render will now use the current rendering when no font is specified, and render the text onto an image using Java's rendering when one is specified, drawing the image onto the map.
[!NOTE]
Java font rendering
Java renders text from the bottom left corner instead of the top left corner, so added some calculations with the font's sizes to try and compensate, which seem to work decently well.
Albit not always being 100% precise with some fonts (e.g. comic sans is a lil off), most fonts (e.g. arial) seem to work well.
[!NOTE]
Image caching
Currently it seems only the text is cached (vs stuff like the color which are always parsed), and caching the image would mean everything would be cached, which I assume is fine? but just making sure before trying to implement that.
[!NOTE]
Null values in save data
MapText#getSaveData seems to just put the values in even if they're null, which is what I did for the new values as well - these could probably be excluded? wouldn't really matter usually, but might be relevant when you have lots of maps.
Requested on Discord.
Changes
visible
boolean config option's meta up a bit, as it didn't really fit in thetext
object example with the new stuff added, and updated it from the deprecatedElementTag.contains
tocontains_text
.text
map object meta exmaple.String text
when creating a newMapText
inMapScriptContainer
in favor of just having thegetString
calls in-line (one was already in-line and I just made the new ones in-line as well as there's not much point in variables there, lmk if they should all be in variables instead though).objectsData.getX(objectKey + ".KEY")
inDenizenMapManager
with getting the object'sConfigurationSection
and getting stuff from that, which is a little cleaner - let me know if there's any reason it was that way.fontTag
,sizeTag
, andstyleTag
fields toMapText
, for the new options.MapText#render
will now use the current rendering when no font is specified, and render the text onto an image using Java's rendering when one is specified, drawing the image onto the map.